From 53599efe050abd69932acbc080ba9d9ff5090c0e Mon Sep 17 00:00:00 2001 From: Erhan Cagirici Date: Tue, 12 Mar 2024 13:31:16 +0300 Subject: [PATCH] remove AWS TF Meta client copies from tf setup These copies are not needed anymore after refactoring the AWS configuration logic to not use native provider Configure() Signed-off-by: Erhan Cagirici --- cmd/generator/main.go | 2 +- cmd/provider/accessanalyzer/zz_main.go | 3 +-- cmd/provider/account/zz_main.go | 3 +-- cmd/provider/acm/zz_main.go | 3 +-- cmd/provider/acmpca/zz_main.go | 3 +-- cmd/provider/amp/zz_main.go | 3 +-- cmd/provider/amplify/zz_main.go | 3 +-- cmd/provider/apigateway/zz_main.go | 3 +-- cmd/provider/apigatewayv2/zz_main.go | 3 +-- cmd/provider/appautoscaling/zz_main.go | 3 +-- cmd/provider/appconfig/zz_main.go | 3 +-- cmd/provider/appflow/zz_main.go | 3 +-- cmd/provider/appintegrations/zz_main.go | 3 +-- cmd/provider/applicationinsights/zz_main.go | 3 +-- cmd/provider/appmesh/zz_main.go | 3 +-- cmd/provider/apprunner/zz_main.go | 3 +-- cmd/provider/appstream/zz_main.go | 3 +-- cmd/provider/appsync/zz_main.go | 3 +-- cmd/provider/athena/zz_main.go | 3 +-- cmd/provider/autoscaling/zz_main.go | 3 +-- cmd/provider/autoscalingplans/zz_main.go | 3 +-- cmd/provider/backup/zz_main.go | 3 +-- cmd/provider/batch/zz_main.go | 3 +-- cmd/provider/budgets/zz_main.go | 3 +-- cmd/provider/ce/zz_main.go | 3 +-- cmd/provider/chime/zz_main.go | 3 +-- cmd/provider/cloud9/zz_main.go | 3 +-- cmd/provider/cloudcontrol/zz_main.go | 3 +-- cmd/provider/cloudformation/zz_main.go | 3 +-- cmd/provider/cloudfront/zz_main.go | 3 +-- cmd/provider/cloudsearch/zz_main.go | 3 +-- cmd/provider/cloudtrail/zz_main.go | 3 +-- cmd/provider/cloudwatch/zz_main.go | 3 +-- cmd/provider/cloudwatchevents/zz_main.go | 3 +-- cmd/provider/cloudwatchlogs/zz_main.go | 3 +-- cmd/provider/codecommit/zz_main.go | 3 +-- cmd/provider/codepipeline/zz_main.go | 3 +-- cmd/provider/codestarconnections/zz_main.go | 3 +-- cmd/provider/codestarnotifications/zz_main.go | 3 +-- cmd/provider/cognitoidentity/zz_main.go | 3 +-- cmd/provider/cognitoidp/zz_main.go | 3 +-- cmd/provider/config/zz_main.go | 3 +-- cmd/provider/configservice/zz_main.go | 3 +-- cmd/provider/connect/zz_main.go | 3 +-- cmd/provider/cur/zz_main.go | 3 +-- cmd/provider/dataexchange/zz_main.go | 3 +-- cmd/provider/datapipeline/zz_main.go | 3 +-- cmd/provider/datasync/zz_main.go | 3 +-- cmd/provider/dax/zz_main.go | 3 +-- cmd/provider/deploy/zz_main.go | 3 +-- cmd/provider/detective/zz_main.go | 3 +-- cmd/provider/devicefarm/zz_main.go | 3 +-- cmd/provider/directconnect/zz_main.go | 3 +-- cmd/provider/dlm/zz_main.go | 3 +-- cmd/provider/dms/zz_main.go | 3 +-- cmd/provider/docdb/zz_main.go | 3 +-- cmd/provider/ds/zz_main.go | 3 +-- cmd/provider/dynamodb/zz_main.go | 3 +-- cmd/provider/ec2/zz_main.go | 3 +-- cmd/provider/ecr/zz_main.go | 3 +-- cmd/provider/ecrpublic/zz_main.go | 3 +-- cmd/provider/ecs/zz_main.go | 3 +-- cmd/provider/efs/zz_main.go | 3 +-- cmd/provider/eks/zz_main.go | 3 +-- cmd/provider/elasticache/zz_main.go | 3 +-- cmd/provider/elasticbeanstalk/zz_main.go | 3 +-- cmd/provider/elasticsearch/zz_main.go | 3 +-- cmd/provider/elastictranscoder/zz_main.go | 3 +-- cmd/provider/elb/zz_main.go | 3 +-- cmd/provider/elbv2/zz_main.go | 3 +-- cmd/provider/emr/zz_main.go | 3 +-- cmd/provider/emrserverless/zz_main.go | 3 +-- cmd/provider/evidently/zz_main.go | 3 +-- cmd/provider/firehose/zz_main.go | 3 +-- cmd/provider/fis/zz_main.go | 3 +-- cmd/provider/fsx/zz_main.go | 3 +-- cmd/provider/gamelift/zz_main.go | 3 +-- cmd/provider/glacier/zz_main.go | 3 +-- cmd/provider/globalaccelerator/zz_main.go | 3 +-- cmd/provider/glue/zz_main.go | 3 +-- cmd/provider/grafana/zz_main.go | 3 +-- cmd/provider/guardduty/zz_main.go | 3 +-- cmd/provider/iam/zz_main.go | 3 +-- cmd/provider/identitystore/zz_main.go | 3 +-- cmd/provider/imagebuilder/zz_main.go | 3 +-- cmd/provider/inspector/zz_main.go | 3 +-- cmd/provider/inspector2/zz_main.go | 3 +-- cmd/provider/iot/zz_main.go | 3 +-- cmd/provider/ivs/zz_main.go | 3 +-- cmd/provider/kafka/zz_main.go | 3 +-- cmd/provider/kendra/zz_main.go | 3 +-- cmd/provider/keyspaces/zz_main.go | 3 +-- cmd/provider/kinesis/zz_main.go | 3 +-- cmd/provider/kinesisanalytics/zz_main.go | 3 +-- cmd/provider/kinesisanalyticsv2/zz_main.go | 3 +-- cmd/provider/kinesisvideo/zz_main.go | 3 +-- cmd/provider/kms/zz_main.go | 3 +-- cmd/provider/lakeformation/zz_main.go | 3 +-- cmd/provider/lambda/zz_main.go | 3 +-- cmd/provider/lexmodels/zz_main.go | 3 +-- cmd/provider/licensemanager/zz_main.go | 3 +-- cmd/provider/lightsail/zz_main.go | 3 +-- cmd/provider/location/zz_main.go | 3 +-- cmd/provider/macie2/zz_main.go | 3 +-- cmd/provider/mediaconvert/zz_main.go | 3 +-- cmd/provider/medialive/zz_main.go | 3 +-- cmd/provider/mediapackage/zz_main.go | 3 +-- cmd/provider/mediastore/zz_main.go | 3 +-- cmd/provider/memorydb/zz_main.go | 3 +-- cmd/provider/monolith/zz_main.go | 3 +-- cmd/provider/mq/zz_main.go | 3 +-- cmd/provider/neptune/zz_main.go | 3 +-- cmd/provider/networkfirewall/zz_main.go | 3 +-- cmd/provider/networkmanager/zz_main.go | 3 +-- cmd/provider/opensearch/zz_main.go | 3 +-- cmd/provider/opensearchserverless/zz_main.go | 3 +-- cmd/provider/opsworks/zz_main.go | 3 +-- cmd/provider/organizations/zz_main.go | 3 +-- cmd/provider/pinpoint/zz_main.go | 3 +-- cmd/provider/qldb/zz_main.go | 3 +-- cmd/provider/quicksight/zz_main.go | 3 +-- cmd/provider/ram/zz_main.go | 3 +-- cmd/provider/rds/zz_main.go | 3 +-- cmd/provider/redshift/zz_main.go | 3 +-- cmd/provider/redshiftserverless/zz_main.go | 3 +-- cmd/provider/resourcegroups/zz_main.go | 3 +-- cmd/provider/rolesanywhere/zz_main.go | 3 +-- cmd/provider/route53/zz_main.go | 3 +-- .../route53recoverycontrolconfig/zz_main.go | 3 +-- .../route53recoveryreadiness/zz_main.go | 3 +-- cmd/provider/route53resolver/zz_main.go | 3 +-- cmd/provider/rum/zz_main.go | 3 +-- cmd/provider/s3/zz_main.go | 3 +-- cmd/provider/s3control/zz_main.go | 3 +-- cmd/provider/sagemaker/zz_main.go | 3 +-- cmd/provider/scheduler/zz_main.go | 3 +-- cmd/provider/schemas/zz_main.go | 3 +-- cmd/provider/secretsmanager/zz_main.go | 3 +-- cmd/provider/securityhub/zz_main.go | 3 +-- cmd/provider/serverlessrepo/zz_main.go | 3 +-- cmd/provider/servicecatalog/zz_main.go | 3 +-- cmd/provider/servicediscovery/zz_main.go | 3 +-- cmd/provider/servicequotas/zz_main.go | 3 +-- cmd/provider/ses/zz_main.go | 3 +-- cmd/provider/sesv2/zz_main.go | 3 +-- cmd/provider/sfn/zz_main.go | 3 +-- cmd/provider/signer/zz_main.go | 3 +-- cmd/provider/simpledb/zz_main.go | 3 +-- cmd/provider/sns/zz_main.go | 3 +-- cmd/provider/sqs/zz_main.go | 3 +-- cmd/provider/ssm/zz_main.go | 3 +-- cmd/provider/ssoadmin/zz_main.go | 3 +-- cmd/provider/swf/zz_main.go | 3 +-- cmd/provider/timestreamwrite/zz_main.go | 3 +-- cmd/provider/transcribe/zz_main.go | 3 +-- cmd/provider/transfer/zz_main.go | 3 +-- cmd/provider/vpc/zz_main.go | 3 +-- cmd/provider/waf/zz_main.go | 3 +-- cmd/provider/wafregional/zz_main.go | 3 +-- cmd/provider/wafv2/zz_main.go | 3 +-- cmd/provider/workspaces/zz_main.go | 3 +-- cmd/provider/xray/zz_main.go | 3 +-- config/provider.go | 19 +++---------------- hack/main.go.tmpl | 3 +-- internal/clients/aws.go | 10 +++++----- 165 files changed, 171 insertions(+), 346 deletions(-) diff --git a/cmd/generator/main.go b/cmd/generator/main.go index b712269082..19356de918 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -43,7 +43,7 @@ func main() { if err != nil { panic(fmt.Sprintf("cannot calculate the absolute path with %s", *repoRoot)) } - p, _, err := config.GetProvider(context.Background(), true) + p, err := config.GetProvider(context.Background(), true) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") dumpGeneratedResourceList(p, generatedResourceList) dumpSkippedResourcesCSV(p, skippedResourcesCSV) diff --git a/cmd/provider/accessanalyzer/zz_main.go b/cmd/provider/accessanalyzer/zz_main.go index 4ba1891bb9..6e30372d66 100644 --- a/cmd/provider/accessanalyzer/zz_main.go +++ b/cmd/provider/accessanalyzer/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/account/zz_main.go b/cmd/provider/account/zz_main.go index 533118d326..f809409824 100644 --- a/cmd/provider/account/zz_main.go +++ b/cmd/provider/account/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/acm/zz_main.go b/cmd/provider/acm/zz_main.go index 252d909f65..f73502681a 100644 --- a/cmd/provider/acm/zz_main.go +++ b/cmd/provider/acm/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/acmpca/zz_main.go b/cmd/provider/acmpca/zz_main.go index 931f4efce1..88a021e255 100644 --- a/cmd/provider/acmpca/zz_main.go +++ b/cmd/provider/acmpca/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/amp/zz_main.go b/cmd/provider/amp/zz_main.go index b9c3a367a8..31ddd0ba83 100644 --- a/cmd/provider/amp/zz_main.go +++ b/cmd/provider/amp/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/amplify/zz_main.go b/cmd/provider/amplify/zz_main.go index 821cb5f295..e21b04d13b 100644 --- a/cmd/provider/amplify/zz_main.go +++ b/cmd/provider/amplify/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/apigateway/zz_main.go b/cmd/provider/apigateway/zz_main.go index 0d4191b11b..38bb29379a 100644 --- a/cmd/provider/apigateway/zz_main.go +++ b/cmd/provider/apigateway/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/apigatewayv2/zz_main.go b/cmd/provider/apigatewayv2/zz_main.go index 0f07395bf0..e78e22779f 100644 --- a/cmd/provider/apigatewayv2/zz_main.go +++ b/cmd/provider/apigatewayv2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appautoscaling/zz_main.go b/cmd/provider/appautoscaling/zz_main.go index 9f30a7ce90..f54ce89e3f 100644 --- a/cmd/provider/appautoscaling/zz_main.go +++ b/cmd/provider/appautoscaling/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appconfig/zz_main.go b/cmd/provider/appconfig/zz_main.go index 026d1d32d4..0827423f11 100644 --- a/cmd/provider/appconfig/zz_main.go +++ b/cmd/provider/appconfig/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appflow/zz_main.go b/cmd/provider/appflow/zz_main.go index 89eff8eaaa..8c2d89b946 100644 --- a/cmd/provider/appflow/zz_main.go +++ b/cmd/provider/appflow/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appintegrations/zz_main.go b/cmd/provider/appintegrations/zz_main.go index ab188623ad..a707d276aa 100644 --- a/cmd/provider/appintegrations/zz_main.go +++ b/cmd/provider/appintegrations/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/applicationinsights/zz_main.go b/cmd/provider/applicationinsights/zz_main.go index aeb8d59c2b..f67e3fa63e 100644 --- a/cmd/provider/applicationinsights/zz_main.go +++ b/cmd/provider/applicationinsights/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appmesh/zz_main.go b/cmd/provider/appmesh/zz_main.go index 64c6b140b2..f3188a1fa4 100644 --- a/cmd/provider/appmesh/zz_main.go +++ b/cmd/provider/appmesh/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/apprunner/zz_main.go b/cmd/provider/apprunner/zz_main.go index 87182d94c8..38de428ba1 100644 --- a/cmd/provider/apprunner/zz_main.go +++ b/cmd/provider/apprunner/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appstream/zz_main.go b/cmd/provider/appstream/zz_main.go index dac9002b3e..37a7236c33 100644 --- a/cmd/provider/appstream/zz_main.go +++ b/cmd/provider/appstream/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/appsync/zz_main.go b/cmd/provider/appsync/zz_main.go index c6de718aee..8d0ecf5dc1 100644 --- a/cmd/provider/appsync/zz_main.go +++ b/cmd/provider/appsync/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/athena/zz_main.go b/cmd/provider/athena/zz_main.go index 57d227824a..1ad46a5ca0 100644 --- a/cmd/provider/athena/zz_main.go +++ b/cmd/provider/athena/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/autoscaling/zz_main.go b/cmd/provider/autoscaling/zz_main.go index b7aff87f49..864c1bb420 100644 --- a/cmd/provider/autoscaling/zz_main.go +++ b/cmd/provider/autoscaling/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/autoscalingplans/zz_main.go b/cmd/provider/autoscalingplans/zz_main.go index b40fbf69d7..19ded881c0 100644 --- a/cmd/provider/autoscalingplans/zz_main.go +++ b/cmd/provider/autoscalingplans/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/backup/zz_main.go b/cmd/provider/backup/zz_main.go index 4e853a6bf6..d35a13af96 100644 --- a/cmd/provider/backup/zz_main.go +++ b/cmd/provider/backup/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/batch/zz_main.go b/cmd/provider/batch/zz_main.go index efc27c5287..cbdaeb23d1 100644 --- a/cmd/provider/batch/zz_main.go +++ b/cmd/provider/batch/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/budgets/zz_main.go b/cmd/provider/budgets/zz_main.go index 9370692eeb..bb6fed7a7b 100644 --- a/cmd/provider/budgets/zz_main.go +++ b/cmd/provider/budgets/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ce/zz_main.go b/cmd/provider/ce/zz_main.go index 9490bbb988..baa8d51930 100644 --- a/cmd/provider/ce/zz_main.go +++ b/cmd/provider/ce/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/chime/zz_main.go b/cmd/provider/chime/zz_main.go index fa0c7752a1..b9690a2380 100644 --- a/cmd/provider/chime/zz_main.go +++ b/cmd/provider/chime/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloud9/zz_main.go b/cmd/provider/cloud9/zz_main.go index 144cf7d1dd..bca879094e 100644 --- a/cmd/provider/cloud9/zz_main.go +++ b/cmd/provider/cloud9/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudcontrol/zz_main.go b/cmd/provider/cloudcontrol/zz_main.go index 4aeac4bc19..dd095d9683 100644 --- a/cmd/provider/cloudcontrol/zz_main.go +++ b/cmd/provider/cloudcontrol/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudformation/zz_main.go b/cmd/provider/cloudformation/zz_main.go index f78c2c4529..5cd2c79858 100644 --- a/cmd/provider/cloudformation/zz_main.go +++ b/cmd/provider/cloudformation/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudfront/zz_main.go b/cmd/provider/cloudfront/zz_main.go index dd87be5830..aa4e443b17 100644 --- a/cmd/provider/cloudfront/zz_main.go +++ b/cmd/provider/cloudfront/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudsearch/zz_main.go b/cmd/provider/cloudsearch/zz_main.go index c9427a4fbc..d59749fa31 100644 --- a/cmd/provider/cloudsearch/zz_main.go +++ b/cmd/provider/cloudsearch/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudtrail/zz_main.go b/cmd/provider/cloudtrail/zz_main.go index b866130a02..55f938817f 100644 --- a/cmd/provider/cloudtrail/zz_main.go +++ b/cmd/provider/cloudtrail/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudwatch/zz_main.go b/cmd/provider/cloudwatch/zz_main.go index bc25595002..f830fd7766 100644 --- a/cmd/provider/cloudwatch/zz_main.go +++ b/cmd/provider/cloudwatch/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudwatchevents/zz_main.go b/cmd/provider/cloudwatchevents/zz_main.go index 1f7055903e..c825fe3750 100644 --- a/cmd/provider/cloudwatchevents/zz_main.go +++ b/cmd/provider/cloudwatchevents/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cloudwatchlogs/zz_main.go b/cmd/provider/cloudwatchlogs/zz_main.go index d20ed8979c..b1ce0742df 100644 --- a/cmd/provider/cloudwatchlogs/zz_main.go +++ b/cmd/provider/cloudwatchlogs/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/codecommit/zz_main.go b/cmd/provider/codecommit/zz_main.go index ef687f1d22..ca5ddf785a 100644 --- a/cmd/provider/codecommit/zz_main.go +++ b/cmd/provider/codecommit/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/codepipeline/zz_main.go b/cmd/provider/codepipeline/zz_main.go index 3d7a18b905..9414996d19 100644 --- a/cmd/provider/codepipeline/zz_main.go +++ b/cmd/provider/codepipeline/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/codestarconnections/zz_main.go b/cmd/provider/codestarconnections/zz_main.go index 3dedf71a53..961d0b25c4 100644 --- a/cmd/provider/codestarconnections/zz_main.go +++ b/cmd/provider/codestarconnections/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/codestarnotifications/zz_main.go b/cmd/provider/codestarnotifications/zz_main.go index 979fd16467..d6b6c074d6 100644 --- a/cmd/provider/codestarnotifications/zz_main.go +++ b/cmd/provider/codestarnotifications/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cognitoidentity/zz_main.go b/cmd/provider/cognitoidentity/zz_main.go index 2a1251b570..3f7b84648a 100644 --- a/cmd/provider/cognitoidentity/zz_main.go +++ b/cmd/provider/cognitoidentity/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cognitoidp/zz_main.go b/cmd/provider/cognitoidp/zz_main.go index cefd0bc728..3e2355ded5 100644 --- a/cmd/provider/cognitoidp/zz_main.go +++ b/cmd/provider/cognitoidp/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/config/zz_main.go b/cmd/provider/config/zz_main.go index c49d2e0493..9ab3ed8f53 100644 --- a/cmd/provider/config/zz_main.go +++ b/cmd/provider/config/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/configservice/zz_main.go b/cmd/provider/configservice/zz_main.go index 21c4f07e13..42f7da9dff 100644 --- a/cmd/provider/configservice/zz_main.go +++ b/cmd/provider/configservice/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/connect/zz_main.go b/cmd/provider/connect/zz_main.go index cecdf399c4..927d7ebb50 100644 --- a/cmd/provider/connect/zz_main.go +++ b/cmd/provider/connect/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/cur/zz_main.go b/cmd/provider/cur/zz_main.go index a49ee730ae..879a32af8d 100644 --- a/cmd/provider/cur/zz_main.go +++ b/cmd/provider/cur/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/dataexchange/zz_main.go b/cmd/provider/dataexchange/zz_main.go index c7863f13be..9dc75c2e3c 100644 --- a/cmd/provider/dataexchange/zz_main.go +++ b/cmd/provider/dataexchange/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/datapipeline/zz_main.go b/cmd/provider/datapipeline/zz_main.go index 52c6ebca6d..8fb3f9a34e 100644 --- a/cmd/provider/datapipeline/zz_main.go +++ b/cmd/provider/datapipeline/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/datasync/zz_main.go b/cmd/provider/datasync/zz_main.go index 617609cba2..22babe52ba 100644 --- a/cmd/provider/datasync/zz_main.go +++ b/cmd/provider/datasync/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/dax/zz_main.go b/cmd/provider/dax/zz_main.go index d844cf0bff..1e94200e54 100644 --- a/cmd/provider/dax/zz_main.go +++ b/cmd/provider/dax/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/deploy/zz_main.go b/cmd/provider/deploy/zz_main.go index 69279bb20f..5a3408b263 100644 --- a/cmd/provider/deploy/zz_main.go +++ b/cmd/provider/deploy/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/detective/zz_main.go b/cmd/provider/detective/zz_main.go index d7e235fd77..6cca90f037 100644 --- a/cmd/provider/detective/zz_main.go +++ b/cmd/provider/detective/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/devicefarm/zz_main.go b/cmd/provider/devicefarm/zz_main.go index 6359365a08..85c9f961c0 100644 --- a/cmd/provider/devicefarm/zz_main.go +++ b/cmd/provider/devicefarm/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/directconnect/zz_main.go b/cmd/provider/directconnect/zz_main.go index 75b63a7bc5..6f79675f36 100644 --- a/cmd/provider/directconnect/zz_main.go +++ b/cmd/provider/directconnect/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/dlm/zz_main.go b/cmd/provider/dlm/zz_main.go index 6a6dc0cb48..9692dd2567 100644 --- a/cmd/provider/dlm/zz_main.go +++ b/cmd/provider/dlm/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/dms/zz_main.go b/cmd/provider/dms/zz_main.go index 934a2ce79b..965e158f28 100644 --- a/cmd/provider/dms/zz_main.go +++ b/cmd/provider/dms/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/docdb/zz_main.go b/cmd/provider/docdb/zz_main.go index 92f8b9f71a..2f01d5a6b2 100644 --- a/cmd/provider/docdb/zz_main.go +++ b/cmd/provider/docdb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ds/zz_main.go b/cmd/provider/ds/zz_main.go index 26582f8753..71a300972b 100644 --- a/cmd/provider/ds/zz_main.go +++ b/cmd/provider/ds/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/dynamodb/zz_main.go b/cmd/provider/dynamodb/zz_main.go index db9aa4f3c2..159d42ffb5 100644 --- a/cmd/provider/dynamodb/zz_main.go +++ b/cmd/provider/dynamodb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ec2/zz_main.go b/cmd/provider/ec2/zz_main.go index e77a504d6b..cac7c795a2 100644 --- a/cmd/provider/ec2/zz_main.go +++ b/cmd/provider/ec2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ecr/zz_main.go b/cmd/provider/ecr/zz_main.go index ddda31ba90..2319d83995 100644 --- a/cmd/provider/ecr/zz_main.go +++ b/cmd/provider/ecr/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ecrpublic/zz_main.go b/cmd/provider/ecrpublic/zz_main.go index b825ec1ca1..2bb5c18230 100644 --- a/cmd/provider/ecrpublic/zz_main.go +++ b/cmd/provider/ecrpublic/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ecs/zz_main.go b/cmd/provider/ecs/zz_main.go index b414f69cd6..f70f739a71 100644 --- a/cmd/provider/ecs/zz_main.go +++ b/cmd/provider/ecs/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/efs/zz_main.go b/cmd/provider/efs/zz_main.go index c8d1995c09..4655c71bb7 100644 --- a/cmd/provider/efs/zz_main.go +++ b/cmd/provider/efs/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/eks/zz_main.go b/cmd/provider/eks/zz_main.go index afc4428b6b..f5bebbfae6 100644 --- a/cmd/provider/eks/zz_main.go +++ b/cmd/provider/eks/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elasticache/zz_main.go b/cmd/provider/elasticache/zz_main.go index bf74611c96..92ca8104d9 100644 --- a/cmd/provider/elasticache/zz_main.go +++ b/cmd/provider/elasticache/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elasticbeanstalk/zz_main.go b/cmd/provider/elasticbeanstalk/zz_main.go index b021d68aee..dc9be4cff0 100644 --- a/cmd/provider/elasticbeanstalk/zz_main.go +++ b/cmd/provider/elasticbeanstalk/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elasticsearch/zz_main.go b/cmd/provider/elasticsearch/zz_main.go index 732d9537ba..1122b2f164 100644 --- a/cmd/provider/elasticsearch/zz_main.go +++ b/cmd/provider/elasticsearch/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elastictranscoder/zz_main.go b/cmd/provider/elastictranscoder/zz_main.go index 93654a784d..43919c325f 100644 --- a/cmd/provider/elastictranscoder/zz_main.go +++ b/cmd/provider/elastictranscoder/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elb/zz_main.go b/cmd/provider/elb/zz_main.go index 34e165aa0d..edc1dd65f2 100644 --- a/cmd/provider/elb/zz_main.go +++ b/cmd/provider/elb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/elbv2/zz_main.go b/cmd/provider/elbv2/zz_main.go index be0da62dee..ccc712098f 100644 --- a/cmd/provider/elbv2/zz_main.go +++ b/cmd/provider/elbv2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/emr/zz_main.go b/cmd/provider/emr/zz_main.go index d9fda9256f..20bc90ca25 100644 --- a/cmd/provider/emr/zz_main.go +++ b/cmd/provider/emr/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/emrserverless/zz_main.go b/cmd/provider/emrserverless/zz_main.go index b5f1776161..7b7cb50f34 100644 --- a/cmd/provider/emrserverless/zz_main.go +++ b/cmd/provider/emrserverless/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/evidently/zz_main.go b/cmd/provider/evidently/zz_main.go index 8337dcdded..49200c4324 100644 --- a/cmd/provider/evidently/zz_main.go +++ b/cmd/provider/evidently/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/firehose/zz_main.go b/cmd/provider/firehose/zz_main.go index cd4f47ff93..5dc0f2b13a 100644 --- a/cmd/provider/firehose/zz_main.go +++ b/cmd/provider/firehose/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/fis/zz_main.go b/cmd/provider/fis/zz_main.go index 7d369560d9..3847c7e6c9 100644 --- a/cmd/provider/fis/zz_main.go +++ b/cmd/provider/fis/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/fsx/zz_main.go b/cmd/provider/fsx/zz_main.go index bdcc82e041..ae195f1945 100644 --- a/cmd/provider/fsx/zz_main.go +++ b/cmd/provider/fsx/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/gamelift/zz_main.go b/cmd/provider/gamelift/zz_main.go index e10e9ed078..6a6a93c483 100644 --- a/cmd/provider/gamelift/zz_main.go +++ b/cmd/provider/gamelift/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/glacier/zz_main.go b/cmd/provider/glacier/zz_main.go index 9bc6687f2c..57e25b2489 100644 --- a/cmd/provider/glacier/zz_main.go +++ b/cmd/provider/glacier/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/globalaccelerator/zz_main.go b/cmd/provider/globalaccelerator/zz_main.go index c17c2d9571..eed2510585 100644 --- a/cmd/provider/globalaccelerator/zz_main.go +++ b/cmd/provider/globalaccelerator/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/glue/zz_main.go b/cmd/provider/glue/zz_main.go index cb2d76c441..e7a6722ef8 100644 --- a/cmd/provider/glue/zz_main.go +++ b/cmd/provider/glue/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/grafana/zz_main.go b/cmd/provider/grafana/zz_main.go index f12d4a29db..b6d654a924 100644 --- a/cmd/provider/grafana/zz_main.go +++ b/cmd/provider/grafana/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/guardduty/zz_main.go b/cmd/provider/guardduty/zz_main.go index e04ef87a99..7775d5da96 100644 --- a/cmd/provider/guardduty/zz_main.go +++ b/cmd/provider/guardduty/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/iam/zz_main.go b/cmd/provider/iam/zz_main.go index aef4a85e70..2a6f4fdef5 100644 --- a/cmd/provider/iam/zz_main.go +++ b/cmd/provider/iam/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/identitystore/zz_main.go b/cmd/provider/identitystore/zz_main.go index 5c2e4afa02..05c1132d09 100644 --- a/cmd/provider/identitystore/zz_main.go +++ b/cmd/provider/identitystore/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/imagebuilder/zz_main.go b/cmd/provider/imagebuilder/zz_main.go index 78b01484ee..3aee2bd62f 100644 --- a/cmd/provider/imagebuilder/zz_main.go +++ b/cmd/provider/imagebuilder/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/inspector/zz_main.go b/cmd/provider/inspector/zz_main.go index 1aba5136d7..38897ff80b 100644 --- a/cmd/provider/inspector/zz_main.go +++ b/cmd/provider/inspector/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/inspector2/zz_main.go b/cmd/provider/inspector2/zz_main.go index 13b7caba5f..c3303e8773 100644 --- a/cmd/provider/inspector2/zz_main.go +++ b/cmd/provider/inspector2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/iot/zz_main.go b/cmd/provider/iot/zz_main.go index 08529c43f4..db9363668d 100644 --- a/cmd/provider/iot/zz_main.go +++ b/cmd/provider/iot/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ivs/zz_main.go b/cmd/provider/ivs/zz_main.go index dea822426a..b21b47081f 100644 --- a/cmd/provider/ivs/zz_main.go +++ b/cmd/provider/ivs/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kafka/zz_main.go b/cmd/provider/kafka/zz_main.go index d3f0433b86..bc9e2278dd 100644 --- a/cmd/provider/kafka/zz_main.go +++ b/cmd/provider/kafka/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kendra/zz_main.go b/cmd/provider/kendra/zz_main.go index d18c5802a7..da665d48fc 100644 --- a/cmd/provider/kendra/zz_main.go +++ b/cmd/provider/kendra/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/keyspaces/zz_main.go b/cmd/provider/keyspaces/zz_main.go index 73b7255d15..530f1e1988 100644 --- a/cmd/provider/keyspaces/zz_main.go +++ b/cmd/provider/keyspaces/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kinesis/zz_main.go b/cmd/provider/kinesis/zz_main.go index ccb20d21ba..f21dedc16e 100644 --- a/cmd/provider/kinesis/zz_main.go +++ b/cmd/provider/kinesis/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kinesisanalytics/zz_main.go b/cmd/provider/kinesisanalytics/zz_main.go index c4b281aa8f..749a46ca44 100644 --- a/cmd/provider/kinesisanalytics/zz_main.go +++ b/cmd/provider/kinesisanalytics/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kinesisanalyticsv2/zz_main.go b/cmd/provider/kinesisanalyticsv2/zz_main.go index aa40a50fbf..32f21b2f09 100644 --- a/cmd/provider/kinesisanalyticsv2/zz_main.go +++ b/cmd/provider/kinesisanalyticsv2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kinesisvideo/zz_main.go b/cmd/provider/kinesisvideo/zz_main.go index a7c12c1999..df18d456d5 100644 --- a/cmd/provider/kinesisvideo/zz_main.go +++ b/cmd/provider/kinesisvideo/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/kms/zz_main.go b/cmd/provider/kms/zz_main.go index 314f3579bb..1c12d38771 100644 --- a/cmd/provider/kms/zz_main.go +++ b/cmd/provider/kms/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/lakeformation/zz_main.go b/cmd/provider/lakeformation/zz_main.go index 8d946068f5..81b7d7c819 100644 --- a/cmd/provider/lakeformation/zz_main.go +++ b/cmd/provider/lakeformation/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/lambda/zz_main.go b/cmd/provider/lambda/zz_main.go index c88412c30a..cccf82f291 100644 --- a/cmd/provider/lambda/zz_main.go +++ b/cmd/provider/lambda/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/lexmodels/zz_main.go b/cmd/provider/lexmodels/zz_main.go index c0d5156cbd..392c42fd66 100644 --- a/cmd/provider/lexmodels/zz_main.go +++ b/cmd/provider/lexmodels/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/licensemanager/zz_main.go b/cmd/provider/licensemanager/zz_main.go index 586e4e2981..76a899fcfe 100644 --- a/cmd/provider/licensemanager/zz_main.go +++ b/cmd/provider/licensemanager/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/lightsail/zz_main.go b/cmd/provider/lightsail/zz_main.go index 74b9660665..7231814f43 100644 --- a/cmd/provider/lightsail/zz_main.go +++ b/cmd/provider/lightsail/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/location/zz_main.go b/cmd/provider/location/zz_main.go index 204c0c6d1a..1b900c24d1 100644 --- a/cmd/provider/location/zz_main.go +++ b/cmd/provider/location/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/macie2/zz_main.go b/cmd/provider/macie2/zz_main.go index 61b68cc53a..30cd3371e6 100644 --- a/cmd/provider/macie2/zz_main.go +++ b/cmd/provider/macie2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/mediaconvert/zz_main.go b/cmd/provider/mediaconvert/zz_main.go index 3f4e435693..7c685985c9 100644 --- a/cmd/provider/mediaconvert/zz_main.go +++ b/cmd/provider/mediaconvert/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/medialive/zz_main.go b/cmd/provider/medialive/zz_main.go index b59d3bd8bf..78632dfa32 100644 --- a/cmd/provider/medialive/zz_main.go +++ b/cmd/provider/medialive/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/mediapackage/zz_main.go b/cmd/provider/mediapackage/zz_main.go index dc6158fe42..a9e4ce6abb 100644 --- a/cmd/provider/mediapackage/zz_main.go +++ b/cmd/provider/mediapackage/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/mediastore/zz_main.go b/cmd/provider/mediastore/zz_main.go index a12f1a3977..f4a06c7c91 100644 --- a/cmd/provider/mediastore/zz_main.go +++ b/cmd/provider/mediastore/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/memorydb/zz_main.go b/cmd/provider/memorydb/zz_main.go index 0ce8bf387e..a1091e0538 100644 --- a/cmd/provider/memorydb/zz_main.go +++ b/cmd/provider/memorydb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/monolith/zz_main.go b/cmd/provider/monolith/zz_main.go index b2d95531df..35ace28ff6 100644 --- a/cmd/provider/monolith/zz_main.go +++ b/cmd/provider/monolith/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/mq/zz_main.go b/cmd/provider/mq/zz_main.go index feec5c81ab..726b3d2a4f 100644 --- a/cmd/provider/mq/zz_main.go +++ b/cmd/provider/mq/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/neptune/zz_main.go b/cmd/provider/neptune/zz_main.go index 6e83dd60c5..a3f86a02a3 100644 --- a/cmd/provider/neptune/zz_main.go +++ b/cmd/provider/neptune/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/networkfirewall/zz_main.go b/cmd/provider/networkfirewall/zz_main.go index 3f934a3cf6..16da65f93f 100644 --- a/cmd/provider/networkfirewall/zz_main.go +++ b/cmd/provider/networkfirewall/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/networkmanager/zz_main.go b/cmd/provider/networkmanager/zz_main.go index 2319e6f314..96ce3d1c12 100644 --- a/cmd/provider/networkmanager/zz_main.go +++ b/cmd/provider/networkmanager/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/opensearch/zz_main.go b/cmd/provider/opensearch/zz_main.go index 04aafb8f37..25a145a95b 100644 --- a/cmd/provider/opensearch/zz_main.go +++ b/cmd/provider/opensearch/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/opensearchserverless/zz_main.go b/cmd/provider/opensearchserverless/zz_main.go index a0489a8bef..3f98c1d509 100644 --- a/cmd/provider/opensearchserverless/zz_main.go +++ b/cmd/provider/opensearchserverless/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/opsworks/zz_main.go b/cmd/provider/opsworks/zz_main.go index 86ebca17af..dbc51a3fc4 100644 --- a/cmd/provider/opsworks/zz_main.go +++ b/cmd/provider/opsworks/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/organizations/zz_main.go b/cmd/provider/organizations/zz_main.go index b3ee6c0c05..da952133f3 100644 --- a/cmd/provider/organizations/zz_main.go +++ b/cmd/provider/organizations/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/pinpoint/zz_main.go b/cmd/provider/pinpoint/zz_main.go index 960a3904f9..ea73153f2e 100644 --- a/cmd/provider/pinpoint/zz_main.go +++ b/cmd/provider/pinpoint/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/qldb/zz_main.go b/cmd/provider/qldb/zz_main.go index f1293ce8a0..f8be266de8 100644 --- a/cmd/provider/qldb/zz_main.go +++ b/cmd/provider/qldb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/quicksight/zz_main.go b/cmd/provider/quicksight/zz_main.go index f4e6ebdad1..1f4a9a93b4 100644 --- a/cmd/provider/quicksight/zz_main.go +++ b/cmd/provider/quicksight/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ram/zz_main.go b/cmd/provider/ram/zz_main.go index e9998c185b..9040624596 100644 --- a/cmd/provider/ram/zz_main.go +++ b/cmd/provider/ram/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/rds/zz_main.go b/cmd/provider/rds/zz_main.go index adb7f3bd5d..f84b29cbaf 100644 --- a/cmd/provider/rds/zz_main.go +++ b/cmd/provider/rds/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/redshift/zz_main.go b/cmd/provider/redshift/zz_main.go index 55362543df..07bc245b4e 100644 --- a/cmd/provider/redshift/zz_main.go +++ b/cmd/provider/redshift/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/redshiftserverless/zz_main.go b/cmd/provider/redshiftserverless/zz_main.go index fa1008f105..628e53a707 100644 --- a/cmd/provider/redshiftserverless/zz_main.go +++ b/cmd/provider/redshiftserverless/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/resourcegroups/zz_main.go b/cmd/provider/resourcegroups/zz_main.go index 6f74955d7a..97d5d335b2 100644 --- a/cmd/provider/resourcegroups/zz_main.go +++ b/cmd/provider/resourcegroups/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/rolesanywhere/zz_main.go b/cmd/provider/rolesanywhere/zz_main.go index d8792bf841..05ef81c6cb 100644 --- a/cmd/provider/rolesanywhere/zz_main.go +++ b/cmd/provider/rolesanywhere/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/route53/zz_main.go b/cmd/provider/route53/zz_main.go index 19647123de..2853174811 100644 --- a/cmd/provider/route53/zz_main.go +++ b/cmd/provider/route53/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/route53recoverycontrolconfig/zz_main.go b/cmd/provider/route53recoverycontrolconfig/zz_main.go index a8644179dd..7f7472458f 100644 --- a/cmd/provider/route53recoverycontrolconfig/zz_main.go +++ b/cmd/provider/route53recoverycontrolconfig/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/route53recoveryreadiness/zz_main.go b/cmd/provider/route53recoveryreadiness/zz_main.go index 944b9a3cae..b12d4551bc 100644 --- a/cmd/provider/route53recoveryreadiness/zz_main.go +++ b/cmd/provider/route53recoveryreadiness/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/route53resolver/zz_main.go b/cmd/provider/route53resolver/zz_main.go index 83eaf2c5ed..676590e178 100644 --- a/cmd/provider/route53resolver/zz_main.go +++ b/cmd/provider/route53resolver/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/rum/zz_main.go b/cmd/provider/rum/zz_main.go index b04738cba1..e055298b24 100644 --- a/cmd/provider/rum/zz_main.go +++ b/cmd/provider/rum/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/s3/zz_main.go b/cmd/provider/s3/zz_main.go index c4af1fb6a4..9dd540b8ea 100644 --- a/cmd/provider/s3/zz_main.go +++ b/cmd/provider/s3/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/s3control/zz_main.go b/cmd/provider/s3control/zz_main.go index 513ebbd3cb..184d94b2e0 100644 --- a/cmd/provider/s3control/zz_main.go +++ b/cmd/provider/s3control/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/sagemaker/zz_main.go b/cmd/provider/sagemaker/zz_main.go index 71e19b26c5..c08c7e241b 100644 --- a/cmd/provider/sagemaker/zz_main.go +++ b/cmd/provider/sagemaker/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/scheduler/zz_main.go b/cmd/provider/scheduler/zz_main.go index 34d57bb9dc..71023e4736 100644 --- a/cmd/provider/scheduler/zz_main.go +++ b/cmd/provider/scheduler/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/schemas/zz_main.go b/cmd/provider/schemas/zz_main.go index 83598aaf71..72a7d8a9d2 100644 --- a/cmd/provider/schemas/zz_main.go +++ b/cmd/provider/schemas/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/secretsmanager/zz_main.go b/cmd/provider/secretsmanager/zz_main.go index 15e83eb171..c57f3b46da 100644 --- a/cmd/provider/secretsmanager/zz_main.go +++ b/cmd/provider/secretsmanager/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/securityhub/zz_main.go b/cmd/provider/securityhub/zz_main.go index f5d32c6b61..38b2962669 100644 --- a/cmd/provider/securityhub/zz_main.go +++ b/cmd/provider/securityhub/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/serverlessrepo/zz_main.go b/cmd/provider/serverlessrepo/zz_main.go index 6055e9722d..c9c893886c 100644 --- a/cmd/provider/serverlessrepo/zz_main.go +++ b/cmd/provider/serverlessrepo/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/servicecatalog/zz_main.go b/cmd/provider/servicecatalog/zz_main.go index 545f9f321d..6bbe3df387 100644 --- a/cmd/provider/servicecatalog/zz_main.go +++ b/cmd/provider/servicecatalog/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/servicediscovery/zz_main.go b/cmd/provider/servicediscovery/zz_main.go index f942c150f0..a3d6cfba50 100644 --- a/cmd/provider/servicediscovery/zz_main.go +++ b/cmd/provider/servicediscovery/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/servicequotas/zz_main.go b/cmd/provider/servicequotas/zz_main.go index 01207d42c3..9d86aafa9a 100644 --- a/cmd/provider/servicequotas/zz_main.go +++ b/cmd/provider/servicequotas/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ses/zz_main.go b/cmd/provider/ses/zz_main.go index df7e9cf16e..e20f96f501 100644 --- a/cmd/provider/ses/zz_main.go +++ b/cmd/provider/ses/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/sesv2/zz_main.go b/cmd/provider/sesv2/zz_main.go index 92634a9b19..80a03d8c2e 100644 --- a/cmd/provider/sesv2/zz_main.go +++ b/cmd/provider/sesv2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/sfn/zz_main.go b/cmd/provider/sfn/zz_main.go index c0657987d0..05a94e59c5 100644 --- a/cmd/provider/sfn/zz_main.go +++ b/cmd/provider/sfn/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/signer/zz_main.go b/cmd/provider/signer/zz_main.go index b31134cb3b..efa0b5eafe 100644 --- a/cmd/provider/signer/zz_main.go +++ b/cmd/provider/signer/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/simpledb/zz_main.go b/cmd/provider/simpledb/zz_main.go index 7d01988f0d..5c75de0e35 100644 --- a/cmd/provider/simpledb/zz_main.go +++ b/cmd/provider/simpledb/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/sns/zz_main.go b/cmd/provider/sns/zz_main.go index 9fbf847cac..8ee17569f0 100644 --- a/cmd/provider/sns/zz_main.go +++ b/cmd/provider/sns/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/sqs/zz_main.go b/cmd/provider/sqs/zz_main.go index 4a9ee6fa4a..0e26083aab 100644 --- a/cmd/provider/sqs/zz_main.go +++ b/cmd/provider/sqs/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ssm/zz_main.go b/cmd/provider/ssm/zz_main.go index a81abfcb41..8f58d6ac45 100644 --- a/cmd/provider/ssm/zz_main.go +++ b/cmd/provider/ssm/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/ssoadmin/zz_main.go b/cmd/provider/ssoadmin/zz_main.go index 8c852d46c6..acc3dce851 100644 --- a/cmd/provider/ssoadmin/zz_main.go +++ b/cmd/provider/ssoadmin/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/swf/zz_main.go b/cmd/provider/swf/zz_main.go index 7eaac39c0b..6569f7f19c 100644 --- a/cmd/provider/swf/zz_main.go +++ b/cmd/provider/swf/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/timestreamwrite/zz_main.go b/cmd/provider/timestreamwrite/zz_main.go index 2a0483f5f5..2bf6e57c65 100644 --- a/cmd/provider/timestreamwrite/zz_main.go +++ b/cmd/provider/timestreamwrite/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/transcribe/zz_main.go b/cmd/provider/transcribe/zz_main.go index 0c922e5eb8..96f56c0756 100644 --- a/cmd/provider/transcribe/zz_main.go +++ b/cmd/provider/transcribe/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/transfer/zz_main.go b/cmd/provider/transfer/zz_main.go index 7d2234a929..1e97f65419 100644 --- a/cmd/provider/transfer/zz_main.go +++ b/cmd/provider/transfer/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/vpc/zz_main.go b/cmd/provider/vpc/zz_main.go index a11e5a3c85..8538a1cf07 100644 --- a/cmd/provider/vpc/zz_main.go +++ b/cmd/provider/vpc/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/waf/zz_main.go b/cmd/provider/waf/zz_main.go index 2e126c630b..b3c39c733a 100644 --- a/cmd/provider/waf/zz_main.go +++ b/cmd/provider/waf/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/wafregional/zz_main.go b/cmd/provider/wafregional/zz_main.go index 9618790583..d53ebf4dd2 100644 --- a/cmd/provider/wafregional/zz_main.go +++ b/cmd/provider/wafregional/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/wafv2/zz_main.go b/cmd/provider/wafv2/zz_main.go index a178d12d46..c742960f64 100644 --- a/cmd/provider/wafv2/zz_main.go +++ b/cmd/provider/wafv2/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/workspaces/zz_main.go b/cmd/provider/workspaces/zz_main.go index 6d708b6275..47a47499e5 100644 --- a/cmd/provider/workspaces/zz_main.go +++ b/cmd/provider/workspaces/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/cmd/provider/xray/zz_main.go b/cmd/provider/xray/zz_main.go index 49d16389bc..1e727eac2c 100644 --- a/cmd/provider/xray/zz_main.go +++ b/cmd/provider/xray/zz_main.go @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/config/provider.go b/config/provider.go index 0dc7300e69..a28d39d561 100644 --- a/config/provider.go +++ b/config/provider.go @@ -6,9 +6,6 @@ package config import ( "context" - "reflect" - "unsafe" - // Note(ezgidemirel): we are importing this to embed provider schema document _ "embed" @@ -166,7 +163,7 @@ func getProviderSchema(s string) (*schema.Provider, error) { // configuration is being read for the code generation pipelines. // In that case, we will only use the JSON schema for generating // the CRDs. -func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider, *xpprovider.AWSClient, error) { +func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider, error) { var p *schema.Provider var fwProvider fwprovider.Provider var err error @@ -177,16 +174,7 @@ func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider fwProvider, p, err = xpprovider.GetProvider(ctx) } if err != nil { - return nil, nil, errors.Wrapf(err, "cannot get the Terraform provider schema with generation mode set to %t", generationProvider) - } - // we set schema.Provider's meta to nil because p.Configure modifies - // a singleton pointer. This further assumes that the - // schema.Provider.Configure calls do not modify the global state - // represented by the config.Provider.TerraformProvider. - var awsClient *xpprovider.AWSClient - if !generationProvider { - // #nosec G103 - awsClient = (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(p.Meta()).Pointer())) + return nil, errors.Wrapf(err, "cannot get the Terraform provider schema with generation mode set to %t", generationProvider) } modulePath := "github.com/upbound/provider-aws" @@ -217,7 +205,6 @@ func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider injectFieldRenamingConversionFunctions(), ), ) - p.SetMeta(nil) pc.BasePackages.ControllerMap["internal/controller/eks/clusterauth"] = "eks" for _, configure := range []func(provider *config.Provider){ @@ -311,7 +298,7 @@ func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider } pc.ConfigureResources() - return pc, awsClient, nil + return pc, nil } // CLIReconciledResourceList returns the list of resources that have external diff --git a/hack/main.go.tmpl b/hack/main.go.tmpl index c4942ed041..6fceb77ac8 100644 --- a/hack/main.go.tmpl +++ b/hack/main.go.tmpl @@ -143,10 +143,9 @@ func main() { kingpin.FatalIfError(resolverapis.BuildScheme(apis.AddToSchemes), "Cannot register the AWS APIs with the API resolver's runtime scheme") ctx := context.Background() - provider, awsClient, err := config.GetProvider(ctx, false) + provider, err := config.GetProvider(ctx, false) kingpin.FatalIfError(err, "Cannot initialize the provider configuration") setupConfig.TerraformProvider = provider.TerraformProvider - setupConfig.AWSClient = awsClient o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, diff --git a/internal/clients/aws.go b/internal/clients/aws.go index e5b2f9aa4f..01dcc46098 100644 --- a/internal/clients/aws.go +++ b/internal/clients/aws.go @@ -15,7 +15,9 @@ import ( "github.com/hashicorp/terraform-provider-aws/xpprovider" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/types" + "reflect" "sigs.k8s.io/controller-runtime/pkg/client" + "unsafe" "github.com/upbound/provider-aws/apis/v1beta1" ) @@ -42,7 +44,6 @@ const ( type SetupConfig struct { TerraformProvider *schema.Provider - AWSClient *xpprovider.AWSClient } func SelectTerraformSetup(config *SetupConfig) terraform.SetupFn { // nolint:gocyclo @@ -148,11 +149,10 @@ func configureNoForkAWSClient(ctx context.Context, ps *terraform.Setup, config * } // only used for retrieving the ServicePackages from the singleton provider instance - // sharedMeta := config.AWSClient.ServicePackages - // #nosec G103 + p := config.TerraformProvider.Meta() tfAwsConnsClient, diags := tfAwsConnsCfg.GetClient(ctx, &xpprovider.AWSClient{ - ServicePackages: config.AWSClient.ServicePackages, - // ServicePackages: (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(sharedMeta).Pointer())).ServicePackages, + // #nosec G103 + ServicePackages: (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(p).Pointer())).ServicePackages, }) if diags.HasError() { return fmt.Errorf("cannot construct TF AWS Client from TF AWS Config, %v", diags)