From d59c1b20e8ff67a2d6ef903ec9a1e0642fce7901 Mon Sep 17 00:00:00 2001 From: Muvaffak Onus Date: Fri, 19 Nov 2021 17:47:36 +0300 Subject: [PATCH 1/5] config: add provider-wide default for external name Signed-off-by: Muvaffak Onus --- config/overrides.go | 9 +++++++++ config/provider.go | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/overrides.go b/config/overrides.go index 4786ba34d..6a1255d3d 100644 --- a/config/overrides.go +++ b/config/overrides.go @@ -89,6 +89,15 @@ func TagsAllRemoval() tjconfig.ResourceOption { } } +// IdentifierAssignedByAWS will work for all AWS types because even if the ID +// is assigned by user, we'll see it in the TF State ID. +// The resource-specific configurations should override this whenever possible. +func IdentifierAssignedByAWS() tjconfig.ResourceOption { + return func(r *tjconfig.Resource) { + r.ExternalName = tjconfig.IdentifierFromProvider + } +} + func matches(name string, regexes map[string]string) (string, bool) { for k, v := range regexes { ok, err := regexp.MatchString(k, name) diff --git a/config/provider.go b/config/provider.go index 6d7124bcd..fe2800ba4 100644 --- a/config/provider.go +++ b/config/provider.go @@ -134,11 +134,8 @@ var includedResources = []string{ // These resources cannot be generated because of their suffixes colliding with // kubebuilder-accepted type suffixes. var skipList = []string{ - "aws_config_configuration_recorder_status$", "aws_waf_rule_group$", "aws_wafregional_rule_group$", - "aws_shield_protection_group$", - "aws_kinesis_analytics_application$", } // GetProvider returns provider configuration @@ -147,12 +144,13 @@ func GetProvider(tfProvider *schema.Provider) *tjconfig.Provider { tfProvider.ResourcesMap, "aws", "github.com/crossplane-contrib/provider-jet-aws", tjconfig.WithShortName("awsjet"), tjconfig.WithRootGroup("aws.jet.crossplane.io"), - tjconfig.WithIncludeList(includedResources), + // tjconfig.WithIncludeList(includedResources), tjconfig.WithSkipList(skipList), tjconfig.WithDefaultResourceFn(DefaultResource( GroupOverrides(), RegionAddition(), TagsAllRemoval(), + IdentifierAssignedByAWS(), )), ) From c2b019cb431566527a49e89bbb3ca42f4cc011c2 Mon Sep 17 00:00:00 2001 From: Muvaffak Onus Date: Fri, 19 Nov 2021 20:00:07 +0300 Subject: [PATCH 2/5] config: add overrides for resources that could not be included in the full set Signed-off-by: Muvaffak Onus --- config/cloudformation/config.go | 26 ++++++++++++++++++++++++ config/config/config.go | 10 ++++++++++ config/ec2/config.go | 11 +++++++++++ config/overrides.go | 35 +++++++++++++++++---------------- config/provider.go | 12 +++++++++-- go.mod | 2 +- go.sum | 4 ++-- 7 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 config/cloudformation/config.go create mode 100644 config/config/config.go diff --git a/config/cloudformation/config.go b/config/cloudformation/config.go new file mode 100644 index 000000000..30683cfc9 --- /dev/null +++ b/config/cloudformation/config.go @@ -0,0 +1,26 @@ +/* +Copyright 2021 The Crossplane Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cloudformation + +import tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" + +// Configure configures cloudformation resources. +func Configure(p *tjconfig.Provider) { + p.AddResourceConfigurator("aws_cloudformation_type", func(r *tjconfig.Resource) { + r.Kind = "CloudFormationType" + }) +} diff --git a/config/config/config.go b/config/config/config.go new file mode 100644 index 000000000..8a4173223 --- /dev/null +++ b/config/config/config.go @@ -0,0 +1,10 @@ +package config + +import tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" + +// Configure configures resources in config group. +func Configure(p *tjconfig.Provider) { + p.AddResourceConfigurator("aws_config_configuration_recorder_status", func(r *tjconfig.Resource) { + r.Kind = "AWSConfigurationRecorderStatus" + }) +} diff --git a/config/ec2/config.go b/config/ec2/config.go index 44bb88a9d..46b9b83d9 100644 --- a/config/ec2/config.go +++ b/config/ec2/config.go @@ -333,6 +333,17 @@ func Configure(p *config.Provider) { } }) + p.AddResourceConfigurator("aws_main_route_table_association", func(r *config.Resource) { + r.Kind = "MainRouteTableAssociation" + r.ExternalName = config.IdentifierFromProvider + r.References["vpc_id"] = config.Reference{ + Type: "VPC", + } + r.References["route_table_id"] = config.Reference{ + Type: "RouteTable", + } + }) + p.AddResourceConfigurator("aws_ec2_transit_gateway_route_table_propagation", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider r.References["transit_gateway_attachment_id"] = config.Reference{ diff --git a/config/overrides.go b/config/overrides.go index 6a1255d3d..d1065614d 100644 --- a/config/overrides.go +++ b/config/overrides.go @@ -28,23 +28,24 @@ import ( // GroupMap contains all overrides we'd like to make to the default group search. var GroupMap = map[string]string{ - "^aws_security_group.*": "ec2", - "^aws_subnet.*": "ec2", - "^aws_network_.*": "ec2", - "^aws_eip_.*": "ec2", - "^aws_eip$": "ec2", - "^aws_launch_template_.*": "ec2", - "^aws_launch_template$": "ec2", - "^aws_route_.*": "ec2", - "^aws_route$": "ec2", - "^aws_instance_.*": "ec2", - "^aws_instance$": "ec2", - "^aws_vpc_.*": "ec2", - "^aws_vpc$": "ec2", - "^aws_lb_.*": "elasticloadbalancing", - "^aws_lb$": "elasticloadbalancing", - "^aws_db_.*": "rds", - "^aws_db$": "rds", + "^aws_security_group.*": "ec2", + "^aws_subnet.*": "ec2", + "^aws_network_.*": "ec2", + "^aws_eip_.*": "ec2", + "^aws_eip$": "ec2", + "^aws_launch_template_.*": "ec2", + "^aws_launch_template$": "ec2", + "^aws_route_.*": "ec2", + "^aws_route$": "ec2", + "^aws_main_route_table_.*": "ec2", + "^aws_instance_.*": "ec2", + "^aws_instance$": "ec2", + "^aws_vpc_.*": "ec2", + "^aws_vpc$": "ec2", + "^aws_lb_.*": "elasticloadbalancing", + "^aws_lb$": "elasticloadbalancing", + "^aws_db_.*": "rds", + "^aws_db$": "rds", } // GroupOverrides overrides the group of the resource if it matches expressions diff --git a/config/provider.go b/config/provider.go index fe2800ba4..04ec7dd04 100644 --- a/config/provider.go +++ b/config/provider.go @@ -22,6 +22,8 @@ import ( tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" "github.com/crossplane-contrib/provider-jet-aws/config/autoscaling" + "github.com/crossplane-contrib/provider-jet-aws/config/cloudformation" + "github.com/crossplane-contrib/provider-jet-aws/config/config" "github.com/crossplane-contrib/provider-jet-aws/config/ebs" "github.com/crossplane-contrib/provider-jet-aws/config/ec2" "github.com/crossplane-contrib/provider-jet-aws/config/ecr" @@ -37,7 +39,8 @@ import ( "github.com/crossplane-contrib/provider-jet-aws/config/s3" ) -var includedResources = []string{ +// IncludedResources lists all resource patterns included in small set release. +var IncludedResources = []string{ // Elastic Load Balancing v2 (ALB/NLB) "aws_lb$", "aws_lb_listener$", @@ -92,6 +95,7 @@ var includedResources = []string{ "aws_network_interface$", "aws_route$", "aws_route_table$", + "aws_main_route_table_association$", "aws_vpc_endpoint$", "aws_vpc_ipv4_cidr_block_association$", "aws_vpc_peering_connection$", @@ -136,6 +140,8 @@ var includedResources = []string{ var skipList = []string{ "aws_waf_rule_group$", "aws_wafregional_rule_group$", + "aws_glue_connection$", // See https://github.com/crossplane-contrib/terrajet/issues/100 + "aws_mwaa_environment$", // See https://github.com/crossplane-contrib/terrajet/issues/100 } // GetProvider returns provider configuration @@ -144,7 +150,7 @@ func GetProvider(tfProvider *schema.Provider) *tjconfig.Provider { tfProvider.ResourcesMap, "aws", "github.com/crossplane-contrib/provider-jet-aws", tjconfig.WithShortName("awsjet"), tjconfig.WithRootGroup("aws.jet.crossplane.io"), - // tjconfig.WithIncludeList(includedResources), + tjconfig.WithIncludeList(IncludedResources), tjconfig.WithSkipList(skipList), tjconfig.WithDefaultResourceFn(DefaultResource( GroupOverrides(), @@ -156,6 +162,8 @@ func GetProvider(tfProvider *schema.Provider) *tjconfig.Provider { for _, configure := range []func(provider *tjconfig.Provider){ autoscaling.Configure, + cloudformation.Configure, + config.Configure, ebs.Configure, ec2.Configure, ecr.Configure, diff --git a/go.mod b/go.mod index 349c60e24..68a82233c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/aws/aws-sdk-go-v2 v0.23.0 - github.com/crossplane-contrib/terrajet v0.1.1-0.20211118151921-cbab50fcd600 + github.com/crossplane-contrib/terrajet v0.2.0 github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e github.com/crossplane/provider-aws v0.19.0 diff --git a/go.sum b/go.sum index c09639738..4b8dfecc5 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane-contrib/terrajet v0.1.1-0.20211118151921-cbab50fcd600 h1:Nv4/B9y68VDOdKusD82NjBV5L/C9JYcX8dX2kpn1Jdo= -github.com/crossplane-contrib/terrajet v0.1.1-0.20211118151921-cbab50fcd600/go.mod h1:RUsskXE63KZE7EcvZ7WK4UzBQjc1+7IhelK+/gIa/Go= +github.com/crossplane-contrib/terrajet v0.2.0 h1:frs9Uqq4yddhvfjIsKbctW+MBnKkYPi6XHYwh6vlOLw= +github.com/crossplane-contrib/terrajet v0.2.0/go.mod h1:RUsskXE63KZE7EcvZ7WK4UzBQjc1+7IhelK+/gIa/Go= github.com/crossplane/crossplane-runtime v0.14.0/go.mod h1:Bc54/KBvV9ld/tvervcnhcSzk13FYguTqmYt72Mybps= github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 h1:Sk3QurYYpy8x3c0DvTh9iGYFSv8WgdhnjCalNqNqlRI= github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513/go.mod h1:gKix9Gq5kRzVe/4XOpwlFgG7OurzrYayviJxWZakhw0= From 6c883643cc45cab06cf6f045ff6289c174d95994 Mon Sep 17 00:00:00 2001 From: Muvaffak Onus Date: Fri, 19 Nov 2021 21:05:16 +0300 Subject: [PATCH 3/5] config: fix some of the external name configurations Signed-off-by: Muvaffak Onus --- config/autoscaling/config.go | 15 +++-- config/common/common.go | 19 ++++++ config/ebs/config.go | 1 - config/ec2/config.go | 15 +++-- config/ecr/config.go | 1 + config/ecs/config.go | 35 ++++++----- config/eks/config.go | 57 +++++++++++++++++- config/elasticache/config.go | 6 +- config/elasticloadbalancing/config.go | 7 +++ config/iam/config.go | 83 +++++++++------------------ config/overrides.go | 13 +++++ config/provider.go | 13 ++++- config/rds/config.go | 5 ++ config/s3/config.go | 2 + 14 files changed, 183 insertions(+), 89 deletions(-) diff --git a/config/autoscaling/config.go b/config/autoscaling/config.go index 4eb7948b8..f81220eaf 100644 --- a/config/autoscaling/config.go +++ b/config/autoscaling/config.go @@ -26,14 +26,21 @@ import ( func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_autoscaling_group", func(r *config.Resource) { r.Kind = "AutoscalingGroup" + r.ExternalName = config.NameAsIdentifier r.References["vpc_zone_identifier"] = config.Reference{ Type: "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha1.Subnet", } - r.References["target_group_arns"] = config.Reference{ - Type: "github.com/crossplane-contrib/provider-jet-aws/apis/elasticloadbalancing/v1alpha1.TargetGroup", - } - r.UseAsync = true + + // Managed by Attachment resource. + if s, ok := r.TerraformResource.Schema["load_balancers"]; ok { + s.Optional = false + s.Computed = true + } + if s, ok := r.TerraformResource.Schema["target_group_arns"]; ok { + s.Optional = false + s.Computed = true + } }) p.AddResourceConfigurator("aws_autoscaling_attachment", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider diff --git a/config/common/common.go b/config/common/common.go index 3e77dc7ed..66906b533 100644 --- a/config/common/common.go +++ b/config/common/common.go @@ -48,3 +48,22 @@ func ARNExtractor() reference.ExtractValueFn { return r } } + +// func GetExternalNameFromARN() config.GetExternalNameFn { +// return func(tfstate map[string]interface{}) (string, error) { +// arn, ok := tfstate["id"].(string) +// if !ok || arn == "" { +// return "", errors.New("cannot get id from tfstate") +// } +// // arn:partition:service:region:account-id:resource-id +// // arn:partition:service:region:account-id:resource-type/resource-id +// // arn:partition:service:region:account-id:resource-type:resource-id +// w := strings.Split(arn, ":") +// name := w[len(w)-1] +// if strings.Contains(name, "/") { +// ids := strings.Split(name, "/") +// return ids[len(ids)-1], nil +// } +// return name, nil +// } +// } diff --git a/config/ebs/config.go b/config/ebs/config.go index 7e2b5b506..340afdef9 100644 --- a/config/ebs/config.go +++ b/config/ebs/config.go @@ -23,7 +23,6 @@ import ( // Configure adds configurations for ebs group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_ebs_volume", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider r.References = map[string]config.Reference{ "kms_key_id": { Type: "github.com/crossplane-contrib/provider-jet-aws/apis/kms/v1alpha1.Key", diff --git a/config/ec2/config.go b/config/ec2/config.go index 46b9b83d9..8bab54797 100644 --- a/config/ec2/config.go +++ b/config/ec2/config.go @@ -63,10 +63,14 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_eip", func(r *config.Resource) { r.Kind = "ElasticIP" r.ExternalName = config.IdentifierFromProvider - r.References["instance"] = config.Reference{ - Type: "Instance", + r.References = config.References{ + "instance": config.Reference{ + Type: "Instance", + }, + "network_interface": config.Reference{ + Type: "NetworkInterface", + }, } - r.UseAsync = true }) @@ -126,11 +130,6 @@ func Configure(p *config.Provider) { }) p.AddResourceConfigurator("aws_launch_template", func(r *config.Resource) { - // Note(turkenh): Kind as "LaunchTemplate" fails with: - // panic: cannot generate crd: cannot build types for LaunchTemplate: - // cannot build the types: cannot generate parameters type name of - // LaunchTemplate: could not generate a unique name for - // LaunchTemplateParameters r.Kind = "LaunchTemplate" r.ExternalName = config.IdentifierFromProvider r.References["security_group_names"] = config.Reference{ diff --git a/config/ecr/config.go b/config/ecr/config.go index b67c9026a..782ad0b5a 100644 --- a/config/ecr/config.go +++ b/config/ecr/config.go @@ -25,6 +25,7 @@ import ( // Configure adds configurations for ecrs group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_ecr_repository", func(r *config.Resource) { + r.ExternalName = config.NameAsIdentifier r.References = map[string]config.Reference{ "encryption_configuration.kms_key": { Type: "github.com/crossplane-contrib/provider-jet-aws/apis/kms/v1alpha1.Key", diff --git a/config/ecs/config.go b/config/ecs/config.go index faf285945..1272617b8 100644 --- a/config/ecs/config.go +++ b/config/ecs/config.go @@ -17,7 +17,12 @@ limitations under the License. package ecs import ( + "context" + "path/filepath" + "strings" + "github.com/crossplane-contrib/terrajet/pkg/config" + "github.com/pkg/errors" "github.com/crossplane-contrib/provider-jet-aws/config/common" ) @@ -25,8 +30,7 @@ import ( // Configure adds configurations for ecs group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_ecs_cluster", func(r *config.Resource) { - // todo: use new ID operation overrides because ID is ARN. - r.ExternalName = config.IdentifierFromProvider + r.ExternalName = config.NameAsIdentifier r.References = config.References{ "capacity_providers": config.Reference{ Type: "CapacityProvider", @@ -43,6 +47,21 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_ecs_service", func(r *config.Resource) { r.ExternalName = config.NameAsIdentifier + r.ExternalName.GetExternalNameFn = func(tfstate map[string]interface{}) (string, error) { + // cluster-name/service-name + w := strings.Split(tfstate["id"].(string), "/") + if len(w) != 2 { + return "", errors.New("external name should have the following format: cluster-name/service-name") + } + return w[len(w)-1], nil + } + r.ExternalName.GetIDFn = func(_ context.Context, externalName string, parameters map[string]interface{}, _ map[string]interface{}) (string, error) { + cl, ok := parameters["cluster"].(string) + if !ok { + return "", errors.New("cannot generate id without cluster paramater") + } + return filepath.Join(cl, externalName), nil + } r.References = config.References{ "cluster": config.Reference{ Type: "Cluster", @@ -76,18 +95,6 @@ func Configure(p *config.Provider) { } }) - p.AddResourceConfigurator("aws_ecs_tag", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider - r.References = config.References{ - // Note(turkenh): This reference could correspond multiple types as - // per documentation, any ecs resource: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_tag#resource_arn - // However, we could only reference to one type. - "resource_arn": config.Reference{ - Type: "Cluster", - Extractor: common.PathARNExtractor, - }, - } - }) p.AddResourceConfigurator("aws_ecs_task_definition", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider r.References = config.References{ diff --git a/config/eks/config.go b/config/eks/config.go index 20de750d3..70aa1a32b 100644 --- a/config/eks/config.go +++ b/config/eks/config.go @@ -17,14 +17,20 @@ limitations under the License. package eks import ( + "context" + "fmt" + "strings" + "github.com/crossplane-contrib/terrajet/pkg/config" + "github.com/pkg/errors" "github.com/crossplane-contrib/provider-jet-aws/config/common" ) // Configure adds configurations for eks group. -func Configure(p *config.Provider) { +func Configure(p *config.Provider) { // nolint:gocyclo p.AddResourceConfigurator("aws_eks_cluster", func(r *config.Resource) { + r.ExternalName = config.NameAsIdentifier r.References = config.References{ "role_arn": { Type: "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha1.Role", @@ -52,6 +58,8 @@ func Configure(p *config.Provider) { "node_group_name", "node_group_name_prefix", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } r.References = config.References{ "cluster_name": { @@ -91,6 +99,25 @@ func Configure(p *config.Provider) { OmittedFields: []string{ "fargate_profile_name", }, + GetIDFn: func(_ context.Context, externalName string, parameters map[string]interface{}, _ map[string]interface{}) (string, error) { + cl, ok := parameters["cluster_name"].(string) + if !ok || cl == "" { + return "", errors.New("cannot get cluster_name from parameters") + } + return fmt.Sprintf("%s:%s", cl, externalName), nil + }, + GetExternalNameFn: func(tfstate map[string]interface{}) (string, error) { + id, ok := tfstate["id"].(string) + if !ok || id == "" { + return "", errors.New("cannot get id from tfstate") + } + // my_cluster:my_fargate_profile + w := strings.Split(id, ":") + if len(w) != 2 { + return "", errors.New("format of id should be my_cluster:my_fargate_profile") + } + return w[len(w)-1], nil + }, } r.References = config.References{ @@ -109,7 +136,33 @@ func Configure(p *config.Provider) { } }) p.AddResourceConfigurator("aws_eks_addon", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider + r.ExternalName = config.ExternalName{ + SetIdentifierArgumentFn: func(base map[string]interface{}, externalName string) { + base["addon_name"] = externalName + }, + OmittedFields: []string{ + "addon_name", + }, + GetIDFn: func(_ context.Context, externalName string, parameters map[string]interface{}, _ map[string]interface{}) (string, error) { + cl, ok := parameters["cluster_name"].(string) + if !ok || cl == "" { + return "", errors.New("cannot get cluster_name from parameters") + } + return fmt.Sprintf("%s:%s", cl, externalName), nil + }, + GetExternalNameFn: func(tfstate map[string]interface{}) (string, error) { + id, ok := tfstate["id"].(string) + if !ok || id == "" { + return "", errors.New("cannot get id from tfstate") + } + // my_cluster:my_fargate_profile + w := strings.Split(id, ":") + if len(w) != 2 { + return "", errors.New("format of id should be my_cluster:my_fargate_profile") + } + return w[len(w)-1], nil + }, + } r.References = config.References{ "cluster_name": { Type: "Cluster", diff --git a/config/elasticache/config.go b/config/elasticache/config.go index c57dbfd6b..f8033db4f 100644 --- a/config/elasticache/config.go +++ b/config/elasticache/config.go @@ -23,7 +23,7 @@ import ( // Configure adds configurations for elasticache group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_elasticache_parameter_group", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider + r.ExternalName = config.NameAsIdentifier }) p.AddResourceConfigurator("aws_elasticache_cluster", func(r *config.Resource) { @@ -34,6 +34,8 @@ func Configure(p *config.Provider) { OmittedFields: []string{ "cluster_id", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } r.References = config.References{ "parameter_group_name": config.Reference{ @@ -51,6 +53,8 @@ func Configure(p *config.Provider) { OmittedFields: []string{ "replication_group_id", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } }) diff --git a/config/elasticloadbalancing/config.go b/config/elasticloadbalancing/config.go index 367b8da09..20af75f75 100644 --- a/config/elasticloadbalancing/config.go +++ b/config/elasticloadbalancing/config.go @@ -25,6 +25,7 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_lb", func(r *config.Resource) { r.Kind = "LoadBalancer" r.ExternalName = config.IdentifierFromProvider + r.ExternalName.OmittedFields = append(r.ExternalName.OmittedFields, "name_prefix") r.References = config.References{ "security_groups": { Type: "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha1.SecurityGroup", @@ -64,11 +65,17 @@ func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_lb_target_group", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider + r.ExternalName.OmittedFields = append(r.ExternalName.OmittedFields, "name_prefix") r.References = config.References{ "vpc_id": { Type: "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha1.VPC", }, } + if s, ok := r.TerraformResource.Schema["name"]; ok { + s.Optional = false + s.ForceNew = true + s.Computed = false + } }) p.AddResourceConfigurator("aws_lb_target_group_attachment", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider diff --git a/config/iam/config.go b/config/iam/config.go index d1b8b123c..324ea3002 100644 --- a/config/iam/config.go +++ b/config/iam/config.go @@ -33,64 +33,30 @@ func Configure(p *config.Provider) { } }) - p.AddResourceConfigurator("aws_iam_group_policy", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_instance_profile", func(r *config.Resource) { r.ExternalName = config.NameAsIdentifier r.References = config.References{ - "group": config.Reference{ - Type: "Group", + "role": config.Reference{ + Type: "Role", }, } }) - p.AddResourceConfigurator("aws_iam_group_policy_attachment", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_policy", func(r *config.Resource) { + // TODO(muvaf): We can reconstruct ARN of this resource in GetIDFn. r.ExternalName = config.IdentifierFromProvider - r.References = config.References{ - "group": config.Reference{ - Type: "Group", - }, - "policy_arn": config.Reference{ - Type: "Policy", - Extractor: common.PathARNExtractor, - }, - } }) - p.AddResourceConfigurator("aws_iam_instance_profile", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_user", func(r *config.Resource) { r.ExternalName = config.NameAsIdentifier - r.References = config.References{ - "role": config.Reference{ - Type: "Role", - }, - } }) - p.AddResourceConfigurator("aws_iam_policy", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider + p.AddResourceConfigurator("aws_iam_group", func(r *config.Resource) { + r.ExternalName = config.NameAsIdentifier }) - p.AddResourceConfigurator("aws_iam_policy_attachment", func(r *config.Resource) { - r.ExternalName = config.IdentifierFromProvider - r.References = config.References{ - "users": config.Reference{ - Type: "User", - RefFieldName: "UserRefs", - SelectorFieldName: "UserSelector", - }, - "roles": config.Reference{ - Type: "Role", - RefFieldName: "RoleRefs", - SelectorFieldName: "RoleSelector", - }, - "groups": config.Reference{ - Type: "Group", - RefFieldName: "GroupRefs", - SelectorFieldName: "GroupSelector", - }, - "policy_arn": config.Reference{ - Type: "Policy", - Extractor: common.PathARNExtractor, - }, - } + p.AddResourceConfigurator("aws_iam_role", func(r *config.Resource) { + r.ExternalName = config.NameAsIdentifier }) p.AddResourceConfigurator("aws_iam_role_policy_attachment", func(r *config.Resource) { @@ -106,39 +72,44 @@ func Configure(p *config.Provider) { } }) - p.AddResourceConfigurator("aws_iam_user_group_membership", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_user_policy_attachment", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider r.References = config.References{ "user": config.Reference{ Type: "User", }, - "groups": config.Reference{ - Type: "Group", - RefFieldName: "GroupRefs", - SelectorFieldName: "GroupSelector", + "policy_arn": config.Reference{ + Type: "Policy", + Extractor: common.PathARNExtractor, }, } }) - p.AddResourceConfigurator("aws_iam_user_policy", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_group_policy_attachment", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider r.References = config.References{ - "user": config.Reference{ - Type: "User", + "group": config.Reference{ + Type: "Group", + }, + "policy_arn": config.Reference{ + Type: "Policy", + Extractor: common.PathARNExtractor, }, } }) - p.AddResourceConfigurator("aws_iam_user_policy_attachment", func(r *config.Resource) { + p.AddResourceConfigurator("aws_iam_user_group_membership", func(r *config.Resource) { r.ExternalName = config.IdentifierFromProvider r.References = config.References{ "user": config.Reference{ Type: "User", }, - "policy_arn": config.Reference{ - Type: "Policy", - Extractor: common.PathARNExtractor, + "groups": config.Reference{ + Type: "Group", + RefFieldName: "GroupRefs", + SelectorFieldName: "GroupSelector", }, } }) + } diff --git a/config/overrides.go b/config/overrides.go index d1065614d..c16be7ce5 100644 --- a/config/overrides.go +++ b/config/overrides.go @@ -99,6 +99,19 @@ func IdentifierAssignedByAWS() tjconfig.ResourceOption { } } +// NamePrefixRemoval makes sure we remove name_prefix from all since it is mostly +// for Terraform functionality. +func NamePrefixRemoval() tjconfig.ResourceOption { + return func(r *tjconfig.Resource) { + for _, f := range r.ExternalName.OmittedFields { + if f == "name_prefix" { + return + } + } + r.ExternalName.OmittedFields = append(r.ExternalName.OmittedFields, "name_prefix") + } +} + func matches(name string, regexes map[string]string) (string, bool) { for k, v := range regexes { ok, err := regexp.MatchString(k, name) diff --git a/config/provider.go b/config/provider.go index 04ec7dd04..1c7b5942a 100644 --- a/config/provider.go +++ b/config/provider.go @@ -95,7 +95,6 @@ var IncludedResources = []string{ "aws_network_interface$", "aws_route$", "aws_route_table$", - "aws_main_route_table_association$", "aws_vpc_endpoint$", "aws_vpc_ipv4_cidr_block_association$", "aws_vpc_peering_connection$", @@ -140,8 +139,15 @@ var IncludedResources = []string{ var skipList = []string{ "aws_waf_rule_group$", "aws_wafregional_rule_group$", - "aws_glue_connection$", // See https://github.com/crossplane-contrib/terrajet/issues/100 - "aws_mwaa_environment$", // See https://github.com/crossplane-contrib/terrajet/issues/100 + "aws_glue_connection$", // See https://github.com/crossplane-contrib/terrajet/issues/100 + "aws_mwaa_environment$", // See https://github.com/crossplane-contrib/terrajet/issues/100 + "aws_ecs_tag$", // tags are already managed by ecs resources. + "aws_alb$", // identical with aws_lb + "aws_alb_target_group_attachment$", // identical with aws_lb_target_group_attachment + "aws_iam_policy_attachment$", // identical with aws_iam_*_policy_attachment resources. + "aws_iam_group_policy$", // identical with aws_iam_*_policy_attachment resources. + "aws_iam_role_policy$", // identical with aws_iam_*_policy_attachment resources. + "aws_iam_user_policy$", // identical with aws_iam_*_policy_attachment resources. } // GetProvider returns provider configuration @@ -157,6 +163,7 @@ func GetProvider(tfProvider *schema.Provider) *tjconfig.Provider { RegionAddition(), TagsAllRemoval(), IdentifierAssignedByAWS(), + NamePrefixRemoval(), )), ) diff --git a/config/rds/config.go b/config/rds/config.go index d259afc3c..34f3b2351 100644 --- a/config/rds/config.go +++ b/config/rds/config.go @@ -32,6 +32,8 @@ func Configure(p *config.Provider) { "cluster_identifier", "cluster_identifier_prefix", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } r.References = config.References{ "s3_import.bucket_name": { @@ -59,6 +61,8 @@ func Configure(p *config.Provider) { "identifier", "identifier_prefix", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } r.References = config.References{ "restore_to_point_in_time.source_db_instance_identifier": { @@ -94,5 +98,6 @@ func Configure(p *config.Provider) { }) p.AddResourceConfigurator("aws_db_parameter_group", func(r *config.Resource) { r.Kind = "DBParameterGroup" + r.ExternalName = config.NameAsIdentifier }) } diff --git a/config/s3/config.go b/config/s3/config.go index ce1e408bb..5e6c17841 100644 --- a/config/s3/config.go +++ b/config/s3/config.go @@ -33,6 +33,8 @@ func Configure(p *config.Provider) { "bucket", "bucket_prefix", }, + GetExternalNameFn: config.IDAsExternalName, + GetIDFn: config.ExternalNameAsID, } r.References = config.References{ "server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id": { From c1346ebe2f86f2b25e194a10dcaa0eb191ed524c Mon Sep 17 00:00:00 2001 From: Muvaffak Onus Date: Fri, 19 Nov 2021 21:07:12 +0300 Subject: [PATCH 4/5] regenerate with new configs Signed-off-by: Muvaffak Onus --- .../v1alpha1/zz_autoscalinggroup_types.go | 17 +- .../v1alpha1/zz_generated.deepcopy.go | 54 +- .../v1alpha1/zz_generated.resolvers.go | 16 - apis/ec2/v1alpha1/zz_elasticip_types.go | 7 + apis/ec2/v1alpha1/zz_generated.deepcopy.go | 10 + apis/ec2/v1alpha1/zz_generated.resolvers.go | 16 + apis/ecs/v1alpha1/zz_cluster_types.go | 3 - apis/ecs/v1alpha1/zz_generated.deepcopy.go | 5 - apis/eks/v1alpha1/zz_addon_types.go | 3 - apis/eks/v1alpha1/zz_generated.deepcopy.go | 5 - .../v1alpha1/zz_generated.deepcopy.go | 5 - .../v1alpha1/zz_parametergroup_types.go | 3 - .../v1alpha1/zz_generated.deepcopy.go | 10 - .../v1alpha1/zz_loadbalancer_types.go | 3 - .../v1alpha1/zz_targetgroup_types.go | 7 +- apis/iam/v1alpha1/zz_generated.deepcopy.go | 679 +----------------- apis/iam/v1alpha1/zz_generated.managed.go | 224 ------ apis/iam/v1alpha1/zz_generated.managedlist.go | 36 - apis/iam/v1alpha1/zz_generated.resolvers.go | 127 ---- .../v1alpha1/zz_grouppolicy_terraformed.go | 92 --- apis/iam/v1alpha1/zz_grouppolicy_types.go | 94 --- .../zz_policyattachment_terraformed.go | 92 --- .../iam/v1alpha1/zz_policyattachment_types.go | 131 ---- .../iam/v1alpha1/zz_rolepolicy_terraformed.go | 92 --- apis/iam/v1alpha1/zz_rolepolicy_types.go | 87 --- .../iam/v1alpha1/zz_userpolicy_terraformed.go | 92 --- apis/iam/v1alpha1/zz_userpolicy_types.go | 100 --- .../route53/v1alpha1/zz_generated.deepcopy.go | 40 ++ .../v1alpha1/zz_resolverendpoint_types.go | 3 + .../zz_resolverfirewalldomainlist_types.go | 3 + .../v1alpha1/zz_resolverfirewallrule_types.go | 3 + .../zz_resolverfirewallrulegroup_types.go | 3 + ...olverfirewallrulegroupassociation_types.go | 3 + .../zz_resolverquerylogconfig_types.go | 3 + .../route53/v1alpha1/zz_resolverrule_types.go | 3 + .../zz_resolverruleassociation_types.go | 3 + .../zz_controller.go | 1 + .../controller/ecs/cluster/zz_controller.go | 1 - .../controller/eks/addon/zz_controller.go | 1 - .../parametergroup/zz_controller.go | 1 - .../iam/grouppolicy/zz_controller.go | 57 -- .../iam/policyattachment/zz_controller.go | 58 -- .../iam/rolepolicy/zz_controller.go | 57 -- .../iam/userpolicy/zz_controller.go | 58 -- .../resolverdnssecconfig/zz_controller.go | 1 + .../route53/resolverendpoint/zz_controller.go | 1 + .../resolverfirewallconfig/zz_controller.go | 1 + .../zz_controller.go | 1 + .../resolverfirewallrule/zz_controller.go | 1 + .../zz_controller.go | 1 + .../zz_controller.go | 1 + .../resolverquerylogconfig/zz_controller.go | 1 + .../zz_controller.go | 1 + .../route53/resolverrule/zz_controller.go | 1 + .../resolverruleassociation/zz_controller.go | 1 + .../controller/s3/bucket/zz_controller.go | 1 + internal/controller/zz_setup.go | 8 - ...s.jet.crossplane.io_autoscalinggroups.yaml | 41 +- .../ec2.aws.jet.crossplane.io_elasticips.yaml | 23 + .../ecs.aws.jet.crossplane.io_clusters.yaml | 3 - .../eks.aws.jet.crossplane.io_addons.yaml | 3 - ...aws.jet.crossplane.io_parametergroups.yaml | 3 - ...g.aws.jet.crossplane.io_loadbalancers.yaml | 2 - ...ng.aws.jet.crossplane.io_targetgroups.yaml | 3 +- ...m.aws.jet.crossplane.io_grouppolicies.yaml | 190 ----- ...s.jet.crossplane.io_policyattachments.yaml | 277 ------- ...am.aws.jet.crossplane.io_rolepolicies.yaml | 168 ----- ...am.aws.jet.crossplane.io_userpolicies.yaml | 194 ----- ...s.jet.crossplane.io_resolverendpoints.yaml | 2 + ...splane.io_resolverfirewalldomainlists.yaml | 3 + ...resolverfirewallrulegroupassociations.yaml | 3 + ...ssplane.io_resolverfirewallrulegroups.yaml | 3 + ...t.crossplane.io_resolverfirewallrules.yaml | 3 + ...crossplane.io_resolverquerylogconfigs.yaml | 3 + ...rossplane.io_resolverruleassociations.yaml | 2 + ...3.aws.jet.crossplane.io_resolverrules.yaml | 2 + 76 files changed, 213 insertions(+), 3043 deletions(-) delete mode 100755 apis/iam/v1alpha1/zz_grouppolicy_terraformed.go delete mode 100755 apis/iam/v1alpha1/zz_grouppolicy_types.go delete mode 100755 apis/iam/v1alpha1/zz_policyattachment_terraformed.go delete mode 100755 apis/iam/v1alpha1/zz_policyattachment_types.go delete mode 100755 apis/iam/v1alpha1/zz_rolepolicy_terraformed.go delete mode 100755 apis/iam/v1alpha1/zz_rolepolicy_types.go delete mode 100755 apis/iam/v1alpha1/zz_userpolicy_terraformed.go delete mode 100755 apis/iam/v1alpha1/zz_userpolicy_types.go delete mode 100755 internal/controller/iam/grouppolicy/zz_controller.go delete mode 100755 internal/controller/iam/policyattachment/zz_controller.go delete mode 100755 internal/controller/iam/rolepolicy/zz_controller.go delete mode 100755 internal/controller/iam/userpolicy/zz_controller.go delete mode 100644 package/crds/iam.aws.jet.crossplane.io_grouppolicies.yaml delete mode 100644 package/crds/iam.aws.jet.crossplane.io_policyattachments.yaml delete mode 100644 package/crds/iam.aws.jet.crossplane.io_rolepolicies.yaml delete mode 100644 package/crds/iam.aws.jet.crossplane.io_userpolicies.yaml diff --git a/apis/autoscaling/v1alpha1/zz_autoscalinggroup_types.go b/apis/autoscaling/v1alpha1/zz_autoscalinggroup_types.go index e3b7a2d1a..58f30f991 100755 --- a/apis/autoscaling/v1alpha1/zz_autoscalinggroup_types.go +++ b/apis/autoscaling/v1alpha1/zz_autoscalinggroup_types.go @@ -27,6 +27,10 @@ import ( type AutoscalingGroupObservation struct { Arn *string `json:"arn,omitempty" tf:"arn,omitempty"` + + LoadBalancers []*string `json:"loadBalancers,omitempty" tf:"load_balancers,omitempty"` + + TargetGroupArns []*string `json:"targetGroupArns,omitempty" tf:"target_group_arns,omitempty"` } type AutoscalingGroupParameters struct { @@ -70,9 +74,6 @@ type AutoscalingGroupParameters struct { // +kubebuilder:validation:Optional LaunchTemplate []LaunchTemplateParameters `json:"launchTemplate,omitempty" tf:"launch_template,omitempty"` - // +kubebuilder:validation:Optional - LoadBalancers []*string `json:"loadBalancers,omitempty" tf:"load_balancers,omitempty"` - // +kubebuilder:validation:Optional MaxInstanceLifetime *int64 `json:"maxInstanceLifetime,omitempty" tf:"max_instance_lifetime,omitempty"` @@ -114,16 +115,6 @@ type AutoscalingGroupParameters struct { // +kubebuilder:validation:Optional Tags []map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-jet-aws/apis/elasticloadbalancing/v1alpha1.TargetGroup - // +kubebuilder:validation:Optional - TargetGroupArns []*string `json:"targetGroupArns,omitempty" tf:"target_group_arns,omitempty"` - - // +kubebuilder:validation:Optional - TargetGroupArnsRefs []v1.Reference `json:"targetGroupArnsRefs,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - TargetGroupArnsSelector *v1.Selector `json:"targetGroupArnsSelector,omitempty" tf:"-"` - // +kubebuilder:validation:Optional TerminationPolicies []*string `json:"terminationPolicies,omitempty" tf:"termination_policies,omitempty"` diff --git a/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go b/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go index 84d277bf1..47657bb56 100644 --- a/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go +++ b/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go @@ -255,6 +255,28 @@ func (in *AutoscalingGroupObservation) DeepCopyInto(out *AutoscalingGroupObserva *out = new(string) **out = **in } + if in.LoadBalancers != nil { + in, out := &in.LoadBalancers, &out.LoadBalancers + *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.TargetGroupArns != nil { + in, out := &in.TargetGroupArns, &out.TargetGroupArns + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingGroupObservation. @@ -353,17 +375,6 @@ func (in *AutoscalingGroupParameters) DeepCopyInto(out *AutoscalingGroupParamete (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.LoadBalancers != nil { - in, out := &in.LoadBalancers, &out.LoadBalancers - *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.MaxInstanceLifetime != nil { in, out := &in.MaxInstanceLifetime, &out.MaxInstanceLifetime *out = new(int64) @@ -455,27 +466,6 @@ func (in *AutoscalingGroupParameters) DeepCopyInto(out *AutoscalingGroupParamete } } } - if in.TargetGroupArns != nil { - in, out := &in.TargetGroupArns, &out.TargetGroupArns - *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.TargetGroupArnsRefs != nil { - in, out := &in.TargetGroupArnsRefs, &out.TargetGroupArnsRefs - *out = make([]v1.Reference, len(*in)) - copy(*out, *in) - } - if in.TargetGroupArnsSelector != nil { - in, out := &in.TargetGroupArnsSelector, &out.TargetGroupArnsSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } if in.TerminationPolicies != nil { in, out := &in.TerminationPolicies, &out.TerminationPolicies *out = make([]*string, len(*in)) diff --git a/apis/autoscaling/v1alpha1/zz_generated.resolvers.go b/apis/autoscaling/v1alpha1/zz_generated.resolvers.go index 550b6b0bc..9337bcf29 100644 --- a/apis/autoscaling/v1alpha1/zz_generated.resolvers.go +++ b/apis/autoscaling/v1alpha1/zz_generated.resolvers.go @@ -76,22 +76,6 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read var mrsp reference.MultiResolutionResponse var err error - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ - CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.TargetGroupArns), - Extract: reference.ExternalName(), - References: mg.Spec.ForProvider.TargetGroupArnsRefs, - Selector: mg.Spec.ForProvider.TargetGroupArnsSelector, - To: reference.To{ - List: &v1alpha1.TargetGroupList{}, - Managed: &v1alpha1.TargetGroup{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.TargetGroupArns") - } - mg.Spec.ForProvider.TargetGroupArns = reference.ToPtrValues(mrsp.ResolvedValues) - mg.Spec.ForProvider.TargetGroupArnsRefs = mrsp.ResolvedReferences - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VpcZoneIdentifier), Extract: reference.ExternalName(), diff --git a/apis/ec2/v1alpha1/zz_elasticip_types.go b/apis/ec2/v1alpha1/zz_elasticip_types.go index 18c1fed30..fc294576e 100755 --- a/apis/ec2/v1alpha1/zz_elasticip_types.go +++ b/apis/ec2/v1alpha1/zz_elasticip_types.go @@ -71,9 +71,16 @@ type ElasticIPParameters struct { // +kubebuilder:validation:Optional NetworkBorderGroup *string `json:"networkBorderGroup,omitempty" tf:"network_border_group,omitempty"` + // +crossplane:generate:reference:type=NetworkInterface // +kubebuilder:validation:Optional NetworkInterface *string `json:"networkInterface,omitempty" tf:"network_interface,omitempty"` + // +kubebuilder:validation:Optional + NetworkInterfaceRef *v1.Reference `json:"networkInterfaceRef,omitempty" tf:"-"` + + // +kubebuilder:validation:Optional + NetworkInterfaceSelector *v1.Selector `json:"networkInterfaceSelector,omitempty" tf:"-"` + // +kubebuilder:validation:Optional PublicIPv4Pool *string `json:"publicIpv4Pool,omitempty" tf:"public_ipv4_pool,omitempty"` diff --git a/apis/ec2/v1alpha1/zz_generated.deepcopy.go b/apis/ec2/v1alpha1/zz_generated.deepcopy.go index 8587c569e..0cd7e4772 100644 --- a/apis/ec2/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ec2/v1alpha1/zz_generated.deepcopy.go @@ -910,6 +910,16 @@ func (in *ElasticIPParameters) DeepCopyInto(out *ElasticIPParameters) { *out = new(string) **out = **in } + if in.NetworkInterfaceRef != nil { + in, out := &in.NetworkInterfaceRef, &out.NetworkInterfaceRef + *out = new(v1.Reference) + **out = **in + } + if in.NetworkInterfaceSelector != nil { + in, out := &in.NetworkInterfaceSelector, &out.NetworkInterfaceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.PublicIPv4Pool != nil { in, out := &in.PublicIPv4Pool, &out.PublicIPv4Pool *out = new(string) diff --git a/apis/ec2/v1alpha1/zz_generated.resolvers.go b/apis/ec2/v1alpha1/zz_generated.resolvers.go index b12e644bf..140b86630 100644 --- a/apis/ec2/v1alpha1/zz_generated.resolvers.go +++ b/apis/ec2/v1alpha1/zz_generated.resolvers.go @@ -50,6 +50,22 @@ func (mg *ElasticIP) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Instance = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.NetworkInterface), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.NetworkInterfaceRef, + Selector: mg.Spec.ForProvider.NetworkInterfaceSelector, + To: reference.To{ + List: &NetworkInterfaceList{}, + Managed: &NetworkInterface{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.NetworkInterface") + } + mg.Spec.ForProvider.NetworkInterface = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.NetworkInterfaceRef = rsp.ResolvedReference + return nil } diff --git a/apis/ecs/v1alpha1/zz_cluster_types.go b/apis/ecs/v1alpha1/zz_cluster_types.go index 64f3289df..181e5103f 100755 --- a/apis/ecs/v1alpha1/zz_cluster_types.go +++ b/apis/ecs/v1alpha1/zz_cluster_types.go @@ -49,9 +49,6 @@ type ClusterParameters struct { // +kubebuilder:validation:Optional DefaultCapacityProviderStrategy []DefaultCapacityProviderStrategyParameters `json:"defaultCapacityProviderStrategy,omitempty" tf:"default_capacity_provider_strategy,omitempty"` - // +kubebuilder:validation:Required - Name *string `json:"name" tf:"name,omitempty"` - // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/ecs/v1alpha1/zz_generated.deepcopy.go b/apis/ecs/v1alpha1/zz_generated.deepcopy.go index 578dd106f..74a4e94da 100644 --- a/apis/ecs/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ecs/v1alpha1/zz_generated.deepcopy.go @@ -469,11 +469,6 @@ func (in *ClusterParameters) DeepCopyInto(out *ClusterParameters) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) diff --git a/apis/eks/v1alpha1/zz_addon_types.go b/apis/eks/v1alpha1/zz_addon_types.go index 76829b234..44f6b98fb 100755 --- a/apis/eks/v1alpha1/zz_addon_types.go +++ b/apis/eks/v1alpha1/zz_addon_types.go @@ -37,9 +37,6 @@ type AddonObservation struct { type AddonParameters struct { - // +kubebuilder:validation:Required - AddonName *string `json:"addonName" tf:"addon_name,omitempty"` - // +kubebuilder:validation:Optional AddonVersion *string `json:"addonVersion,omitempty" tf:"addon_version,omitempty"` diff --git a/apis/eks/v1alpha1/zz_generated.deepcopy.go b/apis/eks/v1alpha1/zz_generated.deepcopy.go index bf0ce25c5..29914c00c 100644 --- a/apis/eks/v1alpha1/zz_generated.deepcopy.go +++ b/apis/eks/v1alpha1/zz_generated.deepcopy.go @@ -132,11 +132,6 @@ func (in *AddonObservation) DeepCopy() *AddonObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AddonParameters) DeepCopyInto(out *AddonParameters) { *out = *in - if in.AddonName != nil { - in, out := &in.AddonName, &out.AddonName - *out = new(string) - **out = **in - } if in.AddonVersion != nil { in, out := &in.AddonVersion, &out.AddonVersion *out = new(string) diff --git a/apis/elasticache/v1alpha1/zz_generated.deepcopy.go b/apis/elasticache/v1alpha1/zz_generated.deepcopy.go index 172ec9cc2..9bdadb565 100644 --- a/apis/elasticache/v1alpha1/zz_generated.deepcopy.go +++ b/apis/elasticache/v1alpha1/zz_generated.deepcopy.go @@ -546,11 +546,6 @@ func (in *ParameterGroupParameters) DeepCopyInto(out *ParameterGroupParameters) *out = new(string) **out = **in } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } if in.Parameter != nil { in, out := &in.Parameter, &out.Parameter *out = make([]ParameterParameters, len(*in)) diff --git a/apis/elasticache/v1alpha1/zz_parametergroup_types.go b/apis/elasticache/v1alpha1/zz_parametergroup_types.go index 4f67ffe06..5c3a58e7f 100755 --- a/apis/elasticache/v1alpha1/zz_parametergroup_types.go +++ b/apis/elasticache/v1alpha1/zz_parametergroup_types.go @@ -39,9 +39,6 @@ type ParameterGroupParameters struct { // +kubebuilder:validation:Required Family *string `json:"family" tf:"family,omitempty"` - // +kubebuilder:validation:Required - Name *string `json:"name" tf:"name,omitempty"` - // +kubebuilder:validation:Optional Parameter []ParameterParameters `json:"parameter,omitempty" tf:"parameter,omitempty"` diff --git a/apis/elasticloadbalancing/v1alpha1/zz_generated.deepcopy.go b/apis/elasticloadbalancing/v1alpha1/zz_generated.deepcopy.go index 716b7ed39..7aedc0eca 100644 --- a/apis/elasticloadbalancing/v1alpha1/zz_generated.deepcopy.go +++ b/apis/elasticloadbalancing/v1alpha1/zz_generated.deepcopy.go @@ -889,11 +889,6 @@ func (in *LoadBalancerParameters) DeepCopyInto(out *LoadBalancerParameters) { *out = new(string) **out = **in } - if in.NamePrefix != nil { - in, out := &in.NamePrefix, &out.NamePrefix - *out = new(string) - **out = **in - } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -1511,11 +1506,6 @@ func (in *TargetGroupParameters_2) DeepCopyInto(out *TargetGroupParameters_2) { *out = new(string) **out = **in } - if in.NamePrefix != nil { - in, out := &in.NamePrefix, &out.NamePrefix - *out = new(string) - **out = **in - } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(int64) diff --git a/apis/elasticloadbalancing/v1alpha1/zz_loadbalancer_types.go b/apis/elasticloadbalancing/v1alpha1/zz_loadbalancer_types.go index 33680d4ca..1262fe2fd 100755 --- a/apis/elasticloadbalancing/v1alpha1/zz_loadbalancer_types.go +++ b/apis/elasticloadbalancing/v1alpha1/zz_loadbalancer_types.go @@ -96,9 +96,6 @@ type LoadBalancerParameters struct { // +kubebuilder:validation:Optional Name *string `json:"name,omitempty" tf:"name,omitempty"` - // +kubebuilder:validation:Optional - NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` - // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_types.go b/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_types.go index f1d1daf7f..effd7b6c7 100755 --- a/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_types.go +++ b/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_types.go @@ -80,11 +80,8 @@ type TargetGroupParameters_2 struct { // +kubebuilder:validation:Optional LoadBalancingAlgorithmType *string `json:"loadBalancingAlgorithmType,omitempty" tf:"load_balancing_algorithm_type,omitempty"` - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - - // +kubebuilder:validation:Optional - NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` // +kubebuilder:validation:Optional Port *int64 `json:"port,omitempty" tf:"port,omitempty"` diff --git a/apis/iam/v1alpha1/zz_generated.deepcopy.go b/apis/iam/v1alpha1/zz_generated.deepcopy.go index 0483fa091..8baefc3bb 100644 --- a/apis/iam/v1alpha1/zz_generated.deepcopy.go +++ b/apis/iam/v1alpha1/zz_generated.deepcopy.go @@ -297,33 +297,6 @@ func (in *GroupParameters) DeepCopy() *GroupParameters { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupPolicy) DeepCopyInto(out *GroupPolicy) { - *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 GroupPolicy. -func (in *GroupPolicy) DeepCopy() *GroupPolicy { - if in == nil { - return nil - } - out := new(GroupPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupPolicy) 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 *GroupPolicyAttachment) DeepCopyInto(out *GroupPolicyAttachment) { *out = *in @@ -477,122 +450,6 @@ func (in *GroupPolicyAttachmentStatus) DeepCopy() *GroupPolicyAttachmentStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupPolicyList) DeepCopyInto(out *GroupPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GroupPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicyList. -func (in *GroupPolicyList) DeepCopy() *GroupPolicyList { - if in == nil { - return nil - } - out := new(GroupPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupPolicyList) 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 *GroupPolicyObservation) DeepCopyInto(out *GroupPolicyObservation) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicyObservation. -func (in *GroupPolicyObservation) DeepCopy() *GroupPolicyObservation { - if in == nil { - return nil - } - out := new(GroupPolicyObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupPolicyParameters) DeepCopyInto(out *GroupPolicyParameters) { - *out = *in - if in.Group != nil { - in, out := &in.Group, &out.Group - *out = new(string) - **out = **in - } - if in.GroupRef != nil { - in, out := &in.GroupRef, &out.GroupRef - *out = new(v1.Reference) - **out = **in - } - if in.GroupSelector != nil { - in, out := &in.GroupSelector, &out.GroupSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicyParameters. -func (in *GroupPolicyParameters) DeepCopy() *GroupPolicyParameters { - if in == nil { - return nil - } - out := new(GroupPolicyParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupPolicySpec) DeepCopyInto(out *GroupPolicySpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicySpec. -func (in *GroupPolicySpec) DeepCopy() *GroupPolicySpec { - if in == nil { - return nil - } - out := new(GroupPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupPolicyStatus) DeepCopyInto(out *GroupPolicyStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - out.AtProvider = in.AtProvider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicyStatus. -func (in *GroupPolicyStatus) DeepCopy() *GroupPolicyStatus { - if in == nil { - return nil - } - out := new(GroupPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupSpec) DeepCopyInto(out *GroupSpec) { *out = *in @@ -840,254 +697,48 @@ func (in *InstanceProfileSpec) DeepCopy() *InstanceProfileSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InstanceProfileStatus) DeepCopyInto(out *InstanceProfileStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceProfileStatus. -func (in *InstanceProfileStatus) DeepCopy() *InstanceProfileStatus { - if in == nil { - return nil - } - out := new(InstanceProfileStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Policy) DeepCopyInto(out *Policy) { - *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 Policy. -func (in *Policy) DeepCopy() *Policy { - if in == nil { - return nil - } - out := new(Policy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Policy) 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 *PolicyAttachment) DeepCopyInto(out *PolicyAttachment) { - *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 PolicyAttachment. -func (in *PolicyAttachment) DeepCopy() *PolicyAttachment { - if in == nil { - return nil - } - out := new(PolicyAttachment) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PolicyAttachment) 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 *PolicyAttachmentList) DeepCopyInto(out *PolicyAttachmentList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PolicyAttachment, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAttachmentList. -func (in *PolicyAttachmentList) DeepCopy() *PolicyAttachmentList { - if in == nil { - return nil - } - out := new(PolicyAttachmentList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PolicyAttachmentList) 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 *PolicyAttachmentObservation) DeepCopyInto(out *PolicyAttachmentObservation) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAttachmentObservation. -func (in *PolicyAttachmentObservation) DeepCopy() *PolicyAttachmentObservation { - if in == nil { - return nil - } - out := new(PolicyAttachmentObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyAttachmentParameters) DeepCopyInto(out *PolicyAttachmentParameters) { - *out = *in - if in.GroupRefs != nil { - in, out := &in.GroupRefs, &out.GroupRefs - *out = make([]v1.Reference, len(*in)) - copy(*out, *in) - } - if in.GroupSelector != nil { - in, out := &in.GroupSelector, &out.GroupSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *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.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.PolicyArn != nil { - in, out := &in.PolicyArn, &out.PolicyArn - *out = new(string) - **out = **in - } - if in.PolicyArnRef != nil { - in, out := &in.PolicyArnRef, &out.PolicyArnRef - *out = new(v1.Reference) - **out = **in - } - if in.PolicyArnSelector != nil { - in, out := &in.PolicyArnSelector, &out.PolicyArnSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.RoleRefs != nil { - in, out := &in.RoleRefs, &out.RoleRefs - *out = make([]v1.Reference, len(*in)) - copy(*out, *in) - } - if in.RoleSelector != nil { - in, out := &in.RoleSelector, &out.RoleSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.Roles != nil { - in, out := &in.Roles, &out.Roles - *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.UserRefs != nil { - in, out := &in.UserRefs, &out.UserRefs - *out = make([]v1.Reference, len(*in)) - copy(*out, *in) - } - if in.UserSelector != nil { - in, out := &in.UserSelector, &out.UserSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } - if in.Users != nil { - in, out := &in.Users, &out.Users - *out = make([]*string, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(string) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAttachmentParameters. -func (in *PolicyAttachmentParameters) DeepCopy() *PolicyAttachmentParameters { - if in == nil { - return nil - } - out := new(PolicyAttachmentParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyAttachmentSpec) DeepCopyInto(out *PolicyAttachmentSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAttachmentSpec. -func (in *PolicyAttachmentSpec) DeepCopy() *PolicyAttachmentSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceProfileStatus. +func (in *InstanceProfileStatus) DeepCopy() *InstanceProfileStatus { if in == nil { return nil } - out := new(PolicyAttachmentSpec) + out := new(InstanceProfileStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyAttachmentStatus) DeepCopyInto(out *PolicyAttachmentStatus) { +func (in *Policy) DeepCopyInto(out *Policy) { *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - out.AtProvider = in.AtProvider + 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 PolicyAttachmentStatus. -func (in *PolicyAttachmentStatus) DeepCopy() *PolicyAttachmentStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. +func (in *Policy) DeepCopy() *Policy { if in == nil { return nil } - out := new(PolicyAttachmentStatus) + out := new(Policy) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Policy) 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 *PolicyList) DeepCopyInto(out *PolicyList) { *out = *in @@ -1431,33 +1082,6 @@ func (in *RoleParameters) DeepCopy() *RoleParameters { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RolePolicy) DeepCopyInto(out *RolePolicy) { - *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 RolePolicy. -func (in *RolePolicy) DeepCopy() *RolePolicy { - if in == nil { - return nil - } - out := new(RolePolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RolePolicy) 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 *RolePolicyAttachment) DeepCopyInto(out *RolePolicyAttachment) { *out = *in @@ -1611,112 +1235,6 @@ func (in *RolePolicyAttachmentStatus) DeepCopy() *RolePolicyAttachmentStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RolePolicyList) DeepCopyInto(out *RolePolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RolePolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicyList. -func (in *RolePolicyList) DeepCopy() *RolePolicyList { - if in == nil { - return nil - } - out := new(RolePolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RolePolicyList) 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 *RolePolicyObservation) DeepCopyInto(out *RolePolicyObservation) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicyObservation. -func (in *RolePolicyObservation) DeepCopy() *RolePolicyObservation { - if in == nil { - return nil - } - out := new(RolePolicyObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RolePolicyParameters) DeepCopyInto(out *RolePolicyParameters) { - *out = *in - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(string) - **out = **in - } - if in.Role != nil { - in, out := &in.Role, &out.Role - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicyParameters. -func (in *RolePolicyParameters) DeepCopy() *RolePolicyParameters { - if in == nil { - return nil - } - out := new(RolePolicyParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RolePolicySpec) DeepCopyInto(out *RolePolicySpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicySpec. -func (in *RolePolicySpec) DeepCopy() *RolePolicySpec { - if in == nil { - return nil - } - out := new(RolePolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RolePolicyStatus) DeepCopyInto(out *RolePolicyStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - out.AtProvider = in.AtProvider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicyStatus. -func (in *RolePolicyStatus) DeepCopy() *RolePolicyStatus { - if in == nil { - return nil - } - out := new(RolePolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleSpec) DeepCopyInto(out *RoleSpec) { *out = *in @@ -2054,33 +1572,6 @@ func (in *UserParameters) DeepCopy() *UserParameters { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserPolicy) DeepCopyInto(out *UserPolicy) { - *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 UserPolicy. -func (in *UserPolicy) DeepCopy() *UserPolicy { - if in == nil { - return nil - } - out := new(UserPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserPolicy) 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 *UserPolicyAttachment) DeepCopyInto(out *UserPolicyAttachment) { *out = *in @@ -2234,132 +1725,6 @@ func (in *UserPolicyAttachmentStatus) DeepCopy() *UserPolicyAttachmentStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserPolicyList) DeepCopyInto(out *UserPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]UserPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicyList. -func (in *UserPolicyList) DeepCopy() *UserPolicyList { - if in == nil { - return nil - } - out := new(UserPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserPolicyList) 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 *UserPolicyObservation) DeepCopyInto(out *UserPolicyObservation) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicyObservation. -func (in *UserPolicyObservation) DeepCopy() *UserPolicyObservation { - if in == nil { - return nil - } - out := new(UserPolicyObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserPolicyParameters) DeepCopyInto(out *UserPolicyParameters) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.NamePrefix != nil { - in, out := &in.NamePrefix, &out.NamePrefix - *out = new(string) - **out = **in - } - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(string) - **out = **in - } - if in.User != nil { - in, out := &in.User, &out.User - *out = new(string) - **out = **in - } - if in.UserRef != nil { - in, out := &in.UserRef, &out.UserRef - *out = new(v1.Reference) - **out = **in - } - if in.UserSelector != nil { - in, out := &in.UserSelector, &out.UserSelector - *out = new(v1.Selector) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicyParameters. -func (in *UserPolicyParameters) DeepCopy() *UserPolicyParameters { - if in == nil { - return nil - } - out := new(UserPolicyParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserPolicySpec) DeepCopyInto(out *UserPolicySpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - in.ForProvider.DeepCopyInto(&out.ForProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicySpec. -func (in *UserPolicySpec) DeepCopy() *UserPolicySpec { - if in == nil { - return nil - } - out := new(UserPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserPolicyStatus) DeepCopyInto(out *UserPolicyStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - out.AtProvider = in.AtProvider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicyStatus. -func (in *UserPolicyStatus) DeepCopy() *UserPolicyStatus { - if in == nil { - return nil - } - out := new(UserPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UserSpec) DeepCopyInto(out *UserSpec) { *out = *in diff --git a/apis/iam/v1alpha1/zz_generated.managed.go b/apis/iam/v1alpha1/zz_generated.managed.go index a7d053bed..13ca88f1a 100644 --- a/apis/iam/v1alpha1/zz_generated.managed.go +++ b/apis/iam/v1alpha1/zz_generated.managed.go @@ -131,62 +131,6 @@ func (mg *Group) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } -// GetCondition of this GroupPolicy. -func (mg *GroupPolicy) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this GroupPolicy. -func (mg *GroupPolicy) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetProviderConfigReference of this GroupPolicy. -func (mg *GroupPolicy) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -/* -GetProviderReference of this GroupPolicy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *GroupPolicy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - -// GetWriteConnectionSecretToReference of this GroupPolicy. -func (mg *GroupPolicy) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this GroupPolicy. -func (mg *GroupPolicy) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this GroupPolicy. -func (mg *GroupPolicy) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetProviderConfigReference of this GroupPolicy. -func (mg *GroupPolicy) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -/* -SetProviderReference of this GroupPolicy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *GroupPolicy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - -// SetWriteConnectionSecretToReference of this GroupPolicy. -func (mg *GroupPolicy) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} - // GetCondition of this GroupPolicyAttachment. func (mg *GroupPolicyAttachment) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) @@ -355,62 +299,6 @@ func (mg *Policy) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } -// GetCondition of this PolicyAttachment. -func (mg *PolicyAttachment) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this PolicyAttachment. -func (mg *PolicyAttachment) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetProviderConfigReference of this PolicyAttachment. -func (mg *PolicyAttachment) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -/* -GetProviderReference of this PolicyAttachment. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *PolicyAttachment) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - -// GetWriteConnectionSecretToReference of this PolicyAttachment. -func (mg *PolicyAttachment) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this PolicyAttachment. -func (mg *PolicyAttachment) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this PolicyAttachment. -func (mg *PolicyAttachment) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetProviderConfigReference of this PolicyAttachment. -func (mg *PolicyAttachment) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -/* -SetProviderReference of this PolicyAttachment. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *PolicyAttachment) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - -// SetWriteConnectionSecretToReference of this PolicyAttachment. -func (mg *PolicyAttachment) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} - // GetCondition of this Role. func (mg *Role) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) @@ -467,62 +355,6 @@ func (mg *Role) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } -// GetCondition of this RolePolicy. -func (mg *RolePolicy) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this RolePolicy. -func (mg *RolePolicy) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetProviderConfigReference of this RolePolicy. -func (mg *RolePolicy) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -/* -GetProviderReference of this RolePolicy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *RolePolicy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - -// GetWriteConnectionSecretToReference of this RolePolicy. -func (mg *RolePolicy) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this RolePolicy. -func (mg *RolePolicy) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this RolePolicy. -func (mg *RolePolicy) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetProviderConfigReference of this RolePolicy. -func (mg *RolePolicy) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -/* -SetProviderReference of this RolePolicy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *RolePolicy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - -// SetWriteConnectionSecretToReference of this RolePolicy. -func (mg *RolePolicy) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} - // GetCondition of this RolePolicyAttachment. func (mg *RolePolicyAttachment) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) @@ -691,62 +523,6 @@ func (mg *UserGroupMembership) SetWriteConnectionSecretToReference(r *xpv1.Secre mg.Spec.WriteConnectionSecretToReference = r } -// GetCondition of this UserPolicy. -func (mg *UserPolicy) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this UserPolicy. -func (mg *UserPolicy) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetProviderConfigReference of this UserPolicy. -func (mg *UserPolicy) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -/* -GetProviderReference of this UserPolicy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *UserPolicy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - -// GetWriteConnectionSecretToReference of this UserPolicy. -func (mg *UserPolicy) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this UserPolicy. -func (mg *UserPolicy) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this UserPolicy. -func (mg *UserPolicy) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetProviderConfigReference of this UserPolicy. -func (mg *UserPolicy) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -/* -SetProviderReference of this UserPolicy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *UserPolicy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - -// SetWriteConnectionSecretToReference of this UserPolicy. -func (mg *UserPolicy) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} - // GetCondition of this UserPolicyAttachment. func (mg *UserPolicyAttachment) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) diff --git a/apis/iam/v1alpha1/zz_generated.managedlist.go b/apis/iam/v1alpha1/zz_generated.managedlist.go index 2842cbf4a..e8f754619 100644 --- a/apis/iam/v1alpha1/zz_generated.managedlist.go +++ b/apis/iam/v1alpha1/zz_generated.managedlist.go @@ -46,15 +46,6 @@ func (l *GroupPolicyAttachmentList) GetItems() []resource.Managed { return items } -// GetItems of this GroupPolicyList. -func (l *GroupPolicyList) 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 InstanceProfileList. func (l *InstanceProfileList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) @@ -64,15 +55,6 @@ func (l *InstanceProfileList) GetItems() []resource.Managed { return items } -// GetItems of this PolicyAttachmentList. -func (l *PolicyAttachmentList) 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 PolicyList. func (l *PolicyList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) @@ -100,15 +82,6 @@ func (l *RolePolicyAttachmentList) GetItems() []resource.Managed { return items } -// GetItems of this RolePolicyList. -func (l *RolePolicyList) 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 UserGroupMembershipList. func (l *UserGroupMembershipList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) @@ -135,12 +108,3 @@ func (l *UserPolicyAttachmentList) GetItems() []resource.Managed { } return items } - -// GetItems of this UserPolicyList. -func (l *UserPolicyList) GetItems() []resource.Managed { - items := make([]resource.Managed, len(l.Items)) - for i := range l.Items { - items[i] = &l.Items[i] - } - return items -} diff --git a/apis/iam/v1alpha1/zz_generated.resolvers.go b/apis/iam/v1alpha1/zz_generated.resolvers.go index 1f86be060..49bc47a5f 100644 --- a/apis/iam/v1alpha1/zz_generated.resolvers.go +++ b/apis/iam/v1alpha1/zz_generated.resolvers.go @@ -51,32 +51,6 @@ func (mg *AccessKey) ResolveReferences(ctx context.Context, c client.Reader) err return nil } -// ResolveReferences of this GroupPolicy. -func (mg *GroupPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Group), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.GroupRef, - Selector: mg.Spec.ForProvider.GroupSelector, - To: reference.To{ - List: &GroupList{}, - Managed: &Group{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Group") - } - mg.Spec.ForProvider.Group = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.GroupRef = rsp.ResolvedReference - - return nil -} - // ResolveReferences of this GroupPolicyAttachment. func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) @@ -145,81 +119,6 @@ func (mg *InstanceProfile) ResolveReferences(ctx context.Context, c client.Reade return nil } -// ResolveReferences of this PolicyAttachment. -func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var mrsp reference.MultiResolutionResponse - var err error - - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ - CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Groups), - Extract: reference.ExternalName(), - References: mg.Spec.ForProvider.GroupRefs, - Selector: mg.Spec.ForProvider.GroupSelector, - To: reference.To{ - List: &GroupList{}, - Managed: &Group{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Groups") - } - mg.Spec.ForProvider.Groups = reference.ToPtrValues(mrsp.ResolvedValues) - mg.Spec.ForProvider.GroupRefs = mrsp.ResolvedReferences - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PolicyArn), - Extract: common.ARNExtractor(), - Reference: mg.Spec.ForProvider.PolicyArnRef, - Selector: mg.Spec.ForProvider.PolicyArnSelector, - To: reference.To{ - List: &PolicyList{}, - Managed: &Policy{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.PolicyArn") - } - mg.Spec.ForProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.PolicyArnRef = rsp.ResolvedReference - - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ - CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Roles), - Extract: reference.ExternalName(), - References: mg.Spec.ForProvider.RoleRefs, - Selector: mg.Spec.ForProvider.RoleSelector, - To: reference.To{ - List: &RoleList{}, - Managed: &Role{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Roles") - } - mg.Spec.ForProvider.Roles = reference.ToPtrValues(mrsp.ResolvedValues) - mg.Spec.ForProvider.RoleRefs = mrsp.ResolvedReferences - - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ - CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Users), - Extract: reference.ExternalName(), - References: mg.Spec.ForProvider.UserRefs, - Selector: mg.Spec.ForProvider.UserSelector, - To: reference.To{ - List: &UserList{}, - Managed: &User{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Users") - } - mg.Spec.ForProvider.Users = reference.ToPtrValues(mrsp.ResolvedValues) - mg.Spec.ForProvider.UserRefs = mrsp.ResolvedReferences - - return nil -} - // ResolveReferences of this RolePolicyAttachment. func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) @@ -305,32 +204,6 @@ func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.R return nil } -// ResolveReferences of this UserPolicy. -func (mg *UserPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.User), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.UserRef, - Selector: mg.Spec.ForProvider.UserSelector, - To: reference.To{ - List: &UserList{}, - Managed: &User{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.User") - } - mg.Spec.ForProvider.User = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.UserRef = rsp.ResolvedReference - - return nil -} - // ResolveReferences of this UserPolicyAttachment. func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) diff --git a/apis/iam/v1alpha1/zz_grouppolicy_terraformed.go b/apis/iam/v1alpha1/zz_grouppolicy_terraformed.go deleted file mode 100755 index 6c84ffe7f..000000000 --- a/apis/iam/v1alpha1/zz_grouppolicy_terraformed.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/crossplane-contrib/terrajet/pkg/resource" - "github.com/crossplane-contrib/terrajet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this GroupPolicy -func (mg *GroupPolicy) GetTerraformResourceType() string { - return "aws_iam_group_policy" -} - -// GetConnectionDetailsMapping for this GroupPolicy -func (tr *GroupPolicy) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this GroupPolicy -func (tr *GroupPolicy) GetObservation() (map[string]interface{}, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this GroupPolicy -func (tr *GroupPolicy) SetObservation(obs map[string]interface{}) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetParameters of this GroupPolicy -func (tr *GroupPolicy) GetParameters() (map[string]interface{}, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this GroupPolicy -func (tr *GroupPolicy) SetParameters(params map[string]interface{}) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// LateInitialize this GroupPolicy using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *GroupPolicy) LateInitialize(attrs []byte) (bool, error) { - params := &GroupPolicyParameters{} - 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 *GroupPolicy) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/iam/v1alpha1/zz_grouppolicy_types.go b/apis/iam/v1alpha1/zz_grouppolicy_types.go deleted file mode 100755 index 8a8fcb264..000000000 --- a/apis/iam/v1alpha1/zz_grouppolicy_types.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -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 GroupPolicyObservation struct { -} - -type GroupPolicyParameters struct { - - // +crossplane:generate:reference:type=Group - // +kubebuilder:validation:Optional - Group *string `json:"group,omitempty" tf:"group,omitempty"` - - // +kubebuilder:validation:Optional - GroupRef *v1.Reference `json:"groupRef,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - GroupSelector *v1.Selector `json:"groupSelector,omitempty" tf:"-"` - - // +kubebuilder:validation:Required - Policy *string `json:"policy" tf:"policy,omitempty"` -} - -// GroupPolicySpec defines the desired state of GroupPolicy -type GroupPolicySpec struct { - v1.ResourceSpec `json:",inline"` - ForProvider GroupPolicyParameters `json:"forProvider"` -} - -// GroupPolicyStatus defines the observed state of GroupPolicy. -type GroupPolicyStatus struct { - v1.ResourceStatus `json:",inline"` - AtProvider GroupPolicyObservation `json:"atProvider,omitempty"` -} - -// +kubebuilder:object:root=true - -// GroupPolicy is the Schema for the GroupPolicys API -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status -// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,awsjet} -type GroupPolicy struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec GroupPolicySpec `json:"spec"` - Status GroupPolicyStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// GroupPolicyList contains a list of GroupPolicys -type GroupPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []GroupPolicy `json:"items"` -} - -// Repository type metadata. -var ( - GroupPolicy_Kind = "GroupPolicy" - GroupPolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: GroupPolicy_Kind}.String() - GroupPolicy_KindAPIVersion = GroupPolicy_Kind + "." + CRDGroupVersion.String() - GroupPolicy_GroupVersionKind = CRDGroupVersion.WithKind(GroupPolicy_Kind) -) - -func init() { - SchemeBuilder.Register(&GroupPolicy{}, &GroupPolicyList{}) -} diff --git a/apis/iam/v1alpha1/zz_policyattachment_terraformed.go b/apis/iam/v1alpha1/zz_policyattachment_terraformed.go deleted file mode 100755 index ce987418e..000000000 --- a/apis/iam/v1alpha1/zz_policyattachment_terraformed.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/crossplane-contrib/terrajet/pkg/resource" - "github.com/crossplane-contrib/terrajet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this PolicyAttachment -func (mg *PolicyAttachment) GetTerraformResourceType() string { - return "aws_iam_policy_attachment" -} - -// GetConnectionDetailsMapping for this PolicyAttachment -func (tr *PolicyAttachment) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this PolicyAttachment -func (tr *PolicyAttachment) GetObservation() (map[string]interface{}, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this PolicyAttachment -func (tr *PolicyAttachment) SetObservation(obs map[string]interface{}) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetParameters of this PolicyAttachment -func (tr *PolicyAttachment) GetParameters() (map[string]interface{}, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this PolicyAttachment -func (tr *PolicyAttachment) SetParameters(params map[string]interface{}) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// LateInitialize this PolicyAttachment using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *PolicyAttachment) LateInitialize(attrs []byte) (bool, error) { - params := &PolicyAttachmentParameters{} - 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 *PolicyAttachment) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/iam/v1alpha1/zz_policyattachment_types.go b/apis/iam/v1alpha1/zz_policyattachment_types.go deleted file mode 100755 index 5eb1e3d7d..000000000 --- a/apis/iam/v1alpha1/zz_policyattachment_types.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -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 PolicyAttachmentObservation struct { -} - -type PolicyAttachmentParameters struct { - - // +kubebuilder:validation:Optional - GroupRefs []v1.Reference `json:"groupRefs,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - GroupSelector *v1.Selector `json:"groupSelector,omitempty" tf:"-"` - - // +crossplane:generate:reference:type=Group - // +crossplane:generate:reference:refFieldName=GroupRefs - // +crossplane:generate:reference:selectorFieldName=GroupSelector - // +kubebuilder:validation:Optional - Groups []*string `json:"groups,omitempty" tf:"groups,omitempty"` - - // +kubebuilder:validation:Required - Name *string `json:"name" tf:"name,omitempty"` - - // +crossplane:generate:reference:type=Policy - // +crossplane:generate:reference:extractor=github.com/crossplane-contrib/provider-jet-aws/config/common.ARNExtractor() - // +kubebuilder:validation:Optional - PolicyArn *string `json:"policyArn,omitempty" tf:"policy_arn,omitempty"` - - // +kubebuilder:validation:Optional - PolicyArnRef *v1.Reference `json:"policyArnRef,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - PolicyArnSelector *v1.Selector `json:"policyArnSelector,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - RoleRefs []v1.Reference `json:"roleRefs,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - RoleSelector *v1.Selector `json:"roleSelector,omitempty" tf:"-"` - - // +crossplane:generate:reference:type=Role - // +crossplane:generate:reference:refFieldName=RoleRefs - // +crossplane:generate:reference:selectorFieldName=RoleSelector - // +kubebuilder:validation:Optional - Roles []*string `json:"roles,omitempty" tf:"roles,omitempty"` - - // +kubebuilder:validation:Optional - UserRefs []v1.Reference `json:"userRefs,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - UserSelector *v1.Selector `json:"userSelector,omitempty" tf:"-"` - - // +crossplane:generate:reference:type=User - // +crossplane:generate:reference:refFieldName=UserRefs - // +crossplane:generate:reference:selectorFieldName=UserSelector - // +kubebuilder:validation:Optional - Users []*string `json:"users,omitempty" tf:"users,omitempty"` -} - -// PolicyAttachmentSpec defines the desired state of PolicyAttachment -type PolicyAttachmentSpec struct { - v1.ResourceSpec `json:",inline"` - ForProvider PolicyAttachmentParameters `json:"forProvider"` -} - -// PolicyAttachmentStatus defines the observed state of PolicyAttachment. -type PolicyAttachmentStatus struct { - v1.ResourceStatus `json:",inline"` - AtProvider PolicyAttachmentObservation `json:"atProvider,omitempty"` -} - -// +kubebuilder:object:root=true - -// PolicyAttachment is the Schema for the PolicyAttachments API -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status -// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,awsjet} -type PolicyAttachment struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec PolicyAttachmentSpec `json:"spec"` - Status PolicyAttachmentStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// PolicyAttachmentList contains a list of PolicyAttachments -type PolicyAttachmentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []PolicyAttachment `json:"items"` -} - -// Repository type metadata. -var ( - PolicyAttachment_Kind = "PolicyAttachment" - PolicyAttachment_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: PolicyAttachment_Kind}.String() - PolicyAttachment_KindAPIVersion = PolicyAttachment_Kind + "." + CRDGroupVersion.String() - PolicyAttachment_GroupVersionKind = CRDGroupVersion.WithKind(PolicyAttachment_Kind) -) - -func init() { - SchemeBuilder.Register(&PolicyAttachment{}, &PolicyAttachmentList{}) -} diff --git a/apis/iam/v1alpha1/zz_rolepolicy_terraformed.go b/apis/iam/v1alpha1/zz_rolepolicy_terraformed.go deleted file mode 100755 index 5108f615e..000000000 --- a/apis/iam/v1alpha1/zz_rolepolicy_terraformed.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/crossplane-contrib/terrajet/pkg/resource" - "github.com/crossplane-contrib/terrajet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this RolePolicy -func (mg *RolePolicy) GetTerraformResourceType() string { - return "aws_iam_role_policy" -} - -// GetConnectionDetailsMapping for this RolePolicy -func (tr *RolePolicy) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this RolePolicy -func (tr *RolePolicy) GetObservation() (map[string]interface{}, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this RolePolicy -func (tr *RolePolicy) SetObservation(obs map[string]interface{}) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetParameters of this RolePolicy -func (tr *RolePolicy) GetParameters() (map[string]interface{}, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this RolePolicy -func (tr *RolePolicy) SetParameters(params map[string]interface{}) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// LateInitialize this RolePolicy using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *RolePolicy) LateInitialize(attrs []byte) (bool, error) { - params := &RolePolicyParameters{} - 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 *RolePolicy) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/iam/v1alpha1/zz_rolepolicy_types.go b/apis/iam/v1alpha1/zz_rolepolicy_types.go deleted file mode 100755 index 939a4d113..000000000 --- a/apis/iam/v1alpha1/zz_rolepolicy_types.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -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 RolePolicyObservation struct { -} - -type RolePolicyParameters struct { - - // +kubebuilder:validation:Required - Policy *string `json:"policy" tf:"policy,omitempty"` - - // +kubebuilder:validation:Required - Role *string `json:"role" tf:"role,omitempty"` -} - -// RolePolicySpec defines the desired state of RolePolicy -type RolePolicySpec struct { - v1.ResourceSpec `json:",inline"` - ForProvider RolePolicyParameters `json:"forProvider"` -} - -// RolePolicyStatus defines the observed state of RolePolicy. -type RolePolicyStatus struct { - v1.ResourceStatus `json:",inline"` - AtProvider RolePolicyObservation `json:"atProvider,omitempty"` -} - -// +kubebuilder:object:root=true - -// RolePolicy is the Schema for the RolePolicys API -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status -// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,awsjet} -type RolePolicy struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RolePolicySpec `json:"spec"` - Status RolePolicyStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// RolePolicyList contains a list of RolePolicys -type RolePolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []RolePolicy `json:"items"` -} - -// Repository type metadata. -var ( - RolePolicy_Kind = "RolePolicy" - RolePolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: RolePolicy_Kind}.String() - RolePolicy_KindAPIVersion = RolePolicy_Kind + "." + CRDGroupVersion.String() - RolePolicy_GroupVersionKind = CRDGroupVersion.WithKind(RolePolicy_Kind) -) - -func init() { - SchemeBuilder.Register(&RolePolicy{}, &RolePolicyList{}) -} diff --git a/apis/iam/v1alpha1/zz_userpolicy_terraformed.go b/apis/iam/v1alpha1/zz_userpolicy_terraformed.go deleted file mode 100755 index 93e437b87..000000000 --- a/apis/iam/v1alpha1/zz_userpolicy_terraformed.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/crossplane-contrib/terrajet/pkg/resource" - "github.com/crossplane-contrib/terrajet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this UserPolicy -func (mg *UserPolicy) GetTerraformResourceType() string { - return "aws_iam_user_policy" -} - -// GetConnectionDetailsMapping for this UserPolicy -func (tr *UserPolicy) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this UserPolicy -func (tr *UserPolicy) GetObservation() (map[string]interface{}, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this UserPolicy -func (tr *UserPolicy) SetObservation(obs map[string]interface{}) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetParameters of this UserPolicy -func (tr *UserPolicy) GetParameters() (map[string]interface{}, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]interface{}{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this UserPolicy -func (tr *UserPolicy) SetParameters(params map[string]interface{}) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// LateInitialize this UserPolicy using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *UserPolicy) LateInitialize(attrs []byte) (bool, error) { - params := &UserPolicyParameters{} - 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 *UserPolicy) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/iam/v1alpha1/zz_userpolicy_types.go b/apis/iam/v1alpha1/zz_userpolicy_types.go deleted file mode 100755 index a727a9996..000000000 --- a/apis/iam/v1alpha1/zz_userpolicy_types.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package v1alpha1 - -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 UserPolicyObservation struct { -} - -type UserPolicyParameters struct { - - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - - // +kubebuilder:validation:Optional - NamePrefix *string `json:"namePrefix,omitempty" tf:"name_prefix,omitempty"` - - // +kubebuilder:validation:Required - Policy *string `json:"policy" tf:"policy,omitempty"` - - // +crossplane:generate:reference:type=User - // +kubebuilder:validation:Optional - User *string `json:"user,omitempty" tf:"user,omitempty"` - - // +kubebuilder:validation:Optional - UserRef *v1.Reference `json:"userRef,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - UserSelector *v1.Selector `json:"userSelector,omitempty" tf:"-"` -} - -// UserPolicySpec defines the desired state of UserPolicy -type UserPolicySpec struct { - v1.ResourceSpec `json:",inline"` - ForProvider UserPolicyParameters `json:"forProvider"` -} - -// UserPolicyStatus defines the observed state of UserPolicy. -type UserPolicyStatus struct { - v1.ResourceStatus `json:",inline"` - AtProvider UserPolicyObservation `json:"atProvider,omitempty"` -} - -// +kubebuilder:object:root=true - -// UserPolicy is the Schema for the UserPolicys API -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status -// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,awsjet} -type UserPolicy struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec UserPolicySpec `json:"spec"` - Status UserPolicyStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// UserPolicyList contains a list of UserPolicys -type UserPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []UserPolicy `json:"items"` -} - -// Repository type metadata. -var ( - UserPolicy_Kind = "UserPolicy" - UserPolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: UserPolicy_Kind}.String() - UserPolicy_KindAPIVersion = UserPolicy_Kind + "." + CRDGroupVersion.String() - UserPolicy_GroupVersionKind = CRDGroupVersion.WithKind(UserPolicy_Kind) -) - -func init() { - SchemeBuilder.Register(&UserPolicy{}, &UserPolicyList{}) -} diff --git a/apis/route53/v1alpha1/zz_generated.deepcopy.go b/apis/route53/v1alpha1/zz_generated.deepcopy.go index b891b4645..5a869d5fb 100644 --- a/apis/route53/v1alpha1/zz_generated.deepcopy.go +++ b/apis/route53/v1alpha1/zz_generated.deepcopy.go @@ -1649,6 +1649,11 @@ func (in *ResolverEndpointParameters) DeepCopyInto(out *ResolverEndpointParamete (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -1977,6 +1982,11 @@ func (in *ResolverFirewallDomainListParameters) DeepCopyInto(out *ResolverFirewa } } } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -2204,6 +2214,11 @@ func (in *ResolverFirewallRuleGroupAssociationParameters) DeepCopyInto(out *Reso *out = new(string) **out = **in } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Priority != nil { in, out := &in.Priority, &out.Priority *out = new(int64) @@ -2365,6 +2380,11 @@ func (in *ResolverFirewallRuleGroupObservation) DeepCopy() *ResolverFirewallRule // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResolverFirewallRuleGroupParameters) DeepCopyInto(out *ResolverFirewallRuleGroupParameters) { *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -2516,6 +2536,11 @@ func (in *ResolverFirewallRuleParameters) DeepCopyInto(out *ResolverFirewallRule *out = new(string) **out = **in } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Priority != nil { in, out := &in.Priority, &out.Priority *out = new(int64) @@ -2822,6 +2847,11 @@ func (in *ResolverQueryLogConfigParameters) DeepCopyInto(out *ResolverQueryLogCo *out = new(string) **out = **in } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -2992,6 +3022,11 @@ func (in *ResolverRuleAssociationObservation) DeepCopy() *ResolverRuleAssociatio // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResolverRuleAssociationParameters) DeepCopyInto(out *ResolverRuleAssociationParameters) { *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) @@ -3138,6 +3173,11 @@ func (in *ResolverRuleParameters) DeepCopyInto(out *ResolverRuleParameters) { *out = new(string) **out = **in } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.Region != nil { in, out := &in.Region, &out.Region *out = new(string) diff --git a/apis/route53/v1alpha1/zz_resolverendpoint_types.go b/apis/route53/v1alpha1/zz_resolverendpoint_types.go index 3587913dd..01bcc7302 100755 --- a/apis/route53/v1alpha1/zz_resolverendpoint_types.go +++ b/apis/route53/v1alpha1/zz_resolverendpoint_types.go @@ -54,6 +54,9 @@ type ResolverEndpointParameters struct { // +kubebuilder:validation:Required IPAddress []IPAddressParameters `json:"ipAddress" tf:"ip_address,omitempty"` + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/route53/v1alpha1/zz_resolverfirewalldomainlist_types.go b/apis/route53/v1alpha1/zz_resolverfirewalldomainlist_types.go index 84e17e534..ea59f58e4 100755 --- a/apis/route53/v1alpha1/zz_resolverfirewalldomainlist_types.go +++ b/apis/route53/v1alpha1/zz_resolverfirewalldomainlist_types.go @@ -36,6 +36,9 @@ type ResolverFirewallDomainListParameters struct { // +kubebuilder:validation:Optional Domains []*string `json:"domains,omitempty" tf:"domains,omitempty"` + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/route53/v1alpha1/zz_resolverfirewallrule_types.go b/apis/route53/v1alpha1/zz_resolverfirewallrule_types.go index f362c5831..15f013003 100755 --- a/apis/route53/v1alpha1/zz_resolverfirewallrule_types.go +++ b/apis/route53/v1alpha1/zz_resolverfirewallrule_types.go @@ -51,6 +51,9 @@ type ResolverFirewallRuleParameters struct { // +kubebuilder:validation:Required FirewallRuleGroupID *string `json:"firewallRuleGroupId" tf:"firewall_rule_group_id,omitempty"` + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + // +kubebuilder:validation:Required Priority *int64 `json:"priority" tf:"priority,omitempty"` diff --git a/apis/route53/v1alpha1/zz_resolverfirewallrulegroup_types.go b/apis/route53/v1alpha1/zz_resolverfirewallrulegroup_types.go index 3d94a39e7..b8540ee01 100755 --- a/apis/route53/v1alpha1/zz_resolverfirewallrulegroup_types.go +++ b/apis/route53/v1alpha1/zz_resolverfirewallrulegroup_types.go @@ -39,6 +39,9 @@ type ResolverFirewallRuleGroupObservation struct { type ResolverFirewallRuleGroupParameters struct { + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/route53/v1alpha1/zz_resolverfirewallrulegroupassociation_types.go b/apis/route53/v1alpha1/zz_resolverfirewallrulegroupassociation_types.go index fcd0c1c58..1a7863f67 100755 --- a/apis/route53/v1alpha1/zz_resolverfirewallrulegroupassociation_types.go +++ b/apis/route53/v1alpha1/zz_resolverfirewallrulegroupassociation_types.go @@ -39,6 +39,9 @@ type ResolverFirewallRuleGroupAssociationParameters struct { // +kubebuilder:validation:Optional MutationProtection *string `json:"mutationProtection,omitempty" tf:"mutation_protection,omitempty"` + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + // +kubebuilder:validation:Required Priority *int64 `json:"priority" tf:"priority,omitempty"` diff --git a/apis/route53/v1alpha1/zz_resolverquerylogconfig_types.go b/apis/route53/v1alpha1/zz_resolverquerylogconfig_types.go index 03ce6c1ac..489160d03 100755 --- a/apis/route53/v1alpha1/zz_resolverquerylogconfig_types.go +++ b/apis/route53/v1alpha1/zz_resolverquerylogconfig_types.go @@ -40,6 +40,9 @@ type ResolverQueryLogConfigParameters struct { // +kubebuilder:validation:Required DestinationArn *string `json:"destinationArn" tf:"destination_arn,omitempty"` + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/route53/v1alpha1/zz_resolverrule_types.go b/apis/route53/v1alpha1/zz_resolverrule_types.go index 9243e008b..82fa39544 100755 --- a/apis/route53/v1alpha1/zz_resolverrule_types.go +++ b/apis/route53/v1alpha1/zz_resolverrule_types.go @@ -40,6 +40,9 @@ type ResolverRuleParameters struct { // +kubebuilder:validation:Required DomainName *string `json:"domainName" tf:"domain_name,omitempty"` + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/apis/route53/v1alpha1/zz_resolverruleassociation_types.go b/apis/route53/v1alpha1/zz_resolverruleassociation_types.go index 0cc4d9924..4b4534b01 100755 --- a/apis/route53/v1alpha1/zz_resolverruleassociation_types.go +++ b/apis/route53/v1alpha1/zz_resolverruleassociation_types.go @@ -30,6 +30,9 @@ type ResolverRuleAssociationObservation struct { type ResolverRuleAssociationParameters struct { + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + // Region is the region you'd like your resource to be created in. // +terrajet:crd:field:TFTag=- // +kubebuilder:validation:Required diff --git a/internal/controller/ec2/peeringconnectionaccepter/zz_controller.go b/internal/controller/ec2/peeringconnectionaccepter/zz_controller.go index 5e2a510c1..c6fd65d0c 100755 --- a/internal/controller/ec2/peeringconnectionaccepter/zz_controller.go +++ b/internal/controller/ec2/peeringconnectionaccepter/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/ecs/cluster/zz_controller.go b/internal/controller/ecs/cluster/zz_controller.go index cf2ebf8de..4dcd263b3 100755 --- a/internal/controller/ecs/cluster/zz_controller.go +++ b/internal/controller/ecs/cluster/zz_controller.go @@ -49,7 +49,6 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), - managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/eks/addon/zz_controller.go b/internal/controller/eks/addon/zz_controller.go index 8e8fbbbde..4f73a2c2c 100755 --- a/internal/controller/eks/addon/zz_controller.go +++ b/internal/controller/eks/addon/zz_controller.go @@ -47,7 +47,6 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), - managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/elasticache/parametergroup/zz_controller.go b/internal/controller/elasticache/parametergroup/zz_controller.go index f8fd50590..6c005ec58 100755 --- a/internal/controller/elasticache/parametergroup/zz_controller.go +++ b/internal/controller/elasticache/parametergroup/zz_controller.go @@ -47,7 +47,6 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), - managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/iam/grouppolicy/zz_controller.go b/internal/controller/iam/grouppolicy/zz_controller.go deleted file mode 100755 index 339d98e7f..000000000 --- a/internal/controller/iam/grouppolicy/zz_controller.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package grouppolicy - -import ( - "time" - - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" - tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller" - "github.com/crossplane-contrib/terrajet/pkg/terraform" - - v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha1" -) - -// Setup adds a controller that reconciles GroupPolicy managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { - name := managed.ControllerName(v1alpha1.GroupPolicy_GroupVersionKind.String()) - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.GroupPolicy_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_group_policy"])), - managed.WithLogger(l.WithValues("controller", name)), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), - ) - - return ctrl.NewControllerManagedBy(mgr). - Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). - For(&v1alpha1.GroupPolicy{}). - Complete(r) -} diff --git a/internal/controller/iam/policyattachment/zz_controller.go b/internal/controller/iam/policyattachment/zz_controller.go deleted file mode 100755 index dfe8dd24a..000000000 --- a/internal/controller/iam/policyattachment/zz_controller.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package policyattachment - -import ( - "time" - - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" - tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller" - "github.com/crossplane-contrib/terrajet/pkg/terraform" - - v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha1" -) - -// Setup adds a controller that reconciles PolicyAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { - name := managed.ControllerName(v1alpha1.PolicyAttachment_GroupVersionKind.String()) - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.PolicyAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_policy_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), - managed.WithInitializers(), - ) - - return ctrl.NewControllerManagedBy(mgr). - Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). - For(&v1alpha1.PolicyAttachment{}). - Complete(r) -} diff --git a/internal/controller/iam/rolepolicy/zz_controller.go b/internal/controller/iam/rolepolicy/zz_controller.go deleted file mode 100755 index 524a7d420..000000000 --- a/internal/controller/iam/rolepolicy/zz_controller.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package rolepolicy - -import ( - "time" - - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" - tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller" - "github.com/crossplane-contrib/terrajet/pkg/terraform" - - v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha1" -) - -// Setup adds a controller that reconciles RolePolicy managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { - name := managed.ControllerName(v1alpha1.RolePolicy_GroupVersionKind.String()) - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.RolePolicy_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_role_policy"])), - managed.WithLogger(l.WithValues("controller", name)), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), - ) - - return ctrl.NewControllerManagedBy(mgr). - Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). - For(&v1alpha1.RolePolicy{}). - Complete(r) -} diff --git a/internal/controller/iam/userpolicy/zz_controller.go b/internal/controller/iam/userpolicy/zz_controller.go deleted file mode 100755 index bf1b11069..000000000 --- a/internal/controller/iam/userpolicy/zz_controller.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2021 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by terrajet. DO NOT EDIT. - -package userpolicy - -import ( - "time" - - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane-contrib/terrajet/pkg/config" - tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller" - "github.com/crossplane-contrib/terrajet/pkg/terraform" - - v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha1" -) - -// Setup adds a controller that reconciles UserPolicy managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { - name := managed.ControllerName(v1alpha1.UserPolicy_GroupVersionKind.String()) - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.UserPolicy_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_user_policy"])), - managed.WithLogger(l.WithValues("controller", name)), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), - managed.WithInitializers(), - ) - - return ctrl.NewControllerManagedBy(mgr). - Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). - For(&v1alpha1.UserPolicy{}). - Complete(r) -} diff --git a/internal/controller/route53/resolverdnssecconfig/zz_controller.go b/internal/controller/route53/resolverdnssecconfig/zz_controller.go index 7cb1e1e5c..f8add848c 100755 --- a/internal/controller/route53/resolverdnssecconfig/zz_controller.go +++ b/internal/controller/route53/resolverdnssecconfig/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverendpoint/zz_controller.go b/internal/controller/route53/resolverendpoint/zz_controller.go index 11a4f7b7c..65e9e3fe2 100755 --- a/internal/controller/route53/resolverendpoint/zz_controller.go +++ b/internal/controller/route53/resolverendpoint/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverfirewallconfig/zz_controller.go b/internal/controller/route53/resolverfirewallconfig/zz_controller.go index c9d2caef5..6cc172c7d 100755 --- a/internal/controller/route53/resolverfirewallconfig/zz_controller.go +++ b/internal/controller/route53/resolverfirewallconfig/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverfirewalldomainlist/zz_controller.go b/internal/controller/route53/resolverfirewalldomainlist/zz_controller.go index 33781942a..544aed4b0 100755 --- a/internal/controller/route53/resolverfirewalldomainlist/zz_controller.go +++ b/internal/controller/route53/resolverfirewalldomainlist/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverfirewallrule/zz_controller.go b/internal/controller/route53/resolverfirewallrule/zz_controller.go index 9cdb4a01a..fe7992ae3 100755 --- a/internal/controller/route53/resolverfirewallrule/zz_controller.go +++ b/internal/controller/route53/resolverfirewallrule/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverfirewallrulegroup/zz_controller.go b/internal/controller/route53/resolverfirewallrulegroup/zz_controller.go index fb2497309..780e30bcd 100755 --- a/internal/controller/route53/resolverfirewallrulegroup/zz_controller.go +++ b/internal/controller/route53/resolverfirewallrulegroup/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverfirewallrulegroupassociation/zz_controller.go b/internal/controller/route53/resolverfirewallrulegroupassociation/zz_controller.go index ecc5890c2..2ec957fbb 100755 --- a/internal/controller/route53/resolverfirewallrulegroupassociation/zz_controller.go +++ b/internal/controller/route53/resolverfirewallrulegroupassociation/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverquerylogconfig/zz_controller.go b/internal/controller/route53/resolverquerylogconfig/zz_controller.go index 3787e90b2..16ed42732 100755 --- a/internal/controller/route53/resolverquerylogconfig/zz_controller.go +++ b/internal/controller/route53/resolverquerylogconfig/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverquerylogconfigassociation/zz_controller.go b/internal/controller/route53/resolverquerylogconfigassociation/zz_controller.go index ca3f7d699..73193d35c 100755 --- a/internal/controller/route53/resolverquerylogconfigassociation/zz_controller.go +++ b/internal/controller/route53/resolverquerylogconfigassociation/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverrule/zz_controller.go b/internal/controller/route53/resolverrule/zz_controller.go index ff1b6140f..999133957 100755 --- a/internal/controller/route53/resolverrule/zz_controller.go +++ b/internal/controller/route53/resolverrule/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/route53/resolverruleassociation/zz_controller.go b/internal/controller/route53/resolverruleassociation/zz_controller.go index 914dc93fc..eb579e3ff 100755 --- a/internal/controller/route53/resolverruleassociation/zz_controller.go +++ b/internal/controller/route53/resolverruleassociation/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/s3/bucket/zz_controller.go b/internal/controller/s3/bucket/zz_controller.go index 9a7544b80..2253feb92 100755 --- a/internal/controller/s3/bucket/zz_controller.go +++ b/internal/controller/s3/bucket/zz_controller.go @@ -47,6 +47,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terra managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), + managed.WithInitializers(), ) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index de3216e94..d28028a5e 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -72,17 +72,13 @@ import ( targetgroupattachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/elasticloadbalancing/targetgroupattachment" accesskey "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/accesskey" group "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/group" - grouppolicy "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/grouppolicy" grouppolicyattachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/grouppolicyattachment" instanceprofile "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/instanceprofile" policy "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/policy" - policyattachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/policyattachment" role "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/role" - rolepolicy "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/rolepolicy" rolepolicyattachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/rolepolicyattachment" useriam "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/user" usergroupmembership "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/usergroupmembership" - userpolicy "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/userpolicy" userpolicyattachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/iam/userpolicyattachment" key "github.com/crossplane-contrib/provider-jet-aws/internal/controller/kms/key" providerconfig "github.com/crossplane-contrib/provider-jet-aws/internal/controller/providerconfig" @@ -163,17 +159,13 @@ func Setup(mgr ctrl.Manager, l logging.Logger, wl workqueue.RateLimiter, ps terr targetgroupattachment.Setup, accesskey.Setup, group.Setup, - grouppolicy.Setup, grouppolicyattachment.Setup, instanceprofile.Setup, policy.Setup, - policyattachment.Setup, role.Setup, - rolepolicy.Setup, rolepolicyattachment.Setup, useriam.Setup, usergroupmembership.Setup, - userpolicy.Setup, userpolicyattachment.Setup, key.Setup, providerconfig.Setup, diff --git a/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml b/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml index cf85347ac..9a88e401e 100644 --- a/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml +++ b/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml @@ -146,10 +146,6 @@ spec: type: string type: object type: array - loadBalancers: - items: - type: string - type: array maxInstanceLifetime: format: int64 type: integer @@ -264,35 +260,6 @@ spec: type: string type: object type: array - targetGroupArns: - items: - type: string - type: array - targetGroupArnsRefs: - items: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - type: array - targetGroupArnsSelector: - description: A Selector selects an object. - 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 - type: object terminationPolicies: items: type: string @@ -400,6 +367,14 @@ spec: properties: arn: type: string + loadBalancers: + items: + type: string + type: array + targetGroupArns: + items: + type: string + type: array type: object conditions: description: Conditions of the resource. diff --git a/package/crds/ec2.aws.jet.crossplane.io_elasticips.yaml b/package/crds/ec2.aws.jet.crossplane.io_elasticips.yaml index 1a91deecb..8cc1a52cb 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_elasticips.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_elasticips.yaml @@ -97,6 +97,29 @@ spec: type: string networkInterface: type: string + networkInterfaceRef: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + required: + - name + type: object + networkInterfaceSelector: + description: A Selector selects an object. + 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 + type: object publicIpv4Pool: type: string region: diff --git a/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml b/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml index 882a5b86a..785d47efd 100644 --- a/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml @@ -135,8 +135,6 @@ spec: - capacityProvider type: object type: array - name: - type: string region: description: Region is the region you'd like your resource to be created in. @@ -158,7 +156,6 @@ spec: type: string type: object required: - - name - region type: object providerConfigRef: diff --git a/package/crds/eks.aws.jet.crossplane.io_addons.yaml b/package/crds/eks.aws.jet.crossplane.io_addons.yaml index 97ac0a2d3..b98732ba0 100644 --- a/package/crds/eks.aws.jet.crossplane.io_addons.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_addons.yaml @@ -62,8 +62,6 @@ spec: type: string forProvider: properties: - addonName: - type: string addonVersion: type: string clusterName: @@ -127,7 +125,6 @@ spec: type: string type: object required: - - addonName - region type: object providerConfigRef: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml b/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml index cb0b56061..7a1672aac 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml @@ -66,8 +66,6 @@ spec: type: string family: type: string - name: - type: string parameter: items: properties: @@ -90,7 +88,6 @@ spec: type: object required: - family - - name - region type: object providerConfigRef: diff --git a/package/crds/elasticloadbalancing.aws.jet.crossplane.io_loadbalancers.yaml b/package/crds/elasticloadbalancing.aws.jet.crossplane.io_loadbalancers.yaml index 60abb8056..9cffb9760 100644 --- a/package/crds/elasticloadbalancing.aws.jet.crossplane.io_loadbalancers.yaml +++ b/package/crds/elasticloadbalancing.aws.jet.crossplane.io_loadbalancers.yaml @@ -118,8 +118,6 @@ spec: type: string name: type: string - namePrefix: - type: string region: description: Region is the region you'd like your resource to be created in. diff --git a/package/crds/elasticloadbalancing.aws.jet.crossplane.io_targetgroups.yaml b/package/crds/elasticloadbalancing.aws.jet.crossplane.io_targetgroups.yaml index e76e48392..03b8f109d 100644 --- a/package/crds/elasticloadbalancing.aws.jet.crossplane.io_targetgroups.yaml +++ b/package/crds/elasticloadbalancing.aws.jet.crossplane.io_targetgroups.yaml @@ -98,8 +98,6 @@ spec: type: string name: type: string - namePrefix: - type: string port: format: int64 type: integer @@ -166,6 +164,7 @@ spec: type: object type: object required: + - name - region type: object providerConfigRef: diff --git a/package/crds/iam.aws.jet.crossplane.io_grouppolicies.yaml b/package/crds/iam.aws.jet.crossplane.io_grouppolicies.yaml deleted file mode 100644 index 04db27855..000000000 --- a/package/crds/iam.aws.jet.crossplane.io_grouppolicies.yaml +++ /dev/null @@ -1,190 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: grouppolicies.iam.aws.jet.crossplane.io -spec: - group: iam.aws.jet.crossplane.io - names: - categories: - - crossplane - - managed - - awsjet - kind: GroupPolicy - listKind: GroupPolicyList - plural: grouppolicies - singular: grouppolicy - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNCED - type: string - - jsonPath: .metadata.annotations.crossplane\.io/external-name - name: EXTERNAL-NAME - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: GroupPolicy is the Schema for the GroupPolicys API - 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: GroupPolicySpec defines the desired state of GroupPolicy - 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. - enum: - - Orphan - - Delete - type: string - forProvider: - properties: - group: - type: string - groupRef: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - groupSelector: - description: A Selector selects an object. - 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 - type: object - policy: - type: string - required: - - policy - type: object - 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 - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - 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. - 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 - status: - description: GroupPolicyStatus defines the observed state of GroupPolicy. - properties: - atProvider: - 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 - 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 - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/iam.aws.jet.crossplane.io_policyattachments.yaml b/package/crds/iam.aws.jet.crossplane.io_policyattachments.yaml deleted file mode 100644 index fd994183c..000000000 --- a/package/crds/iam.aws.jet.crossplane.io_policyattachments.yaml +++ /dev/null @@ -1,277 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: policyattachments.iam.aws.jet.crossplane.io -spec: - group: iam.aws.jet.crossplane.io - names: - categories: - - crossplane - - managed - - awsjet - kind: PolicyAttachment - listKind: PolicyAttachmentList - plural: policyattachments - singular: policyattachment - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNCED - type: string - - jsonPath: .metadata.annotations.crossplane\.io/external-name - name: EXTERNAL-NAME - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: PolicyAttachment is the Schema for the PolicyAttachments API - 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: PolicyAttachmentSpec defines the desired state of PolicyAttachment - 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. - enum: - - Orphan - - Delete - type: string - forProvider: - properties: - groupRefs: - items: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - type: array - groupSelector: - description: A Selector selects an object. - 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 - type: object - groups: - items: - type: string - type: array - name: - type: string - policyArn: - type: string - policyArnRef: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - policyArnSelector: - description: A Selector selects an object. - 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 - type: object - roleRefs: - items: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - type: array - roleSelector: - description: A Selector selects an object. - 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 - type: object - roles: - items: - type: string - type: array - userRefs: - items: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - type: array - userSelector: - description: A Selector selects an object. - 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 - type: object - users: - items: - type: string - type: array - required: - - name - type: object - 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 - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - 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. - 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 - status: - description: PolicyAttachmentStatus defines the observed state of PolicyAttachment. - properties: - atProvider: - 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 - 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 - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/iam.aws.jet.crossplane.io_rolepolicies.yaml b/package/crds/iam.aws.jet.crossplane.io_rolepolicies.yaml deleted file mode 100644 index 264c94dbf..000000000 --- a/package/crds/iam.aws.jet.crossplane.io_rolepolicies.yaml +++ /dev/null @@ -1,168 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: rolepolicies.iam.aws.jet.crossplane.io -spec: - group: iam.aws.jet.crossplane.io - names: - categories: - - crossplane - - managed - - awsjet - kind: RolePolicy - listKind: RolePolicyList - plural: rolepolicies - singular: rolepolicy - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNCED - type: string - - jsonPath: .metadata.annotations.crossplane\.io/external-name - name: EXTERNAL-NAME - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: RolePolicy is the Schema for the RolePolicys API - 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: RolePolicySpec defines the desired state of RolePolicy - 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. - enum: - - Orphan - - Delete - type: string - forProvider: - properties: - policy: - type: string - role: - type: string - required: - - policy - - role - type: object - 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 - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - 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. - 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 - status: - description: RolePolicyStatus defines the observed state of RolePolicy. - properties: - atProvider: - 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 - 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 - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/iam.aws.jet.crossplane.io_userpolicies.yaml b/package/crds/iam.aws.jet.crossplane.io_userpolicies.yaml deleted file mode 100644 index 65aca312e..000000000 --- a/package/crds/iam.aws.jet.crossplane.io_userpolicies.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: userpolicies.iam.aws.jet.crossplane.io -spec: - group: iam.aws.jet.crossplane.io - names: - categories: - - crossplane - - managed - - awsjet - kind: UserPolicy - listKind: UserPolicyList - plural: userpolicies - singular: userpolicy - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNCED - type: string - - jsonPath: .metadata.annotations.crossplane\.io/external-name - name: EXTERNAL-NAME - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: UserPolicy is the Schema for the UserPolicys API - 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: UserPolicySpec defines the desired state of UserPolicy - 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. - enum: - - Orphan - - Delete - type: string - forProvider: - properties: - name: - type: string - namePrefix: - type: string - policy: - type: string - user: - type: string - userRef: - description: A Reference to a named object. - properties: - name: - description: Name of the referenced object. - type: string - required: - - name - type: object - userSelector: - description: A Selector selects an object. - 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 - type: object - required: - - policy - type: object - 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 - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - 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. - 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 - status: - description: UserPolicyStatus defines the observed state of UserPolicy. - properties: - atProvider: - 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 - 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 - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverendpoints.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverendpoints.yaml index 7141ddd1a..e1beaa5bc 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverendpoints.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverendpoints.yaml @@ -75,6 +75,8 @@ spec: - subnetId type: object type: array + name: + type: string region: description: Region is the region you'd like your resource to be created in. diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverfirewalldomainlists.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverfirewalldomainlists.yaml index 111c99f6a..456105ab2 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverfirewalldomainlists.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverfirewalldomainlists.yaml @@ -68,6 +68,8 @@ spec: items: type: string type: array + name: + type: string region: description: Region is the region you'd like your resource to be created in. @@ -77,6 +79,7 @@ spec: type: string type: object required: + - name - region type: object providerConfigRef: diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroupassociations.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroupassociations.yaml index 3251620bd..7ffcb5342 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroupassociations.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroupassociations.yaml @@ -68,6 +68,8 @@ spec: type: string mutationProtection: type: string + name: + type: string priority: format: int64 type: integer @@ -83,6 +85,7 @@ spec: type: string required: - firewallRuleGroupId + - name - priority - region - vpcId diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroups.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroups.yaml index 9ef161370..42c53ad0d 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroups.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrulegroups.yaml @@ -64,6 +64,8 @@ spec: type: string forProvider: properties: + name: + type: string region: description: Region is the region you'd like your resource to be created in. @@ -73,6 +75,7 @@ spec: type: string type: object required: + - name - region type: object providerConfigRef: diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrules.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrules.yaml index 40e0a6263..7e9288213 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrules.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverfirewallrules.yaml @@ -78,6 +78,8 @@ spec: type: string firewallRuleGroupId: type: string + name: + type: string priority: format: int64 type: integer @@ -89,6 +91,7 @@ spec: - action - firewallDomainListId - firewallRuleGroupId + - name - priority - region type: object diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverquerylogconfigs.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverquerylogconfigs.yaml index 4c3d9728a..a420d981c 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverquerylogconfigs.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverquerylogconfigs.yaml @@ -65,6 +65,8 @@ spec: properties: destinationArn: type: string + name: + type: string region: description: Region is the region you'd like your resource to be created in. @@ -75,6 +77,7 @@ spec: type: object required: - destinationArn + - name - region type: object providerConfigRef: diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverruleassociations.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverruleassociations.yaml index 787f9979e..ac339e2a9 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverruleassociations.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverruleassociations.yaml @@ -64,6 +64,8 @@ spec: type: string forProvider: properties: + name: + type: string region: description: Region is the region you'd like your resource to be created in. diff --git a/package/crds/route53.aws.jet.crossplane.io_resolverrules.yaml b/package/crds/route53.aws.jet.crossplane.io_resolverrules.yaml index 2039a718c..33154d780 100644 --- a/package/crds/route53.aws.jet.crossplane.io_resolverrules.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_resolverrules.yaml @@ -64,6 +64,8 @@ spec: properties: domainName: type: string + name: + type: string region: description: Region is the region you'd like your resource to be created in. From 0d1c76d1a16bc8f26d3c2caab62cfbcb94e7e09f Mon Sep 17 00:00:00 2001 From: Muvaffak Onus Date: Fri, 19 Nov 2021 21:42:24 +0300 Subject: [PATCH 5/5] update to latest terrajet to get late-init fix Signed-off-by: Muvaffak Onus --- apis/ec2/v1alpha1/zz_launchtemplate_terraformed.go | 2 +- apis/ec2/v1alpha1/zz_networkinterface_terraformed.go | 2 +- .../v1alpha1/zz_targetgroup_terraformed.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apis/ec2/v1alpha1/zz_launchtemplate_terraformed.go b/apis/ec2/v1alpha1/zz_launchtemplate_terraformed.go index e7ab5b85d..58269fdad 100755 --- a/apis/ec2/v1alpha1/zz_launchtemplate_terraformed.go +++ b/apis/ec2/v1alpha1/zz_launchtemplate_terraformed.go @@ -76,7 +76,7 @@ func (tr *LaunchTemplate) SetParameters(params map[string]interface{}) error { // LateInitialize this LaunchTemplate using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *LaunchTemplate) LateInitialize(attrs []byte) (bool, error) { - params := &LaunchTemplateParameters{} + params := &LaunchTemplateParameters_2{} if err := json.TFParser.Unmarshal(attrs, params); err != nil { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } diff --git a/apis/ec2/v1alpha1/zz_networkinterface_terraformed.go b/apis/ec2/v1alpha1/zz_networkinterface_terraformed.go index d8c022447..754907612 100755 --- a/apis/ec2/v1alpha1/zz_networkinterface_terraformed.go +++ b/apis/ec2/v1alpha1/zz_networkinterface_terraformed.go @@ -76,7 +76,7 @@ func (tr *NetworkInterface) SetParameters(params map[string]interface{}) error { // LateInitialize this NetworkInterface using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *NetworkInterface) LateInitialize(attrs []byte) (bool, error) { - params := &NetworkInterfaceParameters{} + params := &NetworkInterfaceParameters_2{} if err := json.TFParser.Unmarshal(attrs, params); err != nil { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } diff --git a/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_terraformed.go b/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_terraformed.go index 66e663278..9981a8cb9 100755 --- a/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_terraformed.go +++ b/apis/elasticloadbalancing/v1alpha1/zz_targetgroup_terraformed.go @@ -76,7 +76,7 @@ func (tr *TargetGroup) SetParameters(params map[string]interface{}) error { // LateInitialize this TargetGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *TargetGroup) LateInitialize(attrs []byte) (bool, error) { - params := &TargetGroupParameters{} + params := &TargetGroupParameters_2{} if err := json.TFParser.Unmarshal(attrs, params); err != nil { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } diff --git a/go.mod b/go.mod index 68a82233c..4aab050f5 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/aws/aws-sdk-go-v2 v0.23.0 - github.com/crossplane-contrib/terrajet v0.2.0 + github.com/crossplane-contrib/terrajet v0.2.1 github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e github.com/crossplane/provider-aws v0.19.0 diff --git a/go.sum b/go.sum index 4b8dfecc5..63f7dc4a7 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane-contrib/terrajet v0.2.0 h1:frs9Uqq4yddhvfjIsKbctW+MBnKkYPi6XHYwh6vlOLw= -github.com/crossplane-contrib/terrajet v0.2.0/go.mod h1:RUsskXE63KZE7EcvZ7WK4UzBQjc1+7IhelK+/gIa/Go= +github.com/crossplane-contrib/terrajet v0.2.1 h1:oTdBSYyHlKfWiwGBM9hClYU/BdWhMz490xwfQBDv11Q= +github.com/crossplane-contrib/terrajet v0.2.1/go.mod h1:RUsskXE63KZE7EcvZ7WK4UzBQjc1+7IhelK+/gIa/Go= github.com/crossplane/crossplane-runtime v0.14.0/go.mod h1:Bc54/KBvV9ld/tvervcnhcSzk13FYguTqmYt72Mybps= github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 h1:Sk3QurYYpy8x3c0DvTh9iGYFSv8WgdhnjCalNqNqlRI= github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513/go.mod h1:gKix9Gq5kRzVe/4XOpwlFgG7OurzrYayviJxWZakhw0=