From 2a2c7afa9da59b11c581a47207cf637ef0e7fe18 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Fri, 31 May 2024 10:30:34 +0300 Subject: [PATCH] Bump upjet to commit 37c7f4e91d57 Signed-off-by: Alper Rifat Ulucinar --- apis/acm/v1beta1/zz_generated.resolvers.go | 52 +- apis/acm/v1beta2/zz_certificate_types.go | 18 + apis/acm/v1beta2/zz_generated.deepcopy.go | 20 + apis/acm/v1beta2/zz_generated.resolvers.go | 67 ++ apis/opensearch/v1beta2/zz_domain_types.go | 64 ++ .../v1beta2/zz_generated.deepcopy.go | 68 ++ .../v1beta2/zz_generated.resolvers.go | 128 +++ .../v1beta1/zz_endpointaccess_types.go | 4 +- .../v1beta1/zz_generated.conversion_hubs.go | 3 + .../v1beta1/zz_generated.resolvers.go | 4 +- .../v1beta1/zz_generated.conversion_spokes.go | 20 + .../v1beta2/zz_connector_terraformed.go | 129 +++ apis/transfer/v1beta2/zz_connector_types.go | 334 +++++++ .../v1beta2/zz_generated.conversion_hubs.go | 3 + .../transfer/v1beta2/zz_generated.deepcopy.go | 611 ++++++++++++ apis/transfer/v1beta2/zz_generated.managed.go | 60 ++ .../v1beta2/zz_generated.managedlist.go | 9 + .../v1beta2/zz_generated.resolvers.go | 98 +- .../transfer/v1beta2/connector.yaml | 24 + go.mod | 6 +- go.sum | 6 + .../crds/acm.aws.upbound.io_certificates.yaml | 152 +++ .../opensearch.aws.upbound.io_domains.yaml | 462 ++++++++++ .../transfer.aws.upbound.io_connectors.yaml | 866 ++++++++++++++++++ 24 files changed, 3197 insertions(+), 11 deletions(-) create mode 100644 apis/acm/v1beta2/zz_generated.resolvers.go create mode 100755 apis/transfer/v1beta2/zz_connector_terraformed.go create mode 100755 apis/transfer/v1beta2/zz_connector_types.go create mode 100644 examples-generated/transfer/v1beta2/connector.yaml diff --git a/apis/acm/v1beta1/zz_generated.resolvers.go b/apis/acm/v1beta1/zz_generated.resolvers.go index 37fe17bd6b..227cd509f0 100644 --- a/apis/acm/v1beta1/zz_generated.resolvers.go +++ b/apis/acm/v1beta1/zz_generated.resolvers.go @@ -16,12 +16,62 @@ import ( client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *CertificateValidation) ResolveReferences( // ResolveReferences of this CertificateValidation. +func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certificate. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList r := reference.NewAPIResolver(c, mg) + var rsp reference.ResolutionResponse + var err error + { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CertificateAuthorityArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.CertificateAuthorityArnRef, + Selector: mg.Spec.ForProvider.CertificateAuthorityArnSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.CertificateAuthorityArn") + } + mg.Spec.ForProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.CertificateAuthorityArnRef = rsp.ResolvedReference + { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CertificateAuthorityArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.CertificateAuthorityArnRef, + Selector: mg.Spec.InitProvider.CertificateAuthorityArnSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.CertificateAuthorityArn") + } + mg.Spec.InitProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.CertificateAuthorityArnRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this CertificateValidation. +func (mg *CertificateValidation) ResolveReferences(ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + var rsp reference.ResolutionResponse var err error { diff --git a/apis/acm/v1beta2/zz_certificate_types.go b/apis/acm/v1beta2/zz_certificate_types.go index 6c2773aa05..0566571849 100755 --- a/apis/acm/v1beta2/zz_certificate_types.go +++ b/apis/acm/v1beta2/zz_certificate_types.go @@ -16,8 +16,17 @@ import ( type CertificateInitParameters struct { // ARN of an ACM PCA + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/acmpca/v1beta2.CertificateAuthority CertificateAuthorityArn *string `json:"certificateAuthorityArn,omitempty" tf:"certificate_authority_arn,omitempty"` + // Reference to a CertificateAuthority in acmpca to populate certificateAuthorityArn. + // +kubebuilder:validation:Optional + CertificateAuthorityArnRef *v1.Reference `json:"certificateAuthorityArnRef,omitempty" tf:"-"` + + // Selector for a CertificateAuthority in acmpca to populate certificateAuthorityArn. + // +kubebuilder:validation:Optional + CertificateAuthorityArnSelector *v1.Selector `json:"certificateAuthorityArnSelector,omitempty" tf:"-"` + // Certificate's PEM-formatted public key CertificateBody *string `json:"certificateBody,omitempty" tf:"certificate_body,omitempty"` @@ -142,9 +151,18 @@ type CertificateObservation struct { type CertificateParameters struct { // ARN of an ACM PCA + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/acmpca/v1beta2.CertificateAuthority // +kubebuilder:validation:Optional CertificateAuthorityArn *string `json:"certificateAuthorityArn,omitempty" tf:"certificate_authority_arn,omitempty"` + // Reference to a CertificateAuthority in acmpca to populate certificateAuthorityArn. + // +kubebuilder:validation:Optional + CertificateAuthorityArnRef *v1.Reference `json:"certificateAuthorityArnRef,omitempty" tf:"-"` + + // Selector for a CertificateAuthority in acmpca to populate certificateAuthorityArn. + // +kubebuilder:validation:Optional + CertificateAuthorityArnSelector *v1.Selector `json:"certificateAuthorityArnSelector,omitempty" tf:"-"` + // Certificate's PEM-formatted public key // +kubebuilder:validation:Optional CertificateBody *string `json:"certificateBody,omitempty" tf:"certificate_body,omitempty"` diff --git a/apis/acm/v1beta2/zz_generated.deepcopy.go b/apis/acm/v1beta2/zz_generated.deepcopy.go index 06ee9f8d60..18b1e14c91 100644 --- a/apis/acm/v1beta2/zz_generated.deepcopy.go +++ b/apis/acm/v1beta2/zz_generated.deepcopy.go @@ -48,6 +48,16 @@ func (in *CertificateInitParameters) DeepCopyInto(out *CertificateInitParameters *out = new(string) **out = **in } + if in.CertificateAuthorityArnRef != nil { + in, out := &in.CertificateAuthorityArnRef, &out.CertificateAuthorityArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.CertificateAuthorityArnSelector != nil { + in, out := &in.CertificateAuthorityArnSelector, &out.CertificateAuthorityArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.CertificateBody != nil { in, out := &in.CertificateBody, &out.CertificateBody *out = new(string) @@ -344,6 +354,16 @@ func (in *CertificateParameters) DeepCopyInto(out *CertificateParameters) { *out = new(string) **out = **in } + if in.CertificateAuthorityArnRef != nil { + in, out := &in.CertificateAuthorityArnRef, &out.CertificateAuthorityArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.CertificateAuthorityArnSelector != nil { + in, out := &in.CertificateAuthorityArnSelector, &out.CertificateAuthorityArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.CertificateBody != nil { in, out := &in.CertificateBody, &out.CertificateBody *out = new(string) diff --git a/apis/acm/v1beta2/zz_generated.resolvers.go b/apis/acm/v1beta2/zz_generated.resolvers.go new file mode 100644 index 0000000000..51a5d29dd2 --- /dev/null +++ b/apis/acm/v1beta2/zz_generated.resolvers.go @@ -0,0 +1,67 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 +// Code generated by angryjet. DO NOT EDIT. +// Code transformed by upjet. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certificate. + ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta2", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CertificateAuthorityArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.CertificateAuthorityArnRef, + Selector: mg.Spec.ForProvider.CertificateAuthorityArnSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.CertificateAuthorityArn") + } + mg.Spec.ForProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.CertificateAuthorityArnRef = rsp.ResolvedReference + { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta2", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CertificateAuthorityArn), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.CertificateAuthorityArnRef, + Selector: mg.Spec.InitProvider.CertificateAuthorityArnSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.CertificateAuthorityArn") + } + mg.Spec.InitProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.CertificateAuthorityArnRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/opensearch/v1beta2/zz_domain_types.go b/apis/opensearch/v1beta2/zz_domain_types.go index 79b65343d3..515c7b56fa 100755 --- a/apis/opensearch/v1beta2/zz_domain_types.go +++ b/apis/opensearch/v1beta2/zz_domain_types.go @@ -675,7 +675,17 @@ type EncryptAtRestInitParameters struct { Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` // KMS key ARN to encrypt the Elasticsearch domain with. If not specified then it defaults to using the aws/es service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` } type EncryptAtRestObservation struct { @@ -694,8 +704,18 @@ type EncryptAtRestParameters struct { Enabled *bool `json:"enabled" tf:"enabled,omitempty"` // KMS key ARN to encrypt the Elasticsearch domain with. If not specified then it defaults to using the aws/es service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"` + + // Reference to a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"` + + // Selector for a Key in kms to populate kmsKeyId. + // +kubebuilder:validation:Optional + KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"` } type LogPublishingOptionsInitParameters struct { @@ -936,11 +956,33 @@ type SoftwareUpdateOptionsParameters struct { type VPCOptionsInitParameters struct { + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // List of VPC Security Group IDs to be applied to the OpenSearch domain endpoints. If omitted, the default Security Group for the VPC will be used. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector // +listType=set SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + // List of VPC Subnet IDs for the OpenSearch domain endpoints to be created in. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector // +listType=set SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` } @@ -965,12 +1007,34 @@ type VPCOptionsObservation struct { type VPCOptionsParameters struct { + // References to SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDRefs []v1.Reference `json:"securityGroupIdRefs,omitempty" tf:"-"` + + // Selector for a list of SecurityGroup in ec2 to populate securityGroupIds. + // +kubebuilder:validation:Optional + SecurityGroupIDSelector *v1.Selector `json:"securityGroupIdSelector,omitempty" tf:"-"` + // List of VPC Security Group IDs to be applied to the OpenSearch domain endpoints. If omitted, the default Security Group for the VPC will be used. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup + // +crossplane:generate:reference:refFieldName=SecurityGroupIDRefs + // +crossplane:generate:reference:selectorFieldName=SecurityGroupIDSelector // +kubebuilder:validation:Optional // +listType=set SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"` + // References to Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDRefs []v1.Reference `json:"subnetIdRefs,omitempty" tf:"-"` + + // Selector for a list of Subnet in ec2 to populate subnetIds. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + // List of VPC Subnet IDs for the OpenSearch domain endpoints to be created in. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet + // +crossplane:generate:reference:refFieldName=SubnetIDRefs + // +crossplane:generate:reference:selectorFieldName=SubnetIDSelector // +kubebuilder:validation:Optional // +listType=set SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` diff --git a/apis/opensearch/v1beta2/zz_generated.deepcopy.go b/apis/opensearch/v1beta2/zz_generated.deepcopy.go index 17f099a36d..0adffc87e1 100644 --- a/apis/opensearch/v1beta2/zz_generated.deepcopy.go +++ b/apis/opensearch/v1beta2/zz_generated.deepcopy.go @@ -1668,6 +1668,16 @@ func (in *EncryptAtRestInitParameters) DeepCopyInto(out *EncryptAtRestInitParame *out = new(string) **out = **in } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptAtRestInitParameters. @@ -1718,6 +1728,16 @@ func (in *EncryptAtRestParameters) DeepCopyInto(out *EncryptAtRestParameters) { *out = new(string) **out = **in } + if in.KMSKeyIDRef != nil { + in, out := &in.KMSKeyIDRef, &out.KMSKeyIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.KMSKeyIDSelector != nil { + in, out := &in.KMSKeyIDSelector, &out.KMSKeyIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptAtRestParameters. @@ -2553,6 +2573,18 @@ func (in *SoftwareUpdateOptionsParameters) DeepCopy() *SoftwareUpdateOptionsPara // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCOptionsInitParameters) DeepCopyInto(out *VPCOptionsInitParameters) { *out = *in + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecurityGroupIds != nil { in, out := &in.SecurityGroupIds, &out.SecurityGroupIds *out = make([]*string, len(*in)) @@ -2564,6 +2596,18 @@ func (in *VPCOptionsInitParameters) DeepCopyInto(out *VPCOptionsInitParameters) } } } + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubnetIds != nil { in, out := &in.SubnetIds, &out.SubnetIds *out = make([]*string, len(*in)) @@ -2643,6 +2687,18 @@ func (in *VPCOptionsObservation) DeepCopy() *VPCOptionsObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCOptionsParameters) DeepCopyInto(out *VPCOptionsParameters) { *out = *in + if in.SecurityGroupIDRefs != nil { + in, out := &in.SecurityGroupIDRefs, &out.SecurityGroupIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupIDSelector != nil { + in, out := &in.SecurityGroupIDSelector, &out.SecurityGroupIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecurityGroupIds != nil { in, out := &in.SecurityGroupIds, &out.SecurityGroupIds *out = make([]*string, len(*in)) @@ -2654,6 +2710,18 @@ func (in *VPCOptionsParameters) DeepCopyInto(out *VPCOptionsParameters) { } } } + if in.SubnetIDRefs != nil { + in, out := &in.SubnetIDRefs, &out.SubnetIDRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubnetIds != nil { in, out := &in.SubnetIds, &out.SubnetIds *out = make([]*string, len(*in)) diff --git a/apis/opensearch/v1beta2/zz_generated.resolvers.go b/apis/opensearch/v1beta2/zz_generated.resolvers.go index 6ada605bd1..92adfd5aed 100644 --- a/apis/opensearch/v1beta2/zz_generated.resolvers.go +++ b/apis/opensearch/v1beta2/zz_generated.resolvers.go @@ -13,6 +13,7 @@ import ( errors "github.com/pkg/errors" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + common "github.com/upbound/provider-aws/config/common" client "sigs.k8s.io/controller-runtime/pkg/client" // ResolveReferences of this Domain. @@ -25,8 +26,30 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error + if mg.Spec.ForProvider.EncryptAtRest != nil { + { + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptAtRest.KMSKeyID), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.EncryptAtRest.KMSKeyIDRef, + Selector: mg.Spec.ForProvider.EncryptAtRest.KMSKeyIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.EncryptAtRest.KMSKeyID") + } + mg.Spec.ForProvider.EncryptAtRest.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.EncryptAtRest.KMSKeyIDRef = rsp.ResolvedReference + + } for i3 := 0; i3 < len(mg.Spec.ForProvider.LogPublishingOptions); i3++ { { m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") @@ -47,6 +70,69 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LogPublishingOptions[i3].CloudwatchLogGroupArnRef = rsp.ResolvedReference + } + if mg.Spec.ForProvider.VPCOptions != nil { + { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCOptions.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCOptions.SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.VPCOptions.SecurityGroupIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCOptions.SecurityGroupIds") + } + mg.Spec.ForProvider.VPCOptions.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCOptions.SecurityGroupIDRefs = mrsp.ResolvedReferences + + } + if mg.Spec.ForProvider.VPCOptions != nil { + { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCOptions.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.VPCOptions.SubnetIDRefs, + Selector: mg.Spec.ForProvider.VPCOptions.SubnetIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCOptions.SubnetIds") + } + mg.Spec.ForProvider.VPCOptions.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.VPCOptions.SubnetIDRefs = mrsp.ResolvedReferences + + } + if mg.Spec.InitProvider.EncryptAtRest != nil { + { + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptAtRest.KMSKeyID), + Extract: common.ARNExtractor(), + Reference: mg.Spec.InitProvider.EncryptAtRest.KMSKeyIDRef, + Selector: mg.Spec.InitProvider.EncryptAtRest.KMSKeyIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.EncryptAtRest.KMSKeyID") + } + mg.Spec.InitProvider.EncryptAtRest.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.EncryptAtRest.KMSKeyIDRef = rsp.ResolvedReference + } for i3 := 0; i3 < len(mg.Spec.InitProvider.LogPublishingOptions); i3++ { { @@ -68,6 +154,48 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LogPublishingOptions[i3].CloudwatchLogGroupArnRef = rsp.ResolvedReference + } + if mg.Spec.InitProvider.VPCOptions != nil { + { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCOptions.SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.VPCOptions.SecurityGroupIDRefs, + Selector: mg.Spec.InitProvider.VPCOptions.SecurityGroupIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.VPCOptions.SecurityGroupIds") + } + mg.Spec.InitProvider.VPCOptions.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.VPCOptions.SecurityGroupIDRefs = mrsp.ResolvedReferences + + } + if mg.Spec.InitProvider.VPCOptions != nil { + { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCOptions.SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.VPCOptions.SubnetIDRefs, + Selector: mg.Spec.InitProvider.VPCOptions.SubnetIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.VPCOptions.SubnetIds") + } + mg.Spec.InitProvider.VPCOptions.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.VPCOptions.SubnetIDRefs = mrsp.ResolvedReferences + } return nil diff --git a/apis/redshift/v1beta1/zz_endpointaccess_types.go b/apis/redshift/v1beta1/zz_endpointaccess_types.go index bad9925f9a..a5cf22e2a0 100755 --- a/apis/redshift/v1beta1/zz_endpointaccess_types.go +++ b/apis/redshift/v1beta1/zz_endpointaccess_types.go @@ -16,7 +16,7 @@ import ( type EndpointAccessInitParameters struct { // The cluster identifier of the cluster to access. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/redshift/v1beta1.Cluster + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/redshift/v1beta2.Cluster ClusterIdentifier *string `json:"clusterIdentifier,omitempty" tf:"cluster_identifier,omitempty"` // Reference to a Cluster in redshift to populate clusterIdentifier. @@ -90,7 +90,7 @@ type EndpointAccessObservation struct { type EndpointAccessParameters struct { // The cluster identifier of the cluster to access. - // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/redshift/v1beta1.Cluster + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/redshift/v1beta2.Cluster // +kubebuilder:validation:Optional ClusterIdentifier *string `json:"clusterIdentifier,omitempty" tf:"cluster_identifier,omitempty"` diff --git a/apis/redshift/v1beta1/zz_generated.conversion_hubs.go b/apis/redshift/v1beta1/zz_generated.conversion_hubs.go index bb716ef044..d283b3ec0e 100755 --- a/apis/redshift/v1beta1/zz_generated.conversion_hubs.go +++ b/apis/redshift/v1beta1/zz_generated.conversion_hubs.go @@ -9,6 +9,9 @@ package v1beta1 // Hub marks this type as a conversion hub. func (tr *AuthenticationProfile) Hub() {} +// Hub marks this type as a conversion hub. +func (tr *EndpointAccess) Hub() {} + // Hub marks this type as a conversion hub. func (tr *EventSubscription) Hub() {} diff --git a/apis/redshift/v1beta1/zz_generated.resolvers.go b/apis/redshift/v1beta1/zz_generated.resolvers.go index 1b2766f6b7..1b7ea4c0f4 100644 --- a/apis/redshift/v1beta1/zz_generated.resolvers.go +++ b/apis/redshift/v1beta1/zz_generated.resolvers.go @@ -194,7 +194,7 @@ func (mg *EndpointAccess) ResolveReferences(ctx context.Context, c client.Reader var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta2", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -251,7 +251,7 @@ func (mg *EndpointAccess) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta2", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/transfer/v1beta1/zz_generated.conversion_spokes.go b/apis/transfer/v1beta1/zz_generated.conversion_spokes.go index 833fae5ff5..7e0dd468ea 100755 --- a/apis/transfer/v1beta1/zz_generated.conversion_spokes.go +++ b/apis/transfer/v1beta1/zz_generated.conversion_spokes.go @@ -13,6 +13,26 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" ) +// ConvertTo converts this Connector to the hub type. +func (tr *Connector) ConvertTo(dstRaw conversion.Hub) error { + spokeVersion := tr.GetObjectKind().GroupVersionKind().Version + hubVersion := dstRaw.GetObjectKind().GroupVersionKind().Version + if err := ujconversion.RoundTrip(dstRaw.(resource.Terraformed), tr); err != nil { + return errors.Wrapf(err, "cannot convert from the spoke version %q to the hub version %q", spokeVersion, hubVersion) + } + return nil +} + +// ConvertFrom converts from the hub type to the Connector type. +func (tr *Connector) ConvertFrom(srcRaw conversion.Hub) error { + spokeVersion := tr.GetObjectKind().GroupVersionKind().Version + hubVersion := srcRaw.GetObjectKind().GroupVersionKind().Version + if err := ujconversion.RoundTrip(tr, srcRaw.(resource.Terraformed)); err != nil { + return errors.Wrapf(err, "cannot convert from the hub version %q to the spoke version %q", hubVersion, spokeVersion) + } + return nil +} + // ConvertTo converts this Server to the hub type. func (tr *Server) ConvertTo(dstRaw conversion.Hub) error { spokeVersion := tr.GetObjectKind().GroupVersionKind().Version diff --git a/apis/transfer/v1beta2/zz_connector_terraformed.go b/apis/transfer/v1beta2/zz_connector_terraformed.go new file mode 100755 index 0000000000..8c79b73a2c --- /dev/null +++ b/apis/transfer/v1beta2/zz_connector_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta2 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Connector +func (mg *Connector) GetTerraformResourceType() string { + return "aws_transfer_connector" +} + +// GetConnectionDetailsMapping for this Connector +func (tr *Connector) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Connector +func (tr *Connector) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Connector +func (tr *Connector) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Connector +func (tr *Connector) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Connector +func (tr *Connector) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Connector +func (tr *Connector) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Connector +func (tr *Connector) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Connector +func (tr *Connector) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Connector using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Connector) LateInitialize(attrs []byte) (bool, error) { + params := &ConnectorParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Connector) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/transfer/v1beta2/zz_connector_types.go b/apis/transfer/v1beta2/zz_connector_types.go new file mode 100755 index 0000000000..1f1047e7d7 --- /dev/null +++ b/apis/transfer/v1beta2/zz_connector_types.go @@ -0,0 +1,334 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type As2ConfigInitParameters struct { + + // Specifies weather AS2 file is compressed. The valud values are ZLIB and DISABLED. + Compression *string `json:"compression,omitempty" tf:"compression,omitempty"` + + // The algorithm that is used to encrypt the file. The valid values are AES128_CBC | AES192_CBC | AES256_CBC | NONE. + EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty" tf:"encryption_algorithm,omitempty"` + + // The unique identifier for the AS2 local profile. + LocalProfileID *string `json:"localProfileId,omitempty" tf:"local_profile_id,omitempty"` + + // Used for outbound requests to determine if a partner response for transfers is synchronous or asynchronous. The valid values are SYNC and NONE. + MdnResponse *string `json:"mdnResponse,omitempty" tf:"mdn_response,omitempty"` + + // The signing algorithm for the Mdn response. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE | DEFAULT. + MdnSigningAlgorithm *string `json:"mdnSigningAlgorithm,omitempty" tf:"mdn_signing_algorithm,omitempty"` + + // Used as the subject HTTP header attribute in AS2 messages that are being sent with the connector. + MessageSubject *string `json:"messageSubject,omitempty" tf:"message_subject,omitempty"` + + // The unique identifier for the AS2 partner profile. + PartnerProfileID *string `json:"partnerProfileId,omitempty" tf:"partner_profile_id,omitempty"` + + // The algorithm that is used to sign AS2 messages sent with the connector. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE . + SigningAlgorithm *string `json:"signingAlgorithm,omitempty" tf:"signing_algorithm,omitempty"` +} + +type As2ConfigObservation struct { + + // Specifies weather AS2 file is compressed. The valud values are ZLIB and DISABLED. + Compression *string `json:"compression,omitempty" tf:"compression,omitempty"` + + // The algorithm that is used to encrypt the file. The valid values are AES128_CBC | AES192_CBC | AES256_CBC | NONE. + EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty" tf:"encryption_algorithm,omitempty"` + + // The unique identifier for the AS2 local profile. + LocalProfileID *string `json:"localProfileId,omitempty" tf:"local_profile_id,omitempty"` + + // Used for outbound requests to determine if a partner response for transfers is synchronous or asynchronous. The valid values are SYNC and NONE. + MdnResponse *string `json:"mdnResponse,omitempty" tf:"mdn_response,omitempty"` + + // The signing algorithm for the Mdn response. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE | DEFAULT. + MdnSigningAlgorithm *string `json:"mdnSigningAlgorithm,omitempty" tf:"mdn_signing_algorithm,omitempty"` + + // Used as the subject HTTP header attribute in AS2 messages that are being sent with the connector. + MessageSubject *string `json:"messageSubject,omitempty" tf:"message_subject,omitempty"` + + // The unique identifier for the AS2 partner profile. + PartnerProfileID *string `json:"partnerProfileId,omitempty" tf:"partner_profile_id,omitempty"` + + // The algorithm that is used to sign AS2 messages sent with the connector. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE . + SigningAlgorithm *string `json:"signingAlgorithm,omitempty" tf:"signing_algorithm,omitempty"` +} + +type As2ConfigParameters struct { + + // Specifies weather AS2 file is compressed. The valud values are ZLIB and DISABLED. + // +kubebuilder:validation:Optional + Compression *string `json:"compression" tf:"compression,omitempty"` + + // The algorithm that is used to encrypt the file. The valid values are AES128_CBC | AES192_CBC | AES256_CBC | NONE. + // +kubebuilder:validation:Optional + EncryptionAlgorithm *string `json:"encryptionAlgorithm" tf:"encryption_algorithm,omitempty"` + + // The unique identifier for the AS2 local profile. + // +kubebuilder:validation:Optional + LocalProfileID *string `json:"localProfileId" tf:"local_profile_id,omitempty"` + + // Used for outbound requests to determine if a partner response for transfers is synchronous or asynchronous. The valid values are SYNC and NONE. + // +kubebuilder:validation:Optional + MdnResponse *string `json:"mdnResponse" tf:"mdn_response,omitempty"` + + // The signing algorithm for the Mdn response. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE | DEFAULT. + // +kubebuilder:validation:Optional + MdnSigningAlgorithm *string `json:"mdnSigningAlgorithm,omitempty" tf:"mdn_signing_algorithm,omitempty"` + + // Used as the subject HTTP header attribute in AS2 messages that are being sent with the connector. + // +kubebuilder:validation:Optional + MessageSubject *string `json:"messageSubject,omitempty" tf:"message_subject,omitempty"` + + // The unique identifier for the AS2 partner profile. + // +kubebuilder:validation:Optional + PartnerProfileID *string `json:"partnerProfileId" tf:"partner_profile_id,omitempty"` + + // The algorithm that is used to sign AS2 messages sent with the connector. The valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE . + // +kubebuilder:validation:Optional + SigningAlgorithm *string `json:"signingAlgorithm" tf:"signing_algorithm,omitempty"` +} + +type ConnectorInitParameters struct { + + // The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/iam/v1beta1.Role + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) + AccessRole *string `json:"accessRole,omitempty" tf:"access_role,omitempty"` + + // Reference to a Role in iam to populate accessRole. + // +kubebuilder:validation:Optional + AccessRoleRef *v1.Reference `json:"accessRoleRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate accessRole. + // +kubebuilder:validation:Optional + AccessRoleSelector *v1.Selector `json:"accessRoleSelector,omitempty" tf:"-"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + As2Config *As2ConfigInitParameters `json:"as2Config,omitempty" tf:"as2_config,omitempty"` + + // The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events. + LoggingRole *string `json:"loggingRole,omitempty" tf:"logging_role,omitempty"` + + // Name of the security policy for the connector. + SecurityPolicyName *string `json:"securityPolicyName,omitempty" tf:"security_policy_name,omitempty"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + SftpConfig *SftpConfigInitParameters `json:"sftpConfig,omitempty" tf:"sftp_config,omitempty"` + + // Key-value map of resource tags. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // The URL of the partners AS2 endpoint or SFTP endpoint. + URL *string `json:"url,omitempty" tf:"url,omitempty"` +} + +type ConnectorObservation struct { + + // The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request. + AccessRole *string `json:"accessRole,omitempty" tf:"access_role,omitempty"` + + // The ARN of the connector. + Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + As2Config *As2ConfigObservation `json:"as2Config,omitempty" tf:"as2_config,omitempty"` + + // The unique identifier for the AS2 profile or SFTP Profile. + ConnectorID *string `json:"connectorId,omitempty" tf:"connector_id,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events. + LoggingRole *string `json:"loggingRole,omitempty" tf:"logging_role,omitempty"` + + // Name of the security policy for the connector. + SecurityPolicyName *string `json:"securityPolicyName,omitempty" tf:"security_policy_name,omitempty"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + SftpConfig *SftpConfigObservation `json:"sftpConfig,omitempty" tf:"sftp_config,omitempty"` + + // Key-value map of resource tags. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // +mapType=granular + TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"` + + // The URL of the partners AS2 endpoint or SFTP endpoint. + URL *string `json:"url,omitempty" tf:"url,omitempty"` +} + +type ConnectorParameters struct { + + // The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/iam/v1beta1.Role + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) + // +kubebuilder:validation:Optional + AccessRole *string `json:"accessRole,omitempty" tf:"access_role,omitempty"` + + // Reference to a Role in iam to populate accessRole. + // +kubebuilder:validation:Optional + AccessRoleRef *v1.Reference `json:"accessRoleRef,omitempty" tf:"-"` + + // Selector for a Role in iam to populate accessRole. + // +kubebuilder:validation:Optional + AccessRoleSelector *v1.Selector `json:"accessRoleSelector,omitempty" tf:"-"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + // +kubebuilder:validation:Optional + As2Config *As2ConfigParameters `json:"as2Config,omitempty" tf:"as2_config,omitempty"` + + // The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events. + // +kubebuilder:validation:Optional + LoggingRole *string `json:"loggingRole,omitempty" tf:"logging_role,omitempty"` + + // Region is the region you'd like your resource to be created in. + // +upjet:crd:field:TFTag=- + // +kubebuilder:validation:Required + Region *string `json:"region" tf:"-"` + + // Name of the security policy for the connector. + // +kubebuilder:validation:Optional + SecurityPolicyName *string `json:"securityPolicyName,omitempty" tf:"security_policy_name,omitempty"` + + // Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below. + // +kubebuilder:validation:Optional + SftpConfig *SftpConfigParameters `json:"sftpConfig,omitempty" tf:"sftp_config,omitempty"` + + // Key-value map of resource tags. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // The URL of the partners AS2 endpoint or SFTP endpoint. + // +kubebuilder:validation:Optional + URL *string `json:"url,omitempty" tf:"url,omitempty"` +} + +type SftpConfigInitParameters struct { + + // A list of public portion of the host key, or keys, that are used to authenticate the user to the external server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + // +listType=set + TrustedHostKeys []*string `json:"trustedHostKeys,omitempty" tf:"trusted_host_keys,omitempty"` + + // The identifier for the secret (in AWS Secrets Manager) that contains the SFTP user's private key, password, or both. The identifier can be either the Amazon Resource Name (ARN) or the name of the secret. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/secretsmanager/v1beta1.Secret + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + UserSecretID *string `json:"userSecretId,omitempty" tf:"user_secret_id,omitempty"` + + // Reference to a Secret in secretsmanager to populate userSecretId. + // +kubebuilder:validation:Optional + UserSecretIDRef *v1.Reference `json:"userSecretIdRef,omitempty" tf:"-"` + + // Selector for a Secret in secretsmanager to populate userSecretId. + // +kubebuilder:validation:Optional + UserSecretIDSelector *v1.Selector `json:"userSecretIdSelector,omitempty" tf:"-"` +} + +type SftpConfigObservation struct { + + // A list of public portion of the host key, or keys, that are used to authenticate the user to the external server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + // +listType=set + TrustedHostKeys []*string `json:"trustedHostKeys,omitempty" tf:"trusted_host_keys,omitempty"` + + // The identifier for the secret (in AWS Secrets Manager) that contains the SFTP user's private key, password, or both. The identifier can be either the Amazon Resource Name (ARN) or the name of the secret. + UserSecretID *string `json:"userSecretId,omitempty" tf:"user_secret_id,omitempty"` +} + +type SftpConfigParameters struct { + + // A list of public portion of the host key, or keys, that are used to authenticate the user to the external server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + // +kubebuilder:validation:Optional + // +listType=set + TrustedHostKeys []*string `json:"trustedHostKeys,omitempty" tf:"trusted_host_keys,omitempty"` + + // The identifier for the secret (in AWS Secrets Manager) that contains the SFTP user's private key, password, or both. The identifier can be either the Amazon Resource Name (ARN) or the name of the secret. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/secretsmanager/v1beta1.Secret + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + UserSecretID *string `json:"userSecretId,omitempty" tf:"user_secret_id,omitempty"` + + // Reference to a Secret in secretsmanager to populate userSecretId. + // +kubebuilder:validation:Optional + UserSecretIDRef *v1.Reference `json:"userSecretIdRef,omitempty" tf:"-"` + + // Selector for a Secret in secretsmanager to populate userSecretId. + // +kubebuilder:validation:Optional + UserSecretIDSelector *v1.Selector `json:"userSecretIdSelector,omitempty" tf:"-"` +} + +// ConnectorSpec defines the desired state of Connector +type ConnectorSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ConnectorParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ConnectorInitParameters `json:"initProvider,omitempty"` +} + +// ConnectorStatus defines the observed state of Connector. +type ConnectorStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ConnectorObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status + +// Connector is the Schema for the Connectors API. Provides a AWS Transfer AS2 Connector Resource +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws} +type Connector struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.url) || (has(self.initProvider) && has(self.initProvider.url))",message="spec.forProvider.url is a required parameter" + Spec ConnectorSpec `json:"spec"` + Status ConnectorStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ConnectorList contains a list of Connectors +type ConnectorList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Connector `json:"items"` +} + +// Repository type metadata. +var ( + Connector_Kind = "Connector" + Connector_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Connector_Kind}.String() + Connector_KindAPIVersion = Connector_Kind + "." + CRDGroupVersion.String() + Connector_GroupVersionKind = CRDGroupVersion.WithKind(Connector_Kind) +) + +func init() { + SchemeBuilder.Register(&Connector{}, &ConnectorList{}) +} diff --git a/apis/transfer/v1beta2/zz_generated.conversion_hubs.go b/apis/transfer/v1beta2/zz_generated.conversion_hubs.go index af012d5586..b3e6b7109c 100755 --- a/apis/transfer/v1beta2/zz_generated.conversion_hubs.go +++ b/apis/transfer/v1beta2/zz_generated.conversion_hubs.go @@ -6,6 +6,9 @@ package v1beta2 +// Hub marks this type as a conversion hub. +func (tr *Connector) Hub() {} + // Hub marks this type as a conversion hub. func (tr *Server) Hub() {} diff --git a/apis/transfer/v1beta2/zz_generated.deepcopy.go b/apis/transfer/v1beta2/zz_generated.deepcopy.go index eb4a746558..2d73238011 100644 --- a/apis/transfer/v1beta2/zz_generated.deepcopy.go +++ b/apis/transfer/v1beta2/zz_generated.deepcopy.go @@ -13,6 +13,504 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *As2ConfigInitParameters) DeepCopyInto(out *As2ConfigInitParameters) { + *out = *in + if in.Compression != nil { + in, out := &in.Compression, &out.Compression + *out = new(string) + **out = **in + } + if in.EncryptionAlgorithm != nil { + in, out := &in.EncryptionAlgorithm, &out.EncryptionAlgorithm + *out = new(string) + **out = **in + } + if in.LocalProfileID != nil { + in, out := &in.LocalProfileID, &out.LocalProfileID + *out = new(string) + **out = **in + } + if in.MdnResponse != nil { + in, out := &in.MdnResponse, &out.MdnResponse + *out = new(string) + **out = **in + } + if in.MdnSigningAlgorithm != nil { + in, out := &in.MdnSigningAlgorithm, &out.MdnSigningAlgorithm + *out = new(string) + **out = **in + } + if in.MessageSubject != nil { + in, out := &in.MessageSubject, &out.MessageSubject + *out = new(string) + **out = **in + } + if in.PartnerProfileID != nil { + in, out := &in.PartnerProfileID, &out.PartnerProfileID + *out = new(string) + **out = **in + } + if in.SigningAlgorithm != nil { + in, out := &in.SigningAlgorithm, &out.SigningAlgorithm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new As2ConfigInitParameters. +func (in *As2ConfigInitParameters) DeepCopy() *As2ConfigInitParameters { + if in == nil { + return nil + } + out := new(As2ConfigInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *As2ConfigObservation) DeepCopyInto(out *As2ConfigObservation) { + *out = *in + if in.Compression != nil { + in, out := &in.Compression, &out.Compression + *out = new(string) + **out = **in + } + if in.EncryptionAlgorithm != nil { + in, out := &in.EncryptionAlgorithm, &out.EncryptionAlgorithm + *out = new(string) + **out = **in + } + if in.LocalProfileID != nil { + in, out := &in.LocalProfileID, &out.LocalProfileID + *out = new(string) + **out = **in + } + if in.MdnResponse != nil { + in, out := &in.MdnResponse, &out.MdnResponse + *out = new(string) + **out = **in + } + if in.MdnSigningAlgorithm != nil { + in, out := &in.MdnSigningAlgorithm, &out.MdnSigningAlgorithm + *out = new(string) + **out = **in + } + if in.MessageSubject != nil { + in, out := &in.MessageSubject, &out.MessageSubject + *out = new(string) + **out = **in + } + if in.PartnerProfileID != nil { + in, out := &in.PartnerProfileID, &out.PartnerProfileID + *out = new(string) + **out = **in + } + if in.SigningAlgorithm != nil { + in, out := &in.SigningAlgorithm, &out.SigningAlgorithm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new As2ConfigObservation. +func (in *As2ConfigObservation) DeepCopy() *As2ConfigObservation { + if in == nil { + return nil + } + out := new(As2ConfigObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *As2ConfigParameters) DeepCopyInto(out *As2ConfigParameters) { + *out = *in + if in.Compression != nil { + in, out := &in.Compression, &out.Compression + *out = new(string) + **out = **in + } + if in.EncryptionAlgorithm != nil { + in, out := &in.EncryptionAlgorithm, &out.EncryptionAlgorithm + *out = new(string) + **out = **in + } + if in.LocalProfileID != nil { + in, out := &in.LocalProfileID, &out.LocalProfileID + *out = new(string) + **out = **in + } + if in.MdnResponse != nil { + in, out := &in.MdnResponse, &out.MdnResponse + *out = new(string) + **out = **in + } + if in.MdnSigningAlgorithm != nil { + in, out := &in.MdnSigningAlgorithm, &out.MdnSigningAlgorithm + *out = new(string) + **out = **in + } + if in.MessageSubject != nil { + in, out := &in.MessageSubject, &out.MessageSubject + *out = new(string) + **out = **in + } + if in.PartnerProfileID != nil { + in, out := &in.PartnerProfileID, &out.PartnerProfileID + *out = new(string) + **out = **in + } + if in.SigningAlgorithm != nil { + in, out := &in.SigningAlgorithm, &out.SigningAlgorithm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new As2ConfigParameters. +func (in *As2ConfigParameters) DeepCopy() *As2ConfigParameters { + if in == nil { + return nil + } + out := new(As2ConfigParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Connector) DeepCopyInto(out *Connector) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connector. +func (in *Connector) DeepCopy() *Connector { + if in == nil { + return nil + } + out := new(Connector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Connector) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorInitParameters) DeepCopyInto(out *ConnectorInitParameters) { + *out = *in + if in.AccessRole != nil { + in, out := &in.AccessRole, &out.AccessRole + *out = new(string) + **out = **in + } + if in.AccessRoleRef != nil { + in, out := &in.AccessRoleRef, &out.AccessRoleRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.AccessRoleSelector != nil { + in, out := &in.AccessRoleSelector, &out.AccessRoleSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.As2Config != nil { + in, out := &in.As2Config, &out.As2Config + *out = new(As2ConfigInitParameters) + (*in).DeepCopyInto(*out) + } + if in.LoggingRole != nil { + in, out := &in.LoggingRole, &out.LoggingRole + *out = new(string) + **out = **in + } + if in.SecurityPolicyName != nil { + in, out := &in.SecurityPolicyName, &out.SecurityPolicyName + *out = new(string) + **out = **in + } + if in.SftpConfig != nil { + in, out := &in.SftpConfig, &out.SftpConfig + *out = new(SftpConfigInitParameters) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.URL != nil { + in, out := &in.URL, &out.URL + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorInitParameters. +func (in *ConnectorInitParameters) DeepCopy() *ConnectorInitParameters { + if in == nil { + return nil + } + out := new(ConnectorInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorList) DeepCopyInto(out *ConnectorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Connector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorList. +func (in *ConnectorList) DeepCopy() *ConnectorList { + if in == nil { + return nil + } + out := new(ConnectorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConnectorList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorObservation) DeepCopyInto(out *ConnectorObservation) { + *out = *in + if in.AccessRole != nil { + in, out := &in.AccessRole, &out.AccessRole + *out = new(string) + **out = **in + } + if in.Arn != nil { + in, out := &in.Arn, &out.Arn + *out = new(string) + **out = **in + } + if in.As2Config != nil { + in, out := &in.As2Config, &out.As2Config + *out = new(As2ConfigObservation) + (*in).DeepCopyInto(*out) + } + if in.ConnectorID != nil { + in, out := &in.ConnectorID, &out.ConnectorID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.LoggingRole != nil { + in, out := &in.LoggingRole, &out.LoggingRole + *out = new(string) + **out = **in + } + if in.SecurityPolicyName != nil { + in, out := &in.SecurityPolicyName, &out.SecurityPolicyName + *out = new(string) + **out = **in + } + if in.SftpConfig != nil { + in, out := &in.SftpConfig, &out.SftpConfig + *out = new(SftpConfigObservation) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.TagsAll != nil { + in, out := &in.TagsAll, &out.TagsAll + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.URL != nil { + in, out := &in.URL, &out.URL + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorObservation. +func (in *ConnectorObservation) DeepCopy() *ConnectorObservation { + if in == nil { + return nil + } + out := new(ConnectorObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorParameters) DeepCopyInto(out *ConnectorParameters) { + *out = *in + if in.AccessRole != nil { + in, out := &in.AccessRole, &out.AccessRole + *out = new(string) + **out = **in + } + if in.AccessRoleRef != nil { + in, out := &in.AccessRoleRef, &out.AccessRoleRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.AccessRoleSelector != nil { + in, out := &in.AccessRoleSelector, &out.AccessRoleSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.As2Config != nil { + in, out := &in.As2Config, &out.As2Config + *out = new(As2ConfigParameters) + (*in).DeepCopyInto(*out) + } + if in.LoggingRole != nil { + in, out := &in.LoggingRole, &out.LoggingRole + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SecurityPolicyName != nil { + in, out := &in.SecurityPolicyName, &out.SecurityPolicyName + *out = new(string) + **out = **in + } + if in.SftpConfig != nil { + in, out := &in.SftpConfig, &out.SftpConfig + *out = new(SftpConfigParameters) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.URL != nil { + in, out := &in.URL, &out.URL + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorParameters. +func (in *ConnectorParameters) DeepCopy() *ConnectorParameters { + if in == nil { + return nil + } + out := new(ConnectorParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorSpec) DeepCopyInto(out *ConnectorSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorSpec. +func (in *ConnectorSpec) DeepCopy() *ConnectorSpec { + if in == nil { + return nil + } + out := new(ConnectorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectorStatus) DeepCopyInto(out *ConnectorStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectorStatus. +func (in *ConnectorStatus) DeepCopy() *ConnectorStatus { + if in == nil { + return nil + } + out := new(ConnectorStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CopyStepDetailsDestinationFileLocationEFSFileLocationInitParameters) DeepCopyInto(out *CopyStepDetailsDestinationFileLocationEFSFileLocationInitParameters) { *out = *in @@ -2712,6 +3210,119 @@ func (in *ServerStatus) DeepCopy() *ServerStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SftpConfigInitParameters) DeepCopyInto(out *SftpConfigInitParameters) { + *out = *in + if in.TrustedHostKeys != nil { + in, out := &in.TrustedHostKeys, &out.TrustedHostKeys + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.UserSecretID != nil { + in, out := &in.UserSecretID, &out.UserSecretID + *out = new(string) + **out = **in + } + if in.UserSecretIDRef != nil { + in, out := &in.UserSecretIDRef, &out.UserSecretIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.UserSecretIDSelector != nil { + in, out := &in.UserSecretIDSelector, &out.UserSecretIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SftpConfigInitParameters. +func (in *SftpConfigInitParameters) DeepCopy() *SftpConfigInitParameters { + if in == nil { + return nil + } + out := new(SftpConfigInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SftpConfigObservation) DeepCopyInto(out *SftpConfigObservation) { + *out = *in + if in.TrustedHostKeys != nil { + in, out := &in.TrustedHostKeys, &out.TrustedHostKeys + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.UserSecretID != nil { + in, out := &in.UserSecretID, &out.UserSecretID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SftpConfigObservation. +func (in *SftpConfigObservation) DeepCopy() *SftpConfigObservation { + if in == nil { + return nil + } + out := new(SftpConfigObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SftpConfigParameters) DeepCopyInto(out *SftpConfigParameters) { + *out = *in + if in.TrustedHostKeys != nil { + in, out := &in.TrustedHostKeys, &out.TrustedHostKeys + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.UserSecretID != nil { + in, out := &in.UserSecretID, &out.UserSecretID + *out = new(string) + **out = **in + } + if in.UserSecretIDRef != nil { + in, out := &in.UserSecretIDRef, &out.UserSecretIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.UserSecretIDSelector != nil { + in, out := &in.UserSecretIDSelector, &out.UserSecretIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SftpConfigParameters. +func (in *SftpConfigParameters) DeepCopy() *SftpConfigParameters { + if in == nil { + return nil + } + out := new(SftpConfigParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StepsCopyStepDetailsInitParameters) DeepCopyInto(out *StepsCopyStepDetailsInitParameters) { *out = *in diff --git a/apis/transfer/v1beta2/zz_generated.managed.go b/apis/transfer/v1beta2/zz_generated.managed.go index 5573ba3c50..8de7593e1d 100644 --- a/apis/transfer/v1beta2/zz_generated.managed.go +++ b/apis/transfer/v1beta2/zz_generated.managed.go @@ -7,6 +7,66 @@ package v1beta2 import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +// GetCondition of this Connector. +func (mg *Connector) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Connector. +func (mg *Connector) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Connector. +func (mg *Connector) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Connector. +func (mg *Connector) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Connector. +func (mg *Connector) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Connector. +func (mg *Connector) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Connector. +func (mg *Connector) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Connector. +func (mg *Connector) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Connector. +func (mg *Connector) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Connector. +func (mg *Connector) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Connector. +func (mg *Connector) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Connector. +func (mg *Connector) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this Server. func (mg *Server) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) diff --git a/apis/transfer/v1beta2/zz_generated.managedlist.go b/apis/transfer/v1beta2/zz_generated.managedlist.go index 363443357a..65f783522c 100644 --- a/apis/transfer/v1beta2/zz_generated.managedlist.go +++ b/apis/transfer/v1beta2/zz_generated.managedlist.go @@ -7,6 +7,15 @@ package v1beta2 import resource "github.com/crossplane/crossplane-runtime/pkg/resource" +// GetItems of this ConnectorList. +func (l *ConnectorList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + // GetItems of this ServerList. func (l *ServerList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) diff --git a/apis/transfer/v1beta2/zz_generated.resolvers.go b/apis/transfer/v1beta2/zz_generated.resolvers.go index 875c2839e7..117d703907 100644 --- a/apis/transfer/v1beta2/zz_generated.resolvers.go +++ b/apis/transfer/v1beta2/zz_generated.resolvers.go @@ -14,12 +14,104 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - client "sigs.k8s.io/controller-runtime/pkg/client" - - // ResolveReferences of this Server. apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" ) +func (mg *Connector) ResolveReferences( // ResolveReferences of this Connector. + ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + { + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AccessRole), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.ForProvider.AccessRoleRef, + Selector: mg.Spec.ForProvider.AccessRoleSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.AccessRole") + } + mg.Spec.ForProvider.AccessRole = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.AccessRoleRef = rsp.ResolvedReference + + if mg.Spec.ForProvider.SftpConfig != nil { + { + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SftpConfig.UserSecretID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.SftpConfig.UserSecretIDRef, + Selector: mg.Spec.ForProvider.SftpConfig.UserSecretIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SftpConfig.UserSecretID") + } + mg.Spec.ForProvider.SftpConfig.UserSecretID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SftpConfig.UserSecretIDRef = rsp.ResolvedReference + + } + { + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AccessRole), + Extract: resource.ExtractParamPath("arn", true), + Reference: mg.Spec.InitProvider.AccessRoleRef, + Selector: mg.Spec.InitProvider.AccessRoleSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.AccessRole") + } + mg.Spec.InitProvider.AccessRole = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.AccessRoleRef = rsp.ResolvedReference + + if mg.Spec.InitProvider.SftpConfig != nil { + { + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SftpConfig.UserSecretID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.SftpConfig.UserSecretIDRef, + Selector: mg.Spec.InitProvider.SftpConfig.UserSecretIDSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.SftpConfig.UserSecretID") + } + mg.Spec.InitProvider.SftpConfig.UserSecretID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.SftpConfig.UserSecretIDRef = rsp.ResolvedReference + + } + + return nil +} + +// ResolveReferences of this Server. func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList diff --git a/examples-generated/transfer/v1beta2/connector.yaml b/examples-generated/transfer/v1beta2/connector.yaml new file mode 100644 index 0000000000..b5971d95d0 --- /dev/null +++ b/examples-generated/transfer/v1beta2/connector.yaml @@ -0,0 +1,24 @@ +apiVersion: transfer.aws.upbound.io/v1beta2 +kind: Connector +metadata: + annotations: + meta.upbound.io/example-id: transfer/v1beta2/connector + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + accessRoleSelector: + matchLabels: + testing.upbound.io/example-name: test + as2Config: + - compression: DISABLED + encryptionAlgorithm: AWS128_CBC + localProfileId: ${aws_transfer_profile.local.profile_id} + mdnResponse: NONE + mdnSigningAlgorithm: NONE + messageSubject: For Connector + partnerProfileId: ${aws_transfer_profile.partner.profile_id} + signingAlgorithm: NONE + region: us-west-1 + url: http://www.test.com diff --git a/go.mod b/go.mod index db031b33cd..5132820a71 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/aws/smithy-go v1.20.2 github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876fa57 github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 - github.com/crossplane/upjet v1.4.1 + github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57 github.com/go-ini/ini v1.46.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/awspolicyequivalence v1.6.0 @@ -44,6 +44,7 @@ require ( github.com/YakDriver/go-version v0.1.0 // indirect github.com/YakDriver/regexache v0.23.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect + github.com/alecthomas/kingpin/v2 v2.4.0 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect @@ -323,6 +324,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/zclconf/go-cty v1.14.3 // indirect github.com/zclconf/go-cty-yaml v1.0.3 // indirect @@ -363,5 +365,3 @@ require ( replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraform-provider-aws v0.0.0-20240523140457-101595b8576e - -replace github.com/crossplane/upjet => ../upjet diff --git a/go.sum b/go.sum index 455bd07f22..03562f0557 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,8 @@ github.com/YakDriver/regexache v0.23.0/go.mod h1:K4BZ3MYKAqSFbYWqmbsG+OzYUDyJjnM github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -422,6 +424,8 @@ github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876f github.com/crossplane/crossplane-runtime v1.16.0-rc.2.0.20240510094504-3f697876fa57/go.mod h1:Pz2tdGVMF6KDGzHZOkvKro0nKc8EzK0sb/nSA7pH4Dc= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57 h1:hyKXccOb8BepVJj79KsvwYsid5Lhlr2DojO29Sqi+rw= +github.com/crossplane/upjet v1.4.1-0.20240612123927-37c7f4e91d57/go.mod h1:wkdZf/Cvhr6PI30VdHIOjg4dX39Z5uijqnLWFk5PbGM= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= @@ -730,6 +734,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/package/crds/acm.aws.upbound.io_certificates.yaml b/package/crds/acm.aws.upbound.io_certificates.yaml index ba31ca751b..ac2b10ae25 100644 --- a/package/crds/acm.aws.upbound.io_certificates.yaml +++ b/package/crds/acm.aws.upbound.io_certificates.yaml @@ -871,6 +871,82 @@ spec: certificateAuthorityArn: description: ARN of an ACM PCA type: string + certificateAuthorityArnRef: + description: Reference to a CertificateAuthority in acmpca to + populate certificateAuthorityArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + certificateAuthorityArnSelector: + description: Selector for a CertificateAuthority in acmpca to + populate certificateAuthorityArn. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object certificateBody: description: Certificate's PEM-formatted public key type: string @@ -980,6 +1056,82 @@ spec: certificateAuthorityArn: description: ARN of an ACM PCA type: string + certificateAuthorityArnRef: + description: Reference to a CertificateAuthority in acmpca to + populate certificateAuthorityArn. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + certificateAuthorityArnSelector: + description: Selector for a CertificateAuthority in acmpca to + populate certificateAuthorityArn. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object certificateBody: description: Certificate's PEM-formatted public key type: string diff --git a/package/crds/opensearch.aws.upbound.io_domains.yaml b/package/crds/opensearch.aws.upbound.io_domains.yaml index f68bdc2d32..3cf944a938 100644 --- a/package/crds/opensearch.aws.upbound.io_domains.yaml +++ b/package/crds/opensearch.aws.upbound.io_domains.yaml @@ -2525,6 +2525,80 @@ spec: service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object engineVersion: description: while Elasticsearch has elasticsearch_version @@ -2697,6 +2771,85 @@ spec: or removing this configuration forces a new resource (documentation). Detailed below. properties: + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate + securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to + populate securityGroupIds. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object securityGroupIds: description: List of VPC Security Group IDs to be applied to the OpenSearch domain endpoints. If omitted, the default @@ -2705,6 +2858,84 @@ spec: type: string type: array x-kubernetes-list-type: set + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subnetIds: description: List of VPC Subnet IDs for the OpenSearch domain endpoints to be created in. @@ -2993,6 +3224,80 @@ spec: service KMS key. Note that KMS will accept a KMS key ID but will return the key ARN. type: string + kmsKeyIdRef: + description: Reference to a Key in kms to populate kmsKeyId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + kmsKeyIdSelector: + description: Selector for a Key in kms to populate kmsKeyId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object engineVersion: description: while Elasticsearch has elasticsearch_version @@ -3161,6 +3466,85 @@ spec: or removing this configuration forces a new resource (documentation). Detailed below. properties: + securityGroupIdRefs: + description: References to SecurityGroup in ec2 to populate + securityGroupIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + securityGroupIdSelector: + description: Selector for a list of SecurityGroup in ec2 to + populate securityGroupIds. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object securityGroupIds: description: List of VPC Security Group IDs to be applied to the OpenSearch domain endpoints. If omitted, the default @@ -3169,6 +3553,84 @@ spec: type: string type: array x-kubernetes-list-type: set + subnetIdRefs: + description: References to Subnet in ec2 to populate subnetIds. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + subnetIdSelector: + description: Selector for a list of Subnet in ec2 to populate + subnetIds. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subnetIds: description: List of VPC Subnet IDs for the OpenSearch domain endpoints to be created in. diff --git a/package/crds/transfer.aws.upbound.io_connectors.yaml b/package/crds/transfer.aws.upbound.io_connectors.yaml index 9126a3b921..054e18ebe7 100644 --- a/package/crds/transfer.aws.upbound.io_connectors.yaml +++ b/package/crds/transfer.aws.upbound.io_connectors.yaml @@ -896,3 +896,869 @@ spec: storage: true subresources: status: {} + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: Connector is the Schema for the Connectors API. Provides a AWS + Transfer AS2 Connector Resource + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ConnectorSpec defines the desired state of Connector + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + accessRole: + description: The IAM Role which provides read and write access + to the parent directory of the file location mentioned in the + StartFileTransfer request. + type: string + accessRoleRef: + description: Reference to a Role in iam to populate accessRole. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + accessRoleSelector: + description: Selector for a Role in iam to populate accessRole. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + as2Config: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + compression: + description: Specifies weather AS2 file is compressed. The + valud values are ZLIB and DISABLED. + type: string + encryptionAlgorithm: + description: The algorithm that is used to encrypt the file. + The valid values are AES128_CBC | AES192_CBC | AES256_CBC + | NONE. + type: string + localProfileId: + description: The unique identifier for the AS2 local profile. + type: string + mdnResponse: + description: Used for outbound requests to determine if a + partner response for transfers is synchronous or asynchronous. + The valid values are SYNC and NONE. + type: string + mdnSigningAlgorithm: + description: The signing algorithm for the Mdn response. The + valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE + | DEFAULT. + type: string + messageSubject: + description: Used as the subject HTTP header attribute in + AS2 messages that are being sent with the connector. + type: string + partnerProfileId: + description: The unique identifier for the AS2 partner profile. + type: string + signingAlgorithm: + description: The algorithm that is used to sign AS2 messages + sent with the connector. The valid values are SHA256 | SHA384 + | SHA512 | SHA1 | NONE . + type: string + type: object + loggingRole: + description: The IAM Role which is required for allowing the connector + to turn on CloudWatch logging for Amazon S3 events. + type: string + region: + description: Region is the region you'd like your resource to + be created in. + type: string + securityPolicyName: + description: Name of the security policy for the connector. + type: string + sftpConfig: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + trustedHostKeys: + description: A list of public portion of the host key, or + keys, that are used to authenticate the user to the external + server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + items: + type: string + type: array + x-kubernetes-list-type: set + userSecretId: + description: The identifier for the secret (in AWS Secrets + Manager) that contains the SFTP user's private key, password, + or both. The identifier can be either the Amazon Resource + Name (ARN) or the name of the secret. + type: string + userSecretIdRef: + description: Reference to a Secret in secretsmanager to populate + userSecretId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + userSecretIdSelector: + description: Selector for a Secret in secretsmanager to populate + userSecretId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + url: + description: The URL of the partners AS2 endpoint or SFTP endpoint. + type: string + required: + - region + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + accessRole: + description: The IAM Role which provides read and write access + to the parent directory of the file location mentioned in the + StartFileTransfer request. + type: string + accessRoleRef: + description: Reference to a Role in iam to populate accessRole. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + accessRoleSelector: + description: Selector for a Role in iam to populate accessRole. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + as2Config: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + compression: + description: Specifies weather AS2 file is compressed. The + valud values are ZLIB and DISABLED. + type: string + encryptionAlgorithm: + description: The algorithm that is used to encrypt the file. + The valid values are AES128_CBC | AES192_CBC | AES256_CBC + | NONE. + type: string + localProfileId: + description: The unique identifier for the AS2 local profile. + type: string + mdnResponse: + description: Used for outbound requests to determine if a + partner response for transfers is synchronous or asynchronous. + The valid values are SYNC and NONE. + type: string + mdnSigningAlgorithm: + description: The signing algorithm for the Mdn response. The + valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE + | DEFAULT. + type: string + messageSubject: + description: Used as the subject HTTP header attribute in + AS2 messages that are being sent with the connector. + type: string + partnerProfileId: + description: The unique identifier for the AS2 partner profile. + type: string + signingAlgorithm: + description: The algorithm that is used to sign AS2 messages + sent with the connector. The valid values are SHA256 | SHA384 + | SHA512 | SHA1 | NONE . + type: string + type: object + loggingRole: + description: The IAM Role which is required for allowing the connector + to turn on CloudWatch logging for Amazon S3 events. + type: string + securityPolicyName: + description: Name of the security policy for the connector. + type: string + sftpConfig: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + trustedHostKeys: + description: A list of public portion of the host key, or + keys, that are used to authenticate the user to the external + server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + items: + type: string + type: array + x-kubernetes-list-type: set + userSecretId: + description: The identifier for the secret (in AWS Secrets + Manager) that contains the SFTP user's private key, password, + or both. The identifier can be either the Amazon Resource + Name (ARN) or the name of the secret. + type: string + userSecretIdRef: + description: Reference to a Secret in secretsmanager to populate + userSecretId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + userSecretIdSelector: + description: Selector for a Secret in secretsmanager to populate + userSecretId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + url: + description: The URL of the partners AS2 endpoint or SFTP endpoint. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.url is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.url) + || (has(self.initProvider) && has(self.initProvider.url))' + status: + description: ConnectorStatus defines the observed state of Connector. + properties: + atProvider: + properties: + accessRole: + description: The IAM Role which provides read and write access + to the parent directory of the file location mentioned in the + StartFileTransfer request. + type: string + arn: + description: The ARN of the connector. + type: string + as2Config: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + compression: + description: Specifies weather AS2 file is compressed. The + valud values are ZLIB and DISABLED. + type: string + encryptionAlgorithm: + description: The algorithm that is used to encrypt the file. + The valid values are AES128_CBC | AES192_CBC | AES256_CBC + | NONE. + type: string + localProfileId: + description: The unique identifier for the AS2 local profile. + type: string + mdnResponse: + description: Used for outbound requests to determine if a + partner response for transfers is synchronous or asynchronous. + The valid values are SYNC and NONE. + type: string + mdnSigningAlgorithm: + description: The signing algorithm for the Mdn response. The + valid values are SHA256 | SHA384 | SHA512 | SHA1 | NONE + | DEFAULT. + type: string + messageSubject: + description: Used as the subject HTTP header attribute in + AS2 messages that are being sent with the connector. + type: string + partnerProfileId: + description: The unique identifier for the AS2 partner profile. + type: string + signingAlgorithm: + description: The algorithm that is used to sign AS2 messages + sent with the connector. The valid values are SHA256 | SHA384 + | SHA512 | SHA1 | NONE . + type: string + type: object + connectorId: + description: The unique identifier for the AS2 profile or SFTP + Profile. + type: string + id: + type: string + loggingRole: + description: The IAM Role which is required for allowing the connector + to turn on CloudWatch logging for Amazon S3 events. + type: string + securityPolicyName: + description: Name of the security policy for the connector. + type: string + sftpConfig: + description: Either SFTP or AS2 is configured.The parameters to + configure for the connector object. Fields documented below. + properties: + trustedHostKeys: + description: A list of public portion of the host key, or + keys, that are used to authenticate the user to the external + server to which you are connecting.(https://docs.aws.amazon.com/transfer/latest/userguide/API_SftpConnectorConfig.html) + items: + type: string + type: array + x-kubernetes-list-type: set + userSecretId: + description: The identifier for the secret (in AWS Secrets + Manager) that contains the SFTP user's private key, password, + or both. The identifier can be either the Amazon Resource + Name (ARN) or the name of the secret. + type: string + type: object + tags: + additionalProperties: + type: string + description: Key-value map of resource tags. + type: object + x-kubernetes-map-type: granular + tagsAll: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + url: + description: The URL of the partners AS2 endpoint or SFTP endpoint. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {}