From 075e65cf7ed806e94c00fc9bb5752b5093b77501 Mon Sep 17 00:00:00 2001 From: Matt Bush Date: Sat, 30 Dec 2023 19:28:49 -0800 Subject: [PATCH] codegen --- .../v1beta1/zz_application_types.go | 74 ++- .../v1beta1/zz_generated.deepcopy.go | 68 +++ .../v1beta1/zz_generated.resolvers.go | 188 +++++- ...alyticsv2.aws.upbound.io_applications.yaml | 540 ++++++++++++++++++ 4 files changed, 838 insertions(+), 32 deletions(-) diff --git a/apis/kinesisanalyticsv2/v1beta1/zz_application_types.go b/apis/kinesisanalyticsv2/v1beta1/zz_application_types.go index 55d5cebb5f..99f1c62b60 100755 --- a/apis/kinesisanalyticsv2/v1beta1/zz_application_types.go +++ b/apis/kinesisanalyticsv2/v1beta1/zz_application_types.go @@ -585,7 +585,17 @@ type InputInitParameters struct { type InputLambdaProcessorInitParameters struct { // The ARN of the Lambda function that operates on records in the stream. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/lambda/v1beta1.Function + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() ResourceArn *string `json:"resourceArn,omitempty" tf:"resource_arn,omitempty"` + + // Reference to a Function in lambda to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnRef *v1.Reference `json:"resourceArnRef,omitempty" tf:"-"` + + // Selector for a Function in lambda to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnSelector *v1.Selector `json:"resourceArnSelector,omitempty" tf:"-"` } type InputLambdaProcessorObservation struct { @@ -597,8 +607,18 @@ type InputLambdaProcessorObservation struct { type InputLambdaProcessorParameters struct { // The ARN of the Lambda function that operates on records in the stream. + // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/lambda/v1beta1.Function + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional - ResourceArn *string `json:"resourceArn" tf:"resource_arn,omitempty"` + ResourceArn *string `json:"resourceArn,omitempty" tf:"resource_arn,omitempty"` + + // Reference to a Function in lambda to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnRef *v1.Reference `json:"resourceArnRef,omitempty" tf:"-"` + + // Selector for a Function in lambda to populate resourceArn. + // +kubebuilder:validation:Optional + ResourceArnSelector *v1.Selector `json:"resourceArnSelector,omitempty" tf:"-"` } type InputObservation struct { @@ -1549,7 +1569,7 @@ type S3ReferenceDataSourceInitParameters struct { // The ARN for the S3 bucket containing the application code. // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() BucketArn *string `json:"bucketArn,omitempty" tf:"bucket_arn,omitempty"` // Reference to a Bucket in s3 to populate bucketArn. @@ -1577,7 +1597,7 @@ type S3ReferenceDataSourceParameters struct { // The ARN for the S3 bucket containing the application code. // +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta1.Bucket - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true) + // +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor() // +kubebuilder:validation:Optional BucketArn *string `json:"bucketArn,omitempty" tf:"bucket_arn,omitempty"` @@ -1635,11 +1655,33 @@ type SQLApplicationConfigurationParameters struct { type VPCConfigurationInitParameters 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:"-"` + // The Security Group IDs used by the VPC configuration. + // +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:"-"` + // The Subnet IDs used by the VPC configuration. + // +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"` } @@ -1663,15 +1705,37 @@ type VPCConfigurationObservation struct { type VPCConfigurationParameters 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:"-"` + // The Security Group IDs used by the VPC configuration. + // +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" tf:"security_group_ids,omitempty"` + 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:"-"` // The Subnet IDs used by the VPC configuration. + // +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" tf:"subnet_ids,omitempty"` + SubnetIds []*string `json:"subnetIds,omitempty" tf:"subnet_ids,omitempty"` } // ApplicationSpec defines the desired state of Application diff --git a/apis/kinesisanalyticsv2/v1beta1/zz_generated.deepcopy.go b/apis/kinesisanalyticsv2/v1beta1/zz_generated.deepcopy.go index dd9ee65499..fb2d812c97 100644 --- a/apis/kinesisanalyticsv2/v1beta1/zz_generated.deepcopy.go +++ b/apis/kinesisanalyticsv2/v1beta1/zz_generated.deepcopy.go @@ -1700,6 +1700,16 @@ func (in *InputLambdaProcessorInitParameters) DeepCopyInto(out *InputLambdaProce *out = new(string) **out = **in } + if in.ResourceArnRef != nil { + in, out := &in.ResourceArnRef, &out.ResourceArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ResourceArnSelector != nil { + in, out := &in.ResourceArnSelector, &out.ResourceArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InputLambdaProcessorInitParameters. @@ -1740,6 +1750,16 @@ func (in *InputLambdaProcessorParameters) DeepCopyInto(out *InputLambdaProcessor *out = new(string) **out = **in } + if in.ResourceArnRef != nil { + in, out := &in.ResourceArnRef, &out.ResourceArnRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ResourceArnSelector != nil { + in, out := &in.ResourceArnSelector, &out.ResourceArnSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InputLambdaProcessorParameters. @@ -4335,6 +4355,18 @@ func (in *SQLApplicationConfigurationParameters) DeepCopy() *SQLApplicationConfi // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCConfigurationInitParameters) DeepCopyInto(out *VPCConfigurationInitParameters) { *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)) @@ -4346,6 +4378,18 @@ func (in *VPCConfigurationInitParameters) DeepCopyInto(out *VPCConfigurationInit } } } + 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)) @@ -4419,6 +4463,18 @@ func (in *VPCConfigurationObservation) DeepCopy() *VPCConfigurationObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCConfigurationParameters) DeepCopyInto(out *VPCConfigurationParameters) { *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)) @@ -4430,6 +4486,18 @@ func (in *VPCConfigurationParameters) DeepCopyInto(out *VPCConfigurationParamete } } } + 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/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go b/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go index 825fcbdc33..cd9444a501 100644 --- a/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go +++ b/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go @@ -10,11 +10,12 @@ import ( reference "github.com/crossplane/crossplane-runtime/pkg/reference" resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - v1beta14 "github.com/upbound/provider-aws/apis/cloudwatchlogs/v1beta1" - v1beta12 "github.com/upbound/provider-aws/apis/firehose/v1beta1" - v1beta15 "github.com/upbound/provider-aws/apis/iam/v1beta1" - v1beta11 "github.com/upbound/provider-aws/apis/kinesis/v1beta1" - v1beta13 "github.com/upbound/provider-aws/apis/lambda/v1beta1" + v1beta15 "github.com/upbound/provider-aws/apis/cloudwatchlogs/v1beta1" + v1beta14 "github.com/upbound/provider-aws/apis/ec2/v1beta1" + v1beta13 "github.com/upbound/provider-aws/apis/firehose/v1beta1" + v1beta16 "github.com/upbound/provider-aws/apis/iam/v1beta1" + v1beta12 "github.com/upbound/provider-aws/apis/kinesis/v1beta1" + v1beta11 "github.com/upbound/provider-aws/apis/lambda/v1beta1" v1beta1 "github.com/upbound/provider-aws/apis/s3/v1beta1" common "github.com/upbound/provider-aws/config/common" client "sigs.k8s.io/controller-runtime/pkg/client" @@ -25,6 +26,7 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error for i3 := 0; i3 < len(mg.Spec.ForProvider.ApplicationConfiguration); i3++ { @@ -75,6 +77,32 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e } } } + for i3 := 0; i3 < len(mg.Spec.ForProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration); i4++ { + for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { + for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration); i6++ { + for i7 := 0; i7 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor); i7++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnRef, + Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnSelector, + To: reference.To{ + List: &v1beta11.FunctionList{}, + Managed: &v1beta11.Function{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn") + } + mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnRef = rsp.ResolvedReference + + } + } + } + } + } for i3 := 0; i3 < len(mg.Spec.ForProvider.ApplicationConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { @@ -85,8 +113,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArnRef, Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta11.StreamList{}, - Managed: &v1beta11.Stream{}, + List: &v1beta12.StreamList{}, + Managed: &v1beta12.Stream{}, }, }) if err != nil { @@ -109,8 +137,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArnRef, Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta12.DeliveryStreamList{}, - Managed: &v1beta12.DeliveryStream{}, + List: &v1beta13.DeliveryStreamList{}, + Managed: &v1beta13.DeliveryStream{}, }, }) if err != nil { @@ -133,8 +161,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArnRef, Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta13.FunctionList{}, - Managed: &v1beta13.Function{}, + List: &v1beta11.FunctionList{}, + Managed: &v1beta11.Function{}, }, }) if err != nil { @@ -153,7 +181,7 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource); i6++ { rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArn), - Extract: resource.ExtractParamPath("arn", true), + Extract: common.ARNExtractor(), Reference: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArnRef, Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArnSelector, To: reference.To{ @@ -171,6 +199,46 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e } } } + for i3 := 0; i3 < len(mg.Spec.ForProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration); i4++ { + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDRefs, + Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDSelector, + To: reference.To{ + List: &v1beta14.SecurityGroupList{}, + Managed: &v1beta14.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds") + } + mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDRefs = mrsp.ResolvedReferences + + } + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration); i4++ { + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDRefs, + Selector: mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDSelector, + To: reference.To{ + List: &v1beta14.SubnetList{}, + Managed: &v1beta14.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds") + } + mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDRefs = mrsp.ResolvedReferences + + } + } for i3 := 0; i3 < len(mg.Spec.ForProvider.CloudwatchLoggingOptions); i3++ { rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].LogStreamArn), @@ -178,8 +246,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].LogStreamArnRef, Selector: mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].LogStreamArnSelector, To: reference.To{ - List: &v1beta14.StreamList{}, - Managed: &v1beta14.Stream{}, + List: &v1beta15.StreamList{}, + Managed: &v1beta15.Stream{}, }, }) if err != nil { @@ -195,8 +263,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.ForProvider.ServiceExecutionRoleRef, Selector: mg.Spec.ForProvider.ServiceExecutionRoleSelector, To: reference.To{ - List: &v1beta15.RoleList{}, - Managed: &v1beta15.Role{}, + List: &v1beta16.RoleList{}, + Managed: &v1beta16.Role{}, }, }) if err != nil { @@ -253,6 +321,32 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e } } } + for i3 := 0; i3 < len(mg.Spec.InitProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration); i4++ { + for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { + for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration); i6++ { + for i7 := 0; i7 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor); i7++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn), + Extract: common.ARNExtractor(), + Reference: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnRef, + Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnSelector, + To: reference.To{ + List: &v1beta11.FunctionList{}, + Managed: &v1beta11.Function{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn") + } + mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].InputProcessingConfiguration[i6].InputLambdaProcessor[i7].ResourceArnRef = rsp.ResolvedReference + + } + } + } + } + } for i3 := 0; i3 < len(mg.Spec.InitProvider.ApplicationConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { @@ -263,8 +357,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArnRef, Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta11.StreamList{}, - Managed: &v1beta11.Stream{}, + List: &v1beta12.StreamList{}, + Managed: &v1beta12.Stream{}, }, }) if err != nil { @@ -287,8 +381,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArnRef, Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta12.DeliveryStreamList{}, - Managed: &v1beta12.DeliveryStream{}, + List: &v1beta13.DeliveryStreamList{}, + Managed: &v1beta13.DeliveryStream{}, }, }) if err != nil { @@ -311,8 +405,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArnRef, Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArnSelector, To: reference.To{ - List: &v1beta13.FunctionList{}, - Managed: &v1beta13.Function{}, + List: &v1beta11.FunctionList{}, + Managed: &v1beta11.Function{}, }, }) if err != nil { @@ -331,7 +425,7 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource); i6++ { rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArn), - Extract: resource.ExtractParamPath("arn", true), + Extract: common.ARNExtractor(), Reference: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArnRef, Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArnSelector, To: reference.To{ @@ -349,6 +443,46 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e } } } + for i3 := 0; i3 < len(mg.Spec.InitProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration); i4++ { + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDRefs, + Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDSelector, + To: reference.To{ + List: &v1beta14.SecurityGroupList{}, + Managed: &v1beta14.SecurityGroup{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds") + } + mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SecurityGroupIDRefs = mrsp.ResolvedReferences + + } + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.ApplicationConfiguration); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration); i4++ { + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDRefs, + Selector: mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDSelector, + To: reference.To{ + List: &v1beta14.SubnetList{}, + Managed: &v1beta14.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds") + } + mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ApplicationConfiguration[i3].VPCConfiguration[i4].SubnetIDRefs = mrsp.ResolvedReferences + + } + } for i3 := 0; i3 < len(mg.Spec.InitProvider.CloudwatchLoggingOptions); i3++ { rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].LogStreamArn), @@ -356,8 +490,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].LogStreamArnRef, Selector: mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].LogStreamArnSelector, To: reference.To{ - List: &v1beta14.StreamList{}, - Managed: &v1beta14.Stream{}, + List: &v1beta15.StreamList{}, + Managed: &v1beta15.Stream{}, }, }) if err != nil { @@ -373,8 +507,8 @@ func (mg *Application) ResolveReferences(ctx context.Context, c client.Reader) e Reference: mg.Spec.InitProvider.ServiceExecutionRoleRef, Selector: mg.Spec.InitProvider.ServiceExecutionRoleSelector, To: reference.To{ - List: &v1beta15.RoleList{}, - Managed: &v1beta15.Role{}, + List: &v1beta16.RoleList{}, + Managed: &v1beta16.Role{}, }, }) if err != nil { diff --git a/package/crds/kinesisanalyticsv2.aws.upbound.io_applications.yaml b/package/crds/kinesisanalyticsv2.aws.upbound.io_applications.yaml index ee74d1e784..1f31feb603 100644 --- a/package/crds/kinesisanalyticsv2.aws.upbound.io_applications.yaml +++ b/package/crds/kinesisanalyticsv2.aws.upbound.io_applications.yaml @@ -506,6 +506,106 @@ spec: function that operates on records in the stream. type: string + resourceArnRef: + description: Reference to a Function + in lambda to populate resourceArn. + 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 + resourceArnSelector: + description: Selector for a Function + in lambda to populate resourceArn. + 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 type: array type: object @@ -1190,6 +1290,91 @@ spec: description: The VPC configuration of a Flink-based application. items: 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: The Security Group IDs used by the VPC configuration. @@ -1197,6 +1382,91 @@ 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: The Subnet IDs used by the VPC configuration. items: @@ -1853,6 +2123,106 @@ spec: function that operates on records in the stream. type: string + resourceArnRef: + description: Reference to a Function + in lambda to populate resourceArn. + 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 + resourceArnSelector: + description: Selector for a Function + in lambda to populate resourceArn. + 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 type: array type: object @@ -2537,6 +2907,91 @@ spec: description: The VPC configuration of a Flink-based application. items: 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: The Security Group IDs used by the VPC configuration. @@ -2544,6 +2999,91 @@ 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: The Subnet IDs used by the VPC configuration. items: