diff --git a/.changelog/43792.txt b/.changelog/43792.txt new file mode 100644 index 000000000000..19f94825d01a --- /dev/null +++ b/.changelog/43792.txt @@ -0,0 +1,15 @@ +```release-note:new-data-source +aws_odb_db_server +``` + +```release-note:new-data-source +aws_odb_db_servers +``` + +```release-note:new-data-source +aws_odb_db_node +``` + +```release-note:new-data-source +aws_odb_db_nodes +``` \ No newline at end of file diff --git a/.changelog/43841.txt b/.changelog/43841.txt new file mode 100644 index 000000000000..2d606262b4f8 --- /dev/null +++ b/.changelog/43841.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_elasticache_cluster: Fix `provider produced unexpected value` for `cache_usage_limits` argument. +``` \ No newline at end of file diff --git a/.changelog/43883.txt b/.changelog/43883.txt new file mode 100644 index 000000000000..7c290e931e66 --- /dev/null +++ b/.changelog/43883.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +aws_lakeformation_lf_tag_expression +``` diff --git a/.changelog/44006.txt b/.changelog/44006.txt new file mode 100644 index 000000000000..64c14b350c63 --- /dev/null +++ b/.changelog/44006.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_route53_health_check: Fix `child_health_threshold` to properly accept explicitly specified zero value +``` diff --git a/.changelog/44168.txt b/.changelog/44168.txt new file mode 100644 index 000000000000..c8c20dee1f8e --- /dev/null +++ b/.changelog/44168.txt @@ -0,0 +1,3 @@ +```release-note:new-data-source +aws_appconfig_application +``` \ No newline at end of file diff --git a/.changelog/44334.txt b/.changelog/44334.txt new file mode 100644 index 000000000000..ec4da706c7f5 --- /dev/null +++ b/.changelog/44334.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_eks_cluster: Change `compute_config`, `kubernetes_network_config.elastic_load_balancing`, and `storage_config.` to Optional and Computed, allowing EKS Auto Mode settings to be enabled, disabled, and removed from configuration +``` diff --git a/.changelog/44346.txt b/.changelog/44346.txt new file mode 100644 index 000000000000..661ce0616f1f --- /dev/null +++ b/.changelog/44346.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_connect_instance: Add resource identity support +``` \ No newline at end of file diff --git a/.changelog/44365.txt b/.changelog/44365.txt new file mode 100644 index 000000000000..f4cb05528cf4 --- /dev/null +++ b/.changelog/44365.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_connect_phone_number: Add resource identity support +``` \ No newline at end of file diff --git a/.changelog/44377.txt b/.changelog/44377.txt new file mode 100644 index 000000000000..7f3437563ef9 --- /dev/null +++ b/.changelog/44377.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_route53recoverycontrolconfig_cluster: Add `network_type` argument +``` diff --git a/.changelog/44379.txt b/.changelog/44379.txt new file mode 100644 index 000000000000..79e8f4e72ef8 --- /dev/null +++ b/.changelog/44379.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_s3control_bucket: Add resource identity support +``` \ No newline at end of file diff --git a/.changelog/44408.txt b/.changelog/44408.txt new file mode 100644 index 000000000000..eab726b7a73e --- /dev/null +++ b/.changelog/44408.txt @@ -0,0 +1,9 @@ +```release-note:enhancement +resource/aws_sfn_activity: Add resource identity support +``` +```release-note:enhancement +resource/aws_sfn_activity: Add `arn` argument +``` +```release-note:enhancement +resource/aws_sfn_alias: Add resource identity support +``` diff --git a/.changelog/44434.txt b/.changelog/44434.txt new file mode 100644 index 000000000000..c0c9fc0121aa --- /dev/null +++ b/.changelog/44434.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_bedrock_provisioned_model_throughput: Fix `AttributeName("arn") still remains in the path: could not find attribute or block "arn" in schema` errors when upgrading from a pre-v6.0.0 provider version +``` \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b7be5ba393..b638851bf3d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,37 @@ BREAKING CHANGES: * resource/aws_ecs_service: Fix behavior when updating `capacity_provider_strategy` to avoid ECS service recreation after recent AWS changes ([#43533](https://github.com/hashicorp/terraform-provider-aws/issues/43533)) +FEATURES: + +* **New Data Source:** `aws_appconfig_application` ([#44168](https://github.com/hashicorp/terraform-provider-aws/issues/44168)) +* **New Data Source:** `aws_odb_db_node` ([#43792](https://github.com/hashicorp/terraform-provider-aws/issues/43792)) +* **New Data Source:** `aws_odb_db_nodes` ([#43792](https://github.com/hashicorp/terraform-provider-aws/issues/43792)) +* **New Data Source:** `aws_odb_db_server` ([#43792](https://github.com/hashicorp/terraform-provider-aws/issues/43792)) +* **New Data Source:** `aws_odb_db_servers` ([#43792](https://github.com/hashicorp/terraform-provider-aws/issues/43792)) +* **New Resource:** `aws_lakeformation_lf_tag_expression` ([#43883](https://github.com/hashicorp/terraform-provider-aws/issues/43883)) + ENHANCEMENTS: +* resource/aws_connect_instance: Add resource identity support ([#44346](https://github.com/hashicorp/terraform-provider-aws/issues/44346)) +* resource/aws_connect_phone_number: Add resource identity support ([#44365](https://github.com/hashicorp/terraform-provider-aws/issues/44365)) * resource/aws_dsql_cluster: Adds attribute `force_destroy`. ([#44406](https://github.com/hashicorp/terraform-provider-aws/issues/44406)) +* resource/aws_route53recoverycontrolconfig_cluster: Add `network_type` argument ([#44377](https://github.com/hashicorp/terraform-provider-aws/issues/44377)) +* resource/aws_s3control_bucket: Add resource identity support ([#44379](https://github.com/hashicorp/terraform-provider-aws/issues/44379)) +* resource/aws_sfn_activity: Add `arn` argument ([#44408](https://github.com/hashicorp/terraform-provider-aws/issues/44408)) +* resource/aws_sfn_activity: Add resource identity support ([#44408](https://github.com/hashicorp/terraform-provider-aws/issues/44408)) +* resource/aws_sfn_alias: Add resource identity support ([#44408](https://github.com/hashicorp/terraform-provider-aws/issues/44408)) BUG FIXES: +* resource/aws_bedrock_provisioned_model_throughput: Fix `AttributeName("arn") still remains in the path: could not find attribute or block "arn" in schema` errors when upgrading from a pre-v6.0.0 provider version ([#44434](https://github.com/hashicorp/terraform-provider-aws/issues/44434)) * resource/aws_dsql_cluster: Prevents error when optional attribute `deletion_protection_enabled` not set. ([#44406](https://github.com/hashicorp/terraform-provider-aws/issues/44406)) +* resource/aws_eks_cluster: Change `compute_config`, `kubernetes_network_config.elastic_load_balancing`, and `storage_config.` to Optional and Computed, allowing EKS Auto Mode settings to be enabled, disabled, and removed from configuration ([#44334](https://github.com/hashicorp/terraform-provider-aws/issues/44334)) +* resource/aws_elasticache_cluster: Fix `provider produced unexpected value` for `cache_usage_limits` argument. ([#43841](https://github.com/hashicorp/terraform-provider-aws/issues/43841)) +* resource/aws_odb_cloud_autonomous_vm_cluster : Fixed planmodifier for computed attribute. ([#44401](https://github.com/hashicorp/terraform-provider-aws/issues/44401)) +* resource/aws_odb_cloud_vm_cluster : Fixed planmodifier for computed attribute. Fixed planmodifier from display_name attribute. ([#44401](https://github.com/hashicorp/terraform-provider-aws/issues/44401)) +* resource/aws_odb_network_peering_connection : Fixed planmodifier for computed attribute. ([#44401](https://github.com/hashicorp/terraform-provider-aws/issues/44401)) * resource/aws_rds_cluster: Fixes error when setting `database_insights_mode` with `global_cluster_identifier`. ([#44404](https://github.com/hashicorp/terraform-provider-aws/issues/44404)) +* resource/aws_route53_health_check: Fix `child_health_threshold` to properly accept explicitly specified zero value ([#44006](https://github.com/hashicorp/terraform-provider-aws/issues/44006)) ## 6.14.1 (September 22, 2025) diff --git a/go.mod b/go.mod index 696feb6a6f5e..5f202ff83f99 100644 --- a/go.mod +++ b/go.mod @@ -11,266 +11,266 @@ require ( github.com/YakDriver/go-version v0.1.0 github.com/YakDriver/regexache v0.24.0 github.com/YakDriver/smarterr v0.6.0 - github.com/aws/aws-sdk-go-v2 v1.39.0 - github.com/aws/aws-sdk-go-v2/config v1.31.9 - github.com/aws/aws-sdk-go-v2/credentials v1.18.13 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.7 - github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.4 - github.com/aws/aws-sdk-go-v2/service/account v1.28.4 - github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 - github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 - github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 - github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 - github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 - github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.4 - github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.4 - github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.4 - github.com/aws/aws-sdk-go-v2/service/appflow v1.50.4 - github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.4 - github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.3 - github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.3 - github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.6 - github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.4 - github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.5 - github.com/aws/aws-sdk-go-v2/service/appstream v1.49.4 - github.com/aws/aws-sdk-go-v2/service/appsync v1.51.4 - github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.6 - github.com/aws/aws-sdk-go-v2/service/athena v1.55.4 - github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.4 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.1 - github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.3 - github.com/aws/aws-sdk-go-v2/service/backup v1.47.4 - github.com/aws/aws-sdk-go-v2/service/batch v1.57.8 - github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.6 - github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.0 - github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.4 - github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.0 - github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 - github.com/aws/aws-sdk-go-v2/service/budgets v1.39.0 - github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 - github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 - github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.4 - github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.3 - github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.33.2 - github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.3 - github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.4 - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.2 - github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.2 - github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.6 - github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.3 - github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.4 - github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 - github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 - github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 - github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.6 - github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.4 - github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.3 - github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.3 - github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.3 - github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.3 - github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.4 - github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.4 - github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.4 - github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.4 - github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.5 - github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.4 - github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.3 - github.com/aws/aws-sdk-go-v2/service/configservice v1.58.0 - github.com/aws/aws-sdk-go-v2/service/connect v1.140.0 - github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.4 - github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 - github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 - github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 - github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 - github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 - github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.4 - github.com/aws/aws-sdk-go-v2/service/databrew v1.38.3 - github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.4 - github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.3 - github.com/aws/aws-sdk-go-v2/service/datasync v1.54.4 - github.com/aws/aws-sdk-go-v2/service/datazone v1.41.1 - github.com/aws/aws-sdk-go-v2/service/dax v1.28.4 - github.com/aws/aws-sdk-go-v2/service/detective v1.37.5 - github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.4 - github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.4 - github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.4 - github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.3 - github.com/aws/aws-sdk-go-v2/service/dlm v1.34.4 - github.com/aws/aws-sdk-go-v2/service/docdb v1.46.4 - github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.4 - github.com/aws/aws-sdk-go-v2/service/drs v1.35.4 - github.com/aws/aws-sdk-go-v2/service/dsql v1.9.6 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.3 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0 - github.com/aws/aws-sdk-go-v2/service/ecr v1.50.3 - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.4 - github.com/aws/aws-sdk-go-v2/service/ecs v1.64.0 - github.com/aws/aws-sdk-go-v2/service/efs v1.40.5 - github.com/aws/aws-sdk-go-v2/service/eks v1.74.0 - github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.3 - github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.5 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.4 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.4 - github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.4 - github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.4 - github.com/aws/aws-sdk-go-v2/service/emr v1.54.3 - github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.0 - github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.4 - github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.3 - github.com/aws/aws-sdk-go-v2/service/evidently v1.28.3 - github.com/aws/aws-sdk-go-v2/service/evs v1.5.0 - github.com/aws/aws-sdk-go-v2/service/finspace v1.33.4 - github.com/aws/aws-sdk-go-v2/service/firehose v1.41.4 - github.com/aws/aws-sdk-go-v2/service/fis v1.37.3 - github.com/aws/aws-sdk-go-v2/service/fms v1.44.3 - github.com/aws/aws-sdk-go-v2/service/fsx v1.61.4 - github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.4 - github.com/aws/aws-sdk-go-v2/service/glacier v1.31.4 - github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.4 - github.com/aws/aws-sdk-go-v2/service/glue v1.128.3 - github.com/aws/aws-sdk-go-v2/service/grafana v1.31.4 - github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.4 - github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.4 - github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.0 - github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.3 - github.com/aws/aws-sdk-go-v2/service/iam v1.47.5 - github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.4 - github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.0 - github.com/aws/aws-sdk-go-v2/service/inspector v1.30.3 - github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.4 - github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.3 - github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.6 - github.com/aws/aws-sdk-go-v2/service/iot v1.69.3 - github.com/aws/aws-sdk-go-v2/service/ivs v1.47.4 - github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.3 - github.com/aws/aws-sdk-go-v2/service/kafka v1.43.4 - github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.3 - github.com/aws/aws-sdk-go-v2/service/kendra v1.60.4 - github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.4 - github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.3 - github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.4 - github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.5 - github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.3 - github.com/aws/aws-sdk-go-v2/service/kms v1.45.3 - github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.3 - github.com/aws/aws-sdk-go-v2/service/lambda v1.77.4 - github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.4 - github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.3 - github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.4 - github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.4 - github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.4 - github.com/aws/aws-sdk-go-v2/service/location v1.49.4 - github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.4 - github.com/aws/aws-sdk-go-v2/service/m2 v1.25.4 - github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.4 - github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.4 - github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.4 - github.com/aws/aws-sdk-go-v2/service/medialive v1.83.0 - github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.4 - github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.1 - github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.4 - github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.4 - github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.4 - github.com/aws/aws-sdk-go-v2/service/mgn v1.37.3 - github.com/aws/aws-sdk-go-v2/service/mq v1.34.2 - github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.4 - github.com/aws/aws-sdk-go-v2/service/neptune v1.42.2 - github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.3 - github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.0 - github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.5 - github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.4 - github.com/aws/aws-sdk-go-v2/service/notifications v1.7.2 - github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.6 - github.com/aws/aws-sdk-go-v2/service/oam v1.22.3 - github.com/aws/aws-sdk-go-v2/service/odb v1.4.4 - github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.3 - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 - github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 - github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 - github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 - github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 - github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 - github.com/aws/aws-sdk-go-v2/service/pcs v1.13.0 - github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.4 - github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.3 - github.com/aws/aws-sdk-go-v2/service/pipes v1.23.3 - github.com/aws/aws-sdk-go-v2/service/polly v1.53.4 - github.com/aws/aws-sdk-go-v2/service/pricing v1.39.4 - github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.4 - github.com/aws/aws-sdk-go-v2/service/qldb v1.30.4 - github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.0 - github.com/aws/aws-sdk-go-v2/service/ram v1.34.4 - github.com/aws/aws-sdk-go-v2/service/rbin v1.26.4 - github.com/aws/aws-sdk-go-v2/service/rds v1.107.0 - github.com/aws/aws-sdk-go-v2/service/redshift v1.58.3 - github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.4 - github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.6 - github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.3 - github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.4 - github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.4 - github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.5 - github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.4 - github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.4 - github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2 - github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.2 - github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.4 - github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.5 - github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.4 - github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.4 - github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 - github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 - github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 - github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 - github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 - github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.6 - github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1 - github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.3 - github.com/aws/aws-sdk-go-v2/service/schemas v1.33.3 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.4 - github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.2 - github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.4 - github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.4 - github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.4 - github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.4 - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.7 - github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.3 - github.com/aws/aws-sdk-go-v2/service/ses v1.34.3 - github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.3 - github.com/aws/aws-sdk-go-v2/service/sfn v1.39.4 - github.com/aws/aws-sdk-go-v2/service/shield v1.34.4 - github.com/aws/aws-sdk-go-v2/service/signer v1.31.4 - github.com/aws/aws-sdk-go-v2/service/sns v1.38.3 - github.com/aws/aws-sdk-go-v2/service/sqs v1.42.6 - github.com/aws/aws-sdk-go-v2/service/ssm v1.64.4 - github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.6 - github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.3 - github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.4 - github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.3 - github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 - github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.35.4 - github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.4 - github.com/aws/aws-sdk-go-v2/service/sts v1.38.4 - github.com/aws/aws-sdk-go-v2/service/swf v1.32.3 - github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.4 - github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.4 - github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.4 - github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.3 - github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 - github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 - github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 - github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 - github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 - github.com/aws/aws-sdk-go-v2/service/waf v1.30.3 - github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.4 - github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.5 - github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.4 - github.com/aws/aws-sdk-go-v2/service/workmail v1.36.2 - github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.4 - github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.4 - github.com/aws/aws-sdk-go-v2/service/xray v1.36.2 + github.com/aws/aws-sdk-go-v2 v1.39.1 + github.com/aws/aws-sdk-go-v2/config v1.31.10 + github.com/aws/aws-sdk-go-v2/credentials v1.18.14 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.8 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.8 + github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.5 + github.com/aws/aws-sdk-go-v2/service/account v1.28.5 + github.com/aws/aws-sdk-go-v2/service/acm v1.37.5 + github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.4 + github.com/aws/aws-sdk-go-v2/service/amp v1.40.2 + github.com/aws/aws-sdk-go-v2/service/amplify v1.37.4 + github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.5 + github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.5 + github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.5 + github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.5 + github.com/aws/aws-sdk-go-v2/service/appflow v1.50.5 + github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.5 + github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.4 + github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.4 + github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.7 + github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.5 + github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.6 + github.com/aws/aws-sdk-go-v2/service/appstream v1.49.5 + github.com/aws/aws-sdk-go-v2/service/appsync v1.51.5 + github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.7 + github.com/aws/aws-sdk-go-v2/service/athena v1.55.5 + github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.5 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.2 + github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.4 + github.com/aws/aws-sdk-go-v2/service/backup v1.47.5 + github.com/aws/aws-sdk-go-v2/service/batch v1.57.9 + github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.7 + github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.1 + github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.5 + github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.1 + github.com/aws/aws-sdk-go-v2/service/billing v1.7.6 + github.com/aws/aws-sdk-go-v2/service/budgets v1.39.1 + github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.5 + github.com/aws/aws-sdk-go-v2/service/chime v1.40.4 + github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.5 + github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.4 + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.34.0 + github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.4 + github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.5 + github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.3 + github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.3 + github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.7 + github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.4 + github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.5 + github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.5 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.2 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.1 + github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.5 + github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.4 + github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.7 + github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.5 + github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.4 + github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.4 + github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.4 + github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.4 + github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.5 + github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.5 + github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.5 + github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.5 + github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.6 + github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.5 + github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.4 + github.com/aws/aws-sdk-go-v2/service/configservice v1.58.1 + github.com/aws/aws-sdk-go-v2/service/connect v1.140.1 + github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.5 + github.com/aws/aws-sdk-go-v2/service/controltower v1.26.5 + github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.5 + github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.1 + github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.5 + github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.5 + github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.5 + github.com/aws/aws-sdk-go-v2/service/databrew v1.38.4 + github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.5 + github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.4 + github.com/aws/aws-sdk-go-v2/service/datasync v1.54.5 + github.com/aws/aws-sdk-go-v2/service/datazone v1.41.2 + github.com/aws/aws-sdk-go-v2/service/dax v1.28.5 + github.com/aws/aws-sdk-go-v2/service/detective v1.37.6 + github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.5 + github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.5 + github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.5 + github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.4 + github.com/aws/aws-sdk-go-v2/service/dlm v1.34.5 + github.com/aws/aws-sdk-go-v2/service/docdb v1.46.5 + github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.5 + github.com/aws/aws-sdk-go-v2/service/drs v1.35.5 + github.com/aws/aws-sdk-go-v2/service/dsql v1.9.7 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.4 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.0 + github.com/aws/aws-sdk-go-v2/service/ecr v1.50.4 + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.5 + github.com/aws/aws-sdk-go-v2/service/ecs v1.64.1 + github.com/aws/aws-sdk-go-v2/service/efs v1.40.6 + github.com/aws/aws-sdk-go-v2/service/eks v1.74.1 + github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.4 + github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.6 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.5 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.5 + github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.5 + github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.5 + github.com/aws/aws-sdk-go-v2/service/emr v1.54.4 + github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.1 + github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.5 + github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.4 + github.com/aws/aws-sdk-go-v2/service/evidently v1.28.4 + github.com/aws/aws-sdk-go-v2/service/evs v1.5.1 + github.com/aws/aws-sdk-go-v2/service/finspace v1.33.5 + github.com/aws/aws-sdk-go-v2/service/firehose v1.41.5 + github.com/aws/aws-sdk-go-v2/service/fis v1.37.4 + github.com/aws/aws-sdk-go-v2/service/fms v1.44.4 + github.com/aws/aws-sdk-go-v2/service/fsx v1.61.5 + github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.5 + github.com/aws/aws-sdk-go-v2/service/glacier v1.31.5 + github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.5 + github.com/aws/aws-sdk-go-v2/service/glue v1.128.4 + github.com/aws/aws-sdk-go-v2/service/grafana v1.31.5 + github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.5 + github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.5 + github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.1 + github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.4 + github.com/aws/aws-sdk-go-v2/service/iam v1.47.6 + github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.5 + github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.1 + github.com/aws/aws-sdk-go-v2/service/inspector v1.30.4 + github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.5 + github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.4 + github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.7 + github.com/aws/aws-sdk-go-v2/service/iot v1.69.4 + github.com/aws/aws-sdk-go-v2/service/ivs v1.47.5 + github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.4 + github.com/aws/aws-sdk-go-v2/service/kafka v1.43.5 + github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.4 + github.com/aws/aws-sdk-go-v2/service/kendra v1.60.5 + github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.5 + github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.4 + github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.5 + github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.6 + github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.4 + github.com/aws/aws-sdk-go-v2/service/kms v1.45.4 + github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.4 + github.com/aws/aws-sdk-go-v2/service/lambda v1.77.5 + github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.5 + github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.4 + github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.5 + github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.5 + github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.5 + github.com/aws/aws-sdk-go-v2/service/location v1.49.5 + github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.5 + github.com/aws/aws-sdk-go-v2/service/m2 v1.25.5 + github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.5 + github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.5 + github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.5 + github.com/aws/aws-sdk-go-v2/service/medialive v1.83.1 + github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.5 + github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.2 + github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.5 + github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.5 + github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.5 + github.com/aws/aws-sdk-go-v2/service/mgn v1.37.4 + github.com/aws/aws-sdk-go-v2/service/mq v1.34.3 + github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.5 + github.com/aws/aws-sdk-go-v2/service/neptune v1.42.3 + github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.4 + github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.1 + github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.6 + github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.5 + github.com/aws/aws-sdk-go-v2/service/notifications v1.7.3 + github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.7 + github.com/aws/aws-sdk-go-v2/service/oam v1.22.4 + github.com/aws/aws-sdk-go-v2/service/odb v1.4.5 + github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.4 + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.3 + github.com/aws/aws-sdk-go-v2/service/organizations v1.45.2 + github.com/aws/aws-sdk-go-v2/service/osis v1.20.1 + github.com/aws/aws-sdk-go-v2/service/outposts v1.56.6 + github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.1 + github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.5 + github.com/aws/aws-sdk-go-v2/service/pcs v1.13.1 + github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.5 + github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.4 + github.com/aws/aws-sdk-go-v2/service/pipes v1.23.4 + github.com/aws/aws-sdk-go-v2/service/polly v1.53.5 + github.com/aws/aws-sdk-go-v2/service/pricing v1.39.5 + github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.5 + github.com/aws/aws-sdk-go-v2/service/qldb v1.30.5 + github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.1 + github.com/aws/aws-sdk-go-v2/service/ram v1.34.5 + github.com/aws/aws-sdk-go-v2/service/rbin v1.26.5 + github.com/aws/aws-sdk-go-v2/service/rds v1.107.1 + github.com/aws/aws-sdk-go-v2/service/redshift v1.58.4 + github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.5 + github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.7 + github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.4 + github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.5 + github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.5 + github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.6 + github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.5 + github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.5 + github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3 + github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.3 + github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.5 + github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.6 + github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.5 + github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.5 + github.com/aws/aws-sdk-go-v2/service/rum v1.28.6 + github.com/aws/aws-sdk-go-v2/service/s3 v1.88.2 + github.com/aws/aws-sdk-go-v2/service/s3control v1.66.1 + github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.5 + github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.4 + github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.7 + github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.2 + github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.4 + github.com/aws/aws-sdk-go-v2/service/schemas v1.33.4 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.5 + github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.3 + github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.5 + github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.5 + github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.5 + github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.5 + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.8 + github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.4 + github.com/aws/aws-sdk-go-v2/service/ses v1.34.4 + github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.4 + github.com/aws/aws-sdk-go-v2/service/sfn v1.39.5 + github.com/aws/aws-sdk-go-v2/service/shield v1.34.5 + github.com/aws/aws-sdk-go-v2/service/signer v1.31.5 + github.com/aws/aws-sdk-go-v2/service/sns v1.38.4 + github.com/aws/aws-sdk-go-v2/service/sqs v1.42.7 + github.com/aws/aws-sdk-go-v2/service/ssm v1.65.0 + github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.7 + github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.4 + github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.5 + github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.4 + github.com/aws/aws-sdk-go-v2/service/sso v1.29.4 + github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.36.0 + github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.5 + github.com/aws/aws-sdk-go-v2/service/sts v1.38.5 + github.com/aws/aws-sdk-go-v2/service/swf v1.32.4 + github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.5 + github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.5 + github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.5 + github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.4 + github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.4 + github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.5 + github.com/aws/aws-sdk-go-v2/service/transfer v1.65.6 + github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.3 + github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.4 + github.com/aws/aws-sdk-go-v2/service/waf v1.30.4 + github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.5 + github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.6 + github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.5 + github.com/aws/aws-sdk-go-v2/service/workmail v1.36.3 + github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.5 + github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.5 + github.com/aws/aws-sdk-go-v2/service/xray v1.36.3 github.com/aws/smithy-go v1.23.0 github.com/beevik/etree v1.6.0 github.com/cedar-policy/cedar-go v1.2.6 @@ -324,16 +324,16 @@ require ( github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.8 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.8 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.8 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.0 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/cloudflare/circl v1.6.1 // indirect diff --git a/go.sum b/go.sum index 7414ade474b0..00c5e146c46f 100644 --- a/go.sum +++ b/go.sum @@ -23,548 +23,548 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.39.0 h1:xm5WV/2L4emMRmMjHFykqiA4M/ra0DJVSWUkDyBjbg4= -github.com/aws/aws-sdk-go-v2 v1.39.0/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= +github.com/aws/aws-sdk-go-v2 v1.39.1 h1:fWZhGAwVRK/fAN2tmt7ilH4PPAE11rDj7HytrmbZ2FE= +github.com/aws/aws-sdk-go-v2 v1.39.1/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 h1:i8p8P4diljCr60PpJp6qZXNlgX4m2yQFpYk+9ZT+J4E= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1/go.mod h1:ddqbooRZYNoJ2dsTwOty16rM+/Aqmk/GOXrK8cg7V00= -github.com/aws/aws-sdk-go-v2/config v1.31.9 h1:Q+9hVk8kmDGlC7XcDout/vs0FZhHnuPCPv+TRAYDans= -github.com/aws/aws-sdk-go-v2/config v1.31.9/go.mod h1:OpMrPn6rRbHKU4dAVNCk/EQx8sEQJI7hl9GZZ5u/Y+U= -github.com/aws/aws-sdk-go-v2/credentials v1.18.13 h1:gkpEm65/ZfrGJ3wbFH++Ki7DyaWtsWbK9idX6OXCo2E= -github.com/aws/aws-sdk-go-v2/credentials v1.18.13/go.mod h1:eVTHz1yI2/WIlXTE8f70mcrSxNafXD5sJpTIM9f+kmo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 h1:Is2tPmieqGS2edBnmOJIbdvOA6Op+rRpaYR60iBAwXM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7/go.mod h1:F1i5V5421EGci570yABvpIXgRIBPb5JM+lSkHF6Dq5w= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.7 h1:HWLRV4xlO15SsHs295AqwTGNwYG3kP6vAjw2OleUdX8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.7/go.mod h1:MWZrPol/xFvU6gyQ/gxqgsjufcbetFNE9gzSXPTLofw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 h1:UCxq0X9O3xrlENdKf1r9eRJoKz/b0AfGkpp3a7FPlhg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7/go.mod h1:rHRoJUNUASj5Z/0eqI4w32vKvC7atoWR0jC+IkmVH8k= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 h1:Y6DTZUn7ZUC4th9FMBbo8LVE+1fyq3ofw+tRwkUd3PY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7/go.mod h1:x3XE6vMnU9QvHN/Wrx2s44kwzV2o2g5x/siw4ZUJ9g8= +github.com/aws/aws-sdk-go-v2/config v1.31.10 h1:7LllDZAegXU3yk41mwM6KcPu0wmjKGQB1bg99bNdQm4= +github.com/aws/aws-sdk-go-v2/config v1.31.10/go.mod h1:Ge6gzXPjqu4v0oHvgAwvGzYcK921GU0hQM25WF/Kl+8= +github.com/aws/aws-sdk-go-v2/credentials v1.18.14 h1:TxkI7QI+sFkTItN/6cJuMZEIVMFXeu2dI1ZffkXngKI= +github.com/aws/aws-sdk-go-v2/credentials v1.18.14/go.mod h1:12x4Uw/vijC11XkctTjy92TNCQ+UnNJkT7fzX0Yd93E= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.8 h1:gLD09eaJUdiszm7vd1btiQUYE0Hj+0I2b8AS+75z9AY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.8/go.mod h1:4RW3oMPt1POR74qVOC4SbubxAwdP4pCT0nSw3jycOU4= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.8 h1:QcAh/TNGM3MWe95ilMWwnieXWXsyM33Mb/RuTGlWLm4= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.8/go.mod h1:72m/ZCCgYpXJzsgI8uJFYMnXEjtZ4kkaolL9NRXLSnU= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.8 h1:6bgAZgRyT4RoFWhxS+aoGMFyE0cD1bSzFnEEi4bFPGI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.8/go.mod h1:KcGkXFVU8U28qS4KvLEcPxytPZPBcRawaH2Pf/0jptE= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.8 h1:HhJYoES3zOz34yWEpGENqJvRVPqpmJyR3+AFg9ybhdY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.8/go.mod h1:JnA+hPWeYAVbDssp83tv+ysAG8lTfLVXvSsyKg/7xNA= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.7 h1:BszAktdUo2xlzmYHjWMq70DqJ7cROM8iBd3f6hrpuMQ= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.7/go.mod h1:XJ1yHki/P7ZPuG4fd3f0Pg/dSGA2cTQBCLw82MH2H48= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.4 h1:xMTRgWRG0wb0n16sdeUzOysJkolU4uAxhgMaGekSHJc= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.4/go.mod h1:RnQs1hNYaG/DtynraB96hzZeNJn4SFQ61DWJVSwIzY0= -github.com/aws/aws-sdk-go-v2/service/account v1.28.4 h1:aydP/dwNvf4rGrIhiZbYzVqI6eqUvy5QT/leMr4KOrY= -github.com/aws/aws-sdk-go-v2/service/account v1.28.4/go.mod h1:vEEsv0UwyJVpz6O9xcEl21qW9JyHqsyw6NJV/Q3FKWs= -github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 h1:gpzR1xWvsrNJeKgkFQHGXJMUr6+VHVBhEpDo2MfkaK0= -github.com/aws/aws-sdk-go-v2/service/acm v1.37.4/go.mod h1:ne6qRVJDTR/w+X72nwE+FrJeWjidVANOuHiPL47wzg4= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 h1:1bdOr2ALn/hXmSu55cn3meYg17IZj9QdRAMWqTURv6s= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3/go.mod h1:jzjrG1/5C4WP1Y045W+SXqqUSVa6mXI4oC/ddfv3BXI= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 h1:tjXRnm4gbiPN59xTPE4sk5h81frKKzSre6+WBDGkm0Y= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.1/go.mod h1:VU8yFbIjSf8ljYsuiU4Onb1sJp5MPoE4Xpo4CmgWzPc= -github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 h1:Wf3pQg+WebfAI5aklg3B6x8/5UDjXSFxzVaX4a30BBs= -github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3/go.mod h1:uOvz7RWXMa+OA/JCphKN+z0EkkHRTCivfgfhqOqtf9E= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 h1:UoAThO0F16j0XhBF0xVhur/ceXiidEtSTOL1AiUhBZw= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4/go.mod h1:75e40kpEp0xN8GV96hOqVZsJS/8w0kUqOtX8GD5uFZI= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.4 h1:L7sv5WDeqp2MnRfw3+gFq+kFZT8gP+jeJheuAPS+BNA= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.4/go.mod h1:d4d6vBDxwSDXrJgsbbqnew9xpWj37flCD3TucpbVGBA= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.4 h1:fU75lgQ3pTsilkNYkU3uWO7JrU/GnShkvk7zmy08Pw4= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.4/go.mod h1:cOfEo7trL6GKGg7xPkYl7K9enEqxDPWwP5Z9g9Ota0s= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.4 h1:rIQoPkHmZqRv75QTWIq4Jmq4ZVKI95YNfwbKNE6WNIs= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.4/go.mod h1:aoke3oc5BgdoMNHsoRjD0iVoDG5sMXzsTf6ZhAnCxvE= -github.com/aws/aws-sdk-go-v2/service/appflow v1.50.4 h1:150FCG6u3IITCJhc5uCnpF7Y9rQtDQZgo1UNOdl/Vzk= -github.com/aws/aws-sdk-go-v2/service/appflow v1.50.4/go.mod h1:cT3dUJToRgxxIEivPPCxtBeTbr/jhbl1OswvhxBurbA= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.4 h1:Qas4CJ9dtjNoyscxK5f3+26KOvmMJt9sV9KHQCp5his= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.4/go.mod h1:L2vWx3ByDvexI+QuR5y5ksGcDyt7NizWVoW5L6+QmhQ= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.3 h1:ba6H23hZ5TGoqP5d/qwR8Pd/5vPpgHgWo+iTMavnxro= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.3/go.mod h1:vk1Unns8uKVcZaMw4E+RFh/WuI9dG0jcIjaFUBaBrg8= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.3 h1:AVa+7o9GYeSg5qklgUWpAklJj+wlPV9AOnFmt1lQLJs= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.3/go.mod h1:ewshZ4xF51yMvIcD0wpgMqwTBHbQV5ELFacslzemz2U= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.6 h1:gv6lQ4vtMjkRmW7THRzMOv6Ftf169KrxwXb85h0Qk2c= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.6/go.mod h1:qsBM3LROOTfueX2pVHqnN0GcPt+CdpjNnlFZwFhuZko= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.4 h1:jvzu4hfjfKfELV/ZYJwMu1BEvdBEd2lCwGAuYk8OPJY= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.4/go.mod h1:ERK1VWUlMk2GgKlvHuF7WC5yPk009A8/YwtxAyT1xA8= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.5 h1:0TR6WL0tfj3wMkm8xVcFxzJMKuXML5marAMGO8OKEIw= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.5/go.mod h1:hdYYVSK5A1bt+RV9VvQKTNU3n7RVBBqsd3ijROVn1ww= -github.com/aws/aws-sdk-go-v2/service/appstream v1.49.4 h1:E1JXCmaYQe6ySAcFiQ7atX891fqtNtT+ILFFL0aRs3k= -github.com/aws/aws-sdk-go-v2/service/appstream v1.49.4/go.mod h1:yyJRdhDbEYWY3Lf9ifvt8I0dNU30giDqEIouPiTStGg= -github.com/aws/aws-sdk-go-v2/service/appsync v1.51.4 h1:76jUhK9kCrcmNv8xj1BiMsPBoBIQqCfuL0Lh+XnWAF8= -github.com/aws/aws-sdk-go-v2/service/appsync v1.51.4/go.mod h1:HuCfVTh3NTChkfGdN+nOqu28fVRoTwMoM2/0PWzYJtw= -github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.6 h1:EMvtMNY56NfNpBKFLKI8srgmtb4DSvlFCy8l8QYv4gQ= -github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.6/go.mod h1:mVQARE6itL/U8epIkgnzd2hhJ8AAQat5FunwaypDM3g= -github.com/aws/aws-sdk-go-v2/service/athena v1.55.4 h1:TUJjhgsNyMCxtUMJlUuEcUkiM3wxdM3pWVCWtSlM5H4= -github.com/aws/aws-sdk-go-v2/service/athena v1.55.4/go.mod h1:xjxXyztlj3tAPouK67eDm2PnxH/Ceg4btt2y+KJe+Hs= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.4 h1:t2TnOPTclJrmPOn6ly+5K+bI4yCR9pUFlguT8viVqQQ= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.4/go.mod h1:h5adZ0NMh3SMmGC3aG5AZ7XpmRFUrlsYYgu9FMCgRCc= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.1 h1:R6r+//CnZNEOyUQDjTaqfUNk5FE/umPWbLo4l3b0glQ= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.1/go.mod h1:EjcucApl+Do5h3SFDSqYdTd8KA25sWmttgF0J9YXDkc= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.3 h1:Erjv3OrmWRuNnHnAjNHjdgKppmqIzrqyY5OPFXdMcvQ= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.3/go.mod h1:WxM0Cy6cIXwyJitcXHzWzUKYHXC/23gp+xZ5OIsvgA4= -github.com/aws/aws-sdk-go-v2/service/backup v1.47.4 h1:IDO4noL9SPjjRDYgQPN5pQkvlWa65Z8U4fxJcMqwgZI= -github.com/aws/aws-sdk-go-v2/service/backup v1.47.4/go.mod h1:QTx4WU73HyMzHtHeOjeNNUBx8ZTgri+R8qTJKg+JZBE= -github.com/aws/aws-sdk-go-v2/service/batch v1.57.8 h1:pLJU4QXH+VYVOpZGwYkjptf6wAbKfFHLHoPygr3Oeuc= -github.com/aws/aws-sdk-go-v2/service/batch v1.57.8/go.mod h1:kQNvBp+FpFZaQ9NGTPuGRqREOs//GhoVSXnYjcV9f8s= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.6 h1:J39E926fD+zbL9qBNPK235Zn+KarvEPOuTtCH/WNN8k= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.6/go.mod h1:Qy7ki+Cj48OXfe7zIRSQ7IjXYMvTE/ddhnpR98VyyM4= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.0 h1:TLn3jH/RbbTfgG7XAgiY0uQv9dFw1oSQdH4QFUYdhpM= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.0/go.mod h1:NFnqdOIaYD3MVMIlRjZ0sUzQPTWiWfES1sdalmLk5RA= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.4 h1:2jf7uhcRTPdNU+rmKmePMC67sW3DwXD0BZe8eqvrFbU= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.4/go.mod h1:O04szfwjoDC5j/tazBZ2hb1hXQkhoJgglRIW6vJWw/o= -github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.0 h1:lbAgxGLW9NwdbUGQtrhTyD1iMwe2CKDVKdq9OimWXsw= -github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.0/go.mod h1:73rs+5WDpBLlZUtgV0IO3+4EjRS8AW7vFbA4RBFd6R8= -github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 h1:Nb77k+S9tLLyBlcGOlnyfR04KzoSXc6/+O+1EKeVITw= -github.com/aws/aws-sdk-go-v2/service/billing v1.7.5/go.mod h1:qrv8fPqdJSgnc1Ue7O3otSwQXVho0/z27T+r8hdPxAM= -github.com/aws/aws-sdk-go-v2/service/budgets v1.39.0 h1:jwOLutNGpsA6JYAidvPNYSBfRlIKlgJ1U0Qv4xVsFsI= -github.com/aws/aws-sdk-go-v2/service/budgets v1.39.0/go.mod h1:IqipleKaucVL842LZ5vJECSJZFNHvUBE883fk8lwLkk= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 h1:rahhkonNJRm0BvfnNE19U9t0xBKXnfwEcnqroRmY2ec= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4/go.mod h1:Wv362fC5OMvg61LsaygecobiBobnZpSFivKsN17JHvM= -github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 h1:VU1s4PIE+qoO7mgUw+Q0CnMKTcovQIbLwWjsAlxampY= -github.com/aws/aws-sdk-go-v2/service/chime v1.40.3/go.mod h1:VPxmIOTeFIvxA+yAzZCwmiEa3Y/UBUdbnPk1CYIIS50= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.4 h1:Y/BCDbNlaidX5uZFL5S1Tqf+yFTIn9FU7sX5V0Ma4A4= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.4/go.mod h1:pyv6oP2apt0MygRhKSEH8xKqn9PPTMMdoaxlZzxUl0M= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.3 h1:CVBV4QSP4X7nzzfDEZk36g+QpnQlpnynLxDRgdKViPc= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.3/go.mod h1:6A5I395go5amjKIMv5RxecQfIQQvjDS9I465L11NgWY= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.33.2 h1:L0DsPxkujlIhY4CXQJrDwExRlVnjImaVJM603INQRF4= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.33.2/go.mod h1:/h5x7oPNBdml80MyUvU1AYeICd+CzxBhSnsnkIGBxpQ= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.3 h1:ZO01YSLeh7hMFOXmEIS/1/qBl96iQxJuM6bn1g9FnLM= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.3/go.mod h1:wA4Inqja1Ct1F0GtY63IakddYVmrQMAAbugZArB2c00= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.4 h1:iU9bsK7azwrRuBbTGID4y0lc/EiRSYNgPebNx0sElk0= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.4/go.mod h1:HYQkrJctfx1pey/YAFRMAKcOlp01pBY5xpVGVZt6kxk= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.2 h1:NsxbnWtrrFysJ3bjBAaXshvGA4OLtdW/x8gHQ+eYdo0= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.2/go.mod h1:eTAwEMBFx1uY9cnjh98c1V7GFqftJRb5X3wrUW04BTg= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.2 h1:DJuk4/xsGQhZOUsHrkA42/fv0286tWOVFzf4O1dO/yA= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.2/go.mod h1:InweIIn0Fz58J7FIBpBOPfjLuIhKcK1G+Ia8Gwxod9w= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.6 h1:tGnVQqQACXWOokzoWwaY8iUsnw+uTLXaReXSDEYHir0= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.6/go.mod h1:t6/E3+Hx3v30UOBBaH1tswaUWK4H7JyUdIEkVe067FY= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.3 h1:ZjZVJviRZ+Bx8h9Wcb5JlGRRIU1KiulReIdpWv1O4zk= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.3/go.mod h1:0+GiOMpYxe/WgFyJVtHl4lUL+SiXXWaVFmN7AowVw3k= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.4 h1:Nk/GP0JrQfxA58QMasIqZPnb6T1DMYTg0Ut5BWqmauc= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.4/go.mod h1:9mOeWgtN/8Y/v2WCfwYr+zpedhfGmtltk6rM30XCRt4= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 h1:Ct4RSaeHLX4h6eua12PFjz5HoZtWrCWzlNkATPvZjDw= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4/go.mod h1:NE9Jd1chPuOVkgPPMkIthFg99iIqlLvZGxI+H3bJB3E= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 h1:OSye2F+X+KfxEdbrOT3x+p7L3kr5zPtm3BMkNWGVXQ8= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1/go.mod h1:bNNaZaAX81KIuYDaj5ODgZwA1ybBJzpDeKYoNxEGGqw= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 h1:XH0kj0KcoKd+BAadpiS83/Wf+25q4FmH3gDei4u+PzA= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0/go.mod h1:ptJgRWK9opQK1foOTBKUg3PokkKA0/xcTXWIxwliaIY= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 h1:w4KTIyi00VkvstzYrFNBpYMkgjNHTkKmYpJhpvWKf5E= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4/go.mod h1:7BroBfL6xrlb00bp3fugPU/DJW/5wLgcmhBasBnC+ro= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 h1:ndr4GuUl/NrlBAz5gJ8Zyeb1Zn4iHYpJRWnjHLK7GRs= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3/go.mod h1:Vr6PJ4LOxgkyhWPEwjYsyETCbGm7Q99M4UZ/nnJtEJY= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.6 h1:8m0xSqNJqmbjAqI5qSSyX2DstjmjdFqYwGMVtmQfozU= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.6/go.mod h1:F/eq1WqUWcvdqr6W+ost/HzzTHUS9TV5roxmWTbLyz8= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.4 h1:mpSJqoSQ72txLeDIMITdB7BrympxSJKHKyDZlloDYEQ= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.4/go.mod h1:si5vnuLTMYup65U6CmTp+n1+q5Uzpdl2Hx8882j3Q5Q= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.3 h1:qiEVvlxSiJSLAU1mE7cJekrtRSfeouALHAcb6CddzkU= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.3/go.mod h1:lKknoh1Th7WZCnqc8/b7qkfbTvqzh/QiU5QGHX+Q3rE= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.3 h1:DZHdW0Tw4FgzzM9X8Lxlm7DnPoJF7ut+R3ulwspBC0w= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.3/go.mod h1:QPWLaCXIoNHNlo+GTCccx63QD9F5OkPjZ3Jr6pPswyI= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.3 h1:0VKjWe92lu13piBobyz2HSPZMfTcONDCa8XkeH+TT7c= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.3/go.mod h1:wxXJv5Q2RUzp3H8WsU7HR/vfHnlVjA+01QvgkMB3bf4= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.3 h1:X35geUOBvQGKZiCZQdKhSCx27pwIO8z1jXb+oYYoaCU= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.3/go.mod h1:gHPuA0INnzSbuQVAW27Mmb9OgPZxKzxY7gimzZDQIIs= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.4 h1:jCsKpcD6Dj8daCTpwQb4FcNxnIjXL7+5vuGGzS0u8HM= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.4/go.mod h1:xbTz5WMnoORVyPmGoDDz68krfdSj9gcA/WLQq+o9qmg= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.4 h1:MTq/vcMa/kVYHDpYIqCNfELGGyN+ULT6oH4Fmt5Q55Y= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.4/go.mod h1:xgzHvEw4wFGJtePq+mnxuvXbIgHjR2Bm7bY+tbqbv/8= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.4 h1:cp+djURkd0cUDi/dVkx9MCCDv84Kd8TY9Et3KmCFBjY= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.4/go.mod h1:9yO2ora+z+V7i5UcoVZRkTN+wrqKk+blZE6HapRoXhE= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.4 h1:0u9XT6Mi5V6U0GGI0EG/QHKRu44PO+9vor1awxLywxc= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.4/go.mod h1:FTlFWei9isFDa6mU66SHEzMpK+VVWqMbc1V3G+WCnOI= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.5 h1:FOD3qP3yqkNE7WN8PjX9Y+9fPgJdvOqLXnA4DZlXuiY= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.5/go.mod h1:M535tDOpoNJrgl2FV6nUxWq8asER7mY+xoTiTPcgLJ8= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.4 h1:29BM732laN08dVs+5z+qh+vBPeZEnj15IqobW4y4oNM= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.4/go.mod h1:H3n/gYCQF6ZkjFQI+fVVXwbkRLDPXbEtbBi3NwZTnm0= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.3 h1:VPxguqTtIcjVPnwHiJ7rNQr9gPERlI/vKzrkl/sM7Fc= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.3/go.mod h1:aGw9jt6otTqJ3zwm+AlUoNl6Vrl8AkfFWIibvk+BIeE= -github.com/aws/aws-sdk-go-v2/service/configservice v1.58.0 h1:qixDSVJp0z2kQ7n017oZp5RKQVh81gaedaeuqISm+iY= -github.com/aws/aws-sdk-go-v2/service/configservice v1.58.0/go.mod h1:Ao+h1Szn6S3ZemyfA9I8YMmqu/sRgexyx2xZJdwH9bY= -github.com/aws/aws-sdk-go-v2/service/connect v1.140.0 h1:ymo0C+sckUW54Zaonk8/YAJUW1urFLlBGJ2vT7BwH9U= -github.com/aws/aws-sdk-go-v2/service/connect v1.140.0/go.mod h1:ybFXrfh8spGBlbgd8q/MVqzt2RvdSMhWO6EiD4UkHRg= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.4 h1:KjM2HAQgsH9gaofgy+JKHF664UH9zwuetSo42il9eLk= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.4/go.mod h1:gJJ6zE3RWdeQfnNcpaD9Hyx1rqLqMA3RLYR9fveHWkQ= -github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 h1:mDhXopIZ9wA+rRujZzTFZAQyqQ1YAWiWYJBoVy0SqZA= -github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4/go.mod h1:Wxn4D3He/BjPolAe7+Piw/z3QwX/gKf8y1qgm5i30pk= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 h1:IDrhAstiKNG91mcFFQsAMcuimNxOUawoOOYUYCFGJz8= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4/go.mod h1:q6iPHDrwx+9RYDKoghNCP5g35n86VB+6d4E7nx4G1gg= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 h1:xHcF7reLLeIiwH0p21l5jVD3p04ZlKxheHHSJIsZ4sU= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0/go.mod h1:wqo8rV2j3/Uh59hqumqQUgY3YgiVjHsnPRY3FzNDx3A= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 h1:+uszhA1bSLFZSgAMi/Yro8CzUb+iFIpNvT20CY7VFPY= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4/go.mod h1:czyjqxobbmdUEEm1n7bLoIKkOVkci8YJ5visLKUyBuk= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 h1:4xkoNwaiDfIo9BgELVPBf+NGHJcC0JYCuGMVSGJemmk= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4/go.mod h1:5sgiN0bU/hz16O02ZdbyT09W8ronvsf6G/o5RhtOqzE= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.4 h1:2E9WtBb3Q2XSmjYtKK8W69pHnGH7suHw8bkQxoV3ZUY= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.4/go.mod h1:yFELb3hbh4s37dNPx/9Cw1WqNvIQpUZ1DDUOwyujG4M= -github.com/aws/aws-sdk-go-v2/service/databrew v1.38.3 h1:75aFq5weR8mWFlXKVcf+w8cHRvPTvmpd5ne2KX7fsdE= -github.com/aws/aws-sdk-go-v2/service/databrew v1.38.3/go.mod h1:tQud/P2f/T2PMfBxim1wMxbszPxVgqOWwn7B/5k01c8= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.4 h1:nuCRmWnECQ6dt4dgnj2twKS0VWIKcAeXwOUCFpLhSKo= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.4/go.mod h1:t1Zf/bmvRLSbrmOnS9B90Onwj9IGknjw2IGCKE1MrSQ= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.3 h1:RT2vYyEURb1Y2c9WoufFdJYt9RP5cPIlvZqT7gcg7vc= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.3/go.mod h1:AjQynFDMSWmaGyNwzNlQQ4t1SGtqwY0Rq0dgqCKsGIA= -github.com/aws/aws-sdk-go-v2/service/datasync v1.54.4 h1:HaqO010CgYxtu8mNUUQUd2QC3yDN4JS9Olt4vOQpR20= -github.com/aws/aws-sdk-go-v2/service/datasync v1.54.4/go.mod h1:7TqFyNtpN5h1VeBbN1FcXi0T3FIXcsPUVqq7iJrlsF8= -github.com/aws/aws-sdk-go-v2/service/datazone v1.41.1 h1:otPvyppOc4nrTxTiHrki7/2Bfa4zmXUZ7dwbOWftsGE= -github.com/aws/aws-sdk-go-v2/service/datazone v1.41.1/go.mod h1:xGX76ojBOXWCIM5ZjtnYEqUUVbBjMdBmPBNKyXhBo8o= -github.com/aws/aws-sdk-go-v2/service/dax v1.28.4 h1:0H43bqbpiPF4WV+2ppV9l6T30lWolBsshd8ZQYt//wk= -github.com/aws/aws-sdk-go-v2/service/dax v1.28.4/go.mod h1:aZWmrV2Xi7rNUPy0JZ5vQGF7zboJoekVQkp7+ETUy+Y= -github.com/aws/aws-sdk-go-v2/service/detective v1.37.5 h1:a/VOCosbBdJUSyaEXRN4hsqGbXG/itfOquy7GX1vBeU= -github.com/aws/aws-sdk-go-v2/service/detective v1.37.5/go.mod h1:Wd/1AyIHcEie1jxULqHsyyDQyCp7t7qZGkTdHYWIxH0= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.4 h1:jlHUydwGygu48BGAxwnLVRXoWSBJj0Bcxp3vlPutrB4= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.4/go.mod h1:7uG8mxCsfVnpqJena2CnrcZq/ErivfTfUhQJSSm4Hgk= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.4 h1:cOxtWV1GUyZNnjTjtMubcxcxxPML9UDPpvXHPDXYwiI= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.4/go.mod h1:xay2+q3bE2RGgYETO5xT6azzyur8hJA95wBVbqXGevw= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.4 h1:S6rzGfjYIEEI/VDbePk0+FpOVwLbHu2HnHvvFBwvomo= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.4/go.mod h1:CIj8gf7lhOeB2QC4bluEXD+boHFBQdXdiKDwDIfMaX0= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.3 h1:iUQ+6c3yr+bCq5gg9eNQEfuvolqyNQjFXKGmTXUg6Fk= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.3/go.mod h1:YWvsW4SIxjxmspcZp26ax/TDaEuqBV/3fh3wXKw+sRk= -github.com/aws/aws-sdk-go-v2/service/dlm v1.34.4 h1:XMYBoEVe4osddab0s2QSUSoPLMTaVSIO8yILapboDDc= -github.com/aws/aws-sdk-go-v2/service/dlm v1.34.4/go.mod h1:+4Ps1fcvfOwtempXFqmTVkqKHz0Szj4QNZdZ6eg01r0= -github.com/aws/aws-sdk-go-v2/service/docdb v1.46.4 h1:3/Q8u8WFz26PNHnbysOVqW/SKM1eZyYpiGGCOQpbzc0= -github.com/aws/aws-sdk-go-v2/service/docdb v1.46.4/go.mod h1:8Vo8DDQJM/x5yD0zkKJUqydUnpmES8rZNNjEhSSDHKA= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.4 h1:0HSQQ+x/2cMMfOMQWSB6QZSBfaOF31QtfDEvppMkuZQ= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.4/go.mod h1:67W8iJW1OBEPN3zSouebHSuWkAuZ6VJ3hnn+t0XJRIc= -github.com/aws/aws-sdk-go-v2/service/drs v1.35.4 h1:Oe3tvXkRSvtyJAtmD+bK0yTPNCqb9jPfHmVjWD+Ny3Y= -github.com/aws/aws-sdk-go-v2/service/drs v1.35.4/go.mod h1:Wqni3gRHuu9pIb42cL9m+jdBNntA4a+dk11KFeRv+sg= -github.com/aws/aws-sdk-go-v2/service/dsql v1.9.6 h1:hgRu1NFDnCR5V0FkuGiI7WB9xR/xEtSNoCLqRzB8W1E= -github.com/aws/aws-sdk-go-v2/service/dsql v1.9.6/go.mod h1:/ApNiCtQwiyM/KNe14Q9wkQ4zN5HqECXea86ADGRCCQ= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.3 h1:fbhq/XgBDNAVreNMY8E7JWxlqeHH8O3UAunPvV9XY5A= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.3/go.mod h1:lXFSTFpnhgc8Qb/meseIt7+UXPiidZm0DbiDqmPHBTQ= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0 h1:x0v1n45AT+uZvNoQI8xtegVUOZoQIF+s9qwNcl7Ivyg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0/go.mod h1:MXJiLJZtMqb2dVXgEIn35d5+7MqLd4r8noLen881kpk= -github.com/aws/aws-sdk-go-v2/service/ecr v1.50.3 h1:phfqjO8ebHGoC/GrjHcuTrVkDCeM9A6atOYTCY1XsXo= -github.com/aws/aws-sdk-go-v2/service/ecr v1.50.3/go.mod h1:TbUfC2wbI144ak0zMJoQ2zjPwGaw1/Kt3SXI138wcoY= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.4 h1:/HxbCJjqyO4eJ1FCVnvUJtXbWOnG217jMpkYaTUP6V8= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.4/go.mod h1:9zEtIIye6jj1KTURitANknagaJqoo6TCy/ARcr+jsA4= -github.com/aws/aws-sdk-go-v2/service/ecs v1.64.0 h1:WydV4UxL/L1h+ZYQPkpto6jqMVRslWrufYstFZPrQEc= -github.com/aws/aws-sdk-go-v2/service/ecs v1.64.0/go.mod h1:aJR4g+fZtJ2Bh8VVMS/UP6A3fuwBn9cWajUVos4zhP0= -github.com/aws/aws-sdk-go-v2/service/efs v1.40.5 h1:iOfTDjU/S2b0BSWCqv7fDbT4uKo0e3jdtnRHVwXXggI= -github.com/aws/aws-sdk-go-v2/service/efs v1.40.5/go.mod h1:gnXK8cQKVDpkqG7lCZ2NYx32B9WbTIZsGiAFRXxpX70= -github.com/aws/aws-sdk-go-v2/service/eks v1.74.0 h1:GdG6qvpMet2Bs0XQR3O/4RJ8g87bXfPZCIzPBNqkX54= -github.com/aws/aws-sdk-go-v2/service/eks v1.74.0/go.mod h1:FeDTTHze8jWVCZBiMkUYxJ/TQdOpTf9zbJjf0RI0ajo= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.3 h1:uiWSUtTWqpvhP7KSEpVpIm0LqOtXtzOx049rmukP/gI= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.3/go.mod h1:igTRxVYuxplMPKS5J1AEThtbeFJQhUz845YtDRDzJhY= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.5 h1:G8Fc8YJ8bTHvyWu0qAp/HJebp9Mjtg2qpmQ0L071OKs= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.5/go.mod h1:FxgAAgHLfYKd4H/+e1hSUjdS6wFHkAlC6IsVNwjwe3A= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.4 h1:LU+R9E1B8FXjKbGxL4TSmaTrmUk8JOx2Ad2rJBFh4JY= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.4/go.mod h1:k1o3miorfzvEEwJJUbM+N+3Th3HhaLYgCUPdphBVMzw= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.4 h1:gV2I0ie9/hnwYc+HO7H6m4iSQ5n9s0n0KO5TsmOKn24= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.4/go.mod h1:YXClVP0EJ91D+khPRye/nUxK6/uQOsFEhMTKYiOnnrw= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.4 h1:x0GTanUupmZLHUqqxR1zTubiBsJt9BXu1RGPSAwqGwY= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.4/go.mod h1:BYpnrLyOHFPjo962ieMDYnMVV+DX/vhHv+fC5xqaDX0= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.4 h1:fcnPiM4WIbUoEk5VJ45fJlIVk8zkcSMuepuI8IZ+FNQ= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.4/go.mod h1:j4tMgnEQp7HVeKOGwMgrYGiqdhLernvp6FfBXkHmzIY= -github.com/aws/aws-sdk-go-v2/service/emr v1.54.3 h1:pXKG3/B5OVTYmautR+UpCWbeLhmaVnxeiWkEXVGzzSE= -github.com/aws/aws-sdk-go-v2/service/emr v1.54.3/go.mod h1:Ir/4rlQE1/wjbg2QdNNpIbPFVk4PR2ki1Td3VjSaHG0= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.0 h1:Y5/ySwaJzOPO61AWX1BGj4Yp6bI1Rzc9JX0FS7Yrd1E= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.0/go.mod h1:/AkijHJn1MbVjpsIPuL5ck8P2pqxM8/FO+ihLd6DOWs= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.4 h1:zOWo+iUy8bWSXDxz99OiZGBl8KBbgexMTCP3rDxwzQ4= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.4/go.mod h1:+krd9QJi+8dAGmplRYZF3OnmP+N145+hrUzIo7tFlhQ= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.3 h1:390U/RkWYmxI9z2konFlfhXi05PV6+ywYy1rDvGvD9c= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.3/go.mod h1:BkhvzMxAI/j6qaQ58vny9wBMemSXuIy2NL2omslXZSI= -github.com/aws/aws-sdk-go-v2/service/evidently v1.28.3 h1:mmhBtyY6j9ncbB417ldmSvpQH9MIW8C6H20OZstvzTI= -github.com/aws/aws-sdk-go-v2/service/evidently v1.28.3/go.mod h1:EO3hYYAqlOBhu85e14Is+zvtf70WHR0QTTIrIkAzcgc= -github.com/aws/aws-sdk-go-v2/service/evs v1.5.0 h1:FrVKla4UH8i+RtnH95HVf9b8DwK+0kZjE2mMuYqy+y4= -github.com/aws/aws-sdk-go-v2/service/evs v1.5.0/go.mod h1:VgX/yf6xu2mQDvG6ZVj01YI3aW2IAA/vrXqhVNZGuBQ= -github.com/aws/aws-sdk-go-v2/service/finspace v1.33.4 h1:nIMnqlQNvnMuMkNvSrcaykHHHBZtsSZ+uPeKCpKyBx4= -github.com/aws/aws-sdk-go-v2/service/finspace v1.33.4/go.mod h1:2ZHiMpbMFUR31mfnPdWmX05EQJER12rn0X2LmZse16o= -github.com/aws/aws-sdk-go-v2/service/firehose v1.41.4 h1:LRa23ftG+djfUEQ5rGQxm0IfX5pc1bJ1HL1J/F61074= -github.com/aws/aws-sdk-go-v2/service/firehose v1.41.4/go.mod h1:QgY+jFd7FTNnRsurxGobEQ1uRp+8kFP/UkkWVXF6DzA= -github.com/aws/aws-sdk-go-v2/service/fis v1.37.3 h1:w86eWbktz/0doyawd+dayOgnEb4DZ8n0prb4kTsYAgE= -github.com/aws/aws-sdk-go-v2/service/fis v1.37.3/go.mod h1:PsJ4ekpdvwqIFBlgMZ1HaZ5P3iituQJfQEy1eLz2fAc= -github.com/aws/aws-sdk-go-v2/service/fms v1.44.3 h1:UyOwFgg45R332kOkxOHB5p5Eyg9e+s2fhSJS1fx9Ypg= -github.com/aws/aws-sdk-go-v2/service/fms v1.44.3/go.mod h1:lgy7T6HGD6w11vJ0HsLm/HMONw8laHCu5OSH+sJR4/A= -github.com/aws/aws-sdk-go-v2/service/fsx v1.61.4 h1:7cOXwp36LxpPZfZYeNvnBI1UD5wWo1IQBHI6SiO8nkE= -github.com/aws/aws-sdk-go-v2/service/fsx v1.61.4/go.mod h1:ZF1kKlh39RVJXsTfjjn+ndGeGyOgymTfBKDLAQt4Neo= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.4 h1:LW3GDoIL0+6ZLxu3j1Fpcfb0RTNjLcZfYBIRSp8HKdM= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.4/go.mod h1:zIiSTDYhzmpmhTwpMBTM2GCqYUrT4RXXGjbucKY11sc= -github.com/aws/aws-sdk-go-v2/service/glacier v1.31.4 h1:9PpI5RumQIRZj/nwwxg3EI+pXiytPQpfhExsWrVarIw= -github.com/aws/aws-sdk-go-v2/service/glacier v1.31.4/go.mod h1:berXJQ3VzyaSs0GMWAxbR8WUoyTAbhl4V/Y2KP0qNWI= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.4 h1:qXSfvvkko/4z1mRyMVXpjwy76Gu5Gu/Sp7u/3rcfUq8= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.4/go.mod h1:cTDgKOHww9GcdugD6O68jqZiYxWawuWGth2KgugvEnY= -github.com/aws/aws-sdk-go-v2/service/glue v1.128.3 h1:ej5T/e0mz7iMwahKmImq/V2gVg0MUwfu3ylPXk5ZccY= -github.com/aws/aws-sdk-go-v2/service/glue v1.128.3/go.mod h1:5V7k8XWjeKYJUVU1bwMcudAVTi7RoexWqKdg67uhtRY= -github.com/aws/aws-sdk-go-v2/service/grafana v1.31.4 h1:1TEsqjvmsw8853+Pe6H/mMFySsZX0aoMJ4XDqEkwdg8= -github.com/aws/aws-sdk-go-v2/service/grafana v1.31.4/go.mod h1:Y21s9nnGF+FqLqVMy80j9lxhGTFE7wcxrtJNKH+wazs= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.4 h1:a0xWOiAVwUN6lFLLyo//ZmlYisRBShtqWAK13Wq7Gqk= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.4/go.mod h1:s+U6weWn40Nvq5S4eLzHuhES7uSAIG5KW87562JaEqg= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.4 h1:QD71EO8w7RDwT/w6gnUS7dD+JZZljeomz/Gx9XvHxNg= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.4/go.mod h1:F/cesec44yEp9vF7wZ0Z+nAxQ3K6rOUeccvJw4VVMsA= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.0 h1:TCxB0sehnsofHa1YUfs+p2vBCfjaBm2le0Bd6H8m58c= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.0/go.mod h1:TDxdVXXCbO7M8QOQYrF9jqjssGUCdqHAIKxiVsC45NE= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.3 h1:pKDsKc5fov+2XJx4JcdonlpUddvvHozYPw/XEBfgQMA= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.3/go.mod h1:WX6qFIz7GhV8sbshaRGsHvahNLwclpiM5i4SVMKSDEA= -github.com/aws/aws-sdk-go-v2/service/iam v1.47.5 h1:o2gRl9x3A/Sp6q4oHinnrS+2AC9Ud8DaG4JL9ygMACk= -github.com/aws/aws-sdk-go-v2/service/iam v1.47.5/go.mod h1:0y7wFmnEg9xTZxjmr2gHQ4xOHpCfrt70lFWTOAkrij4= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.4 h1:KO3Plw+lTPS+Yz9F7gHJlaIoehZ7j9eVwcLYHqTKXQE= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.4/go.mod h1:FUWsCCyCZzfPI6GVh+ASz+f1M+GG/ZWGaUjqWp4ttR8= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.0 h1:kjLxBIKPJBYeTrioSRqRFu2CVxP6yALiOsz0eRPVa0Q= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.0/go.mod h1:Mqot1KEfp6SOthyGtSV/2vcATRychQtv8mugiydCUfs= -github.com/aws/aws-sdk-go-v2/service/inspector v1.30.3 h1:7DQM0hDZ5XZbH7gTRUarFkO0enCCn0k5kr8GCTXkLn4= -github.com/aws/aws-sdk-go-v2/service/inspector v1.30.3/go.mod h1:Wzq73ChjlQ2LxaO73XnOD55Jqz/J5kSHU6Gd1YB1yE4= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.4 h1:Xp+30qFm4R/ZHIT79K/2HMzHYm1S4ipMctmWttaSQQM= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.4/go.mod h1:33s7mmxOLzrYa4M5pRUkDCe/5wgSRi8UlNJ7z7AGDRU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.8 h1:1/bT9kDdLQzfZ1e6J6hpW+SfNDd6xrV8F3M2CuGyUz8= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.8/go.mod h1:RbdwTONAIi59ej/+1H+QzZORt5bcyAtbrS7FQb2pvz0= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.5 h1:ahcmzpmxwWG+/G67+QVEZK7GBWywTSG6jDEJ4PzpYgo= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.44.5/go.mod h1:9usigGMimzM79Y4yFdqgqC1SasoUKDVTmwpeHBrw6yw= +github.com/aws/aws-sdk-go-v2/service/account v1.28.5 h1:VDhBmhdDYFqzT4jBo/+dlK8OQBzCNdxbbvmVFOxIGhE= +github.com/aws/aws-sdk-go-v2/service/account v1.28.5/go.mod h1:LhQR+JAtexjWOFlTHqdqTv/BTbvs9xY68KTzCEx8woo= +github.com/aws/aws-sdk-go-v2/service/acm v1.37.5 h1:vTmyvkmMJEKZgyhSuaEv8gZCJJlgNpSpYy/4CExjHoA= +github.com/aws/aws-sdk-go-v2/service/acm v1.37.5/go.mod h1:TmyW/AiLmFEXwFsm5hh2T86BpgFbcB1icshuzFu8LgY= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.4 h1:1SdrKkB7zWf/jzV1NCECWGaK/tW+hDFein1Bx+zlmM0= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.4/go.mod h1:fEljIacWp3QN6OhEeSdETPP1QAon5eqOFQNNU870EiQ= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.2 h1:LeNARz0HYUAPNF9SvUE+7YuWH9EfVV6lXyDSS/IJGZk= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.2/go.mod h1:FvXvxRCSJ+C4GXgypn3JO42MrQpuw/82xT/w+pgZ9eo= +github.com/aws/aws-sdk-go-v2/service/amplify v1.37.4 h1:8yMWsijdMvnkK2CY1JfVu5hV8r0yprDaecgiacf1jrM= +github.com/aws/aws-sdk-go-v2/service/amplify v1.37.4/go.mod h1:k2qW1S0NN8fi7hLuQjqOdQvMIbzFsvM3qm+oS1SfX60= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.5 h1:skBoXAddT8Kj8Hu6B/+rpDd8btytsDuQtV91j4yv9Kw= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.5/go.mod h1:17HIwZjGn7CtmiRV4Q2AO6srqQZRC0c+KlAiyAGK+uQ= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.5 h1:6XVaF2fTNZThz5n/3YObHIIFS1WaaGnbQI/6aJasdas= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.5/go.mod h1:MYkXmYhWdgLwkzyjfbRchnSf53boo7m6QAS3ZRXaZKg= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.5 h1:ZWyYnXjlZ+48zYLyzOZ9t6BrDCJlDzd3A8TnGtYjDRI= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.42.5/go.mod h1:LpxhBlp1oM7R0CErx8+KR9VpiSS1UUb9UEM0GivB5WM= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.5 h1:DK+9MD7xMUFGJiqW+kJiMSIxaGoO8F3KJL5tAXZbnWc= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.16.5/go.mod h1:2x1+Rk0RpGfGhYX3dWyA21YiF/v65J3Y6GywC4VxiWA= +github.com/aws/aws-sdk-go-v2/service/appflow v1.50.5 h1:G4mGauYPPnWffLrZGLSBHMlSVZmJ6hlyMlL0UhMWuJA= +github.com/aws/aws-sdk-go-v2/service/appflow v1.50.5/go.mod h1:DG3i/cd3uEHB6gWWLPhI2+GNOW5Mcq0zq+9jpmQ+uEE= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.5 h1:gL9t5HYLKImIwtSmYOT/mrmFei/9w0OHRaImNkqO8gg= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.36.5/go.mod h1:mpG4rVlLYCIRESFlZlKoTmzGkeSLLTiHPHJtbGS6xPk= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.4 h1:iO8udIPScJgk8U53hl8psGVig+HFFY513vFw+DvJTJ0= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.40.4/go.mod h1:ybHG1Hx4EKsZs9lfWeBrx6UJf59niCybxdJoUD6KjOg= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.4 h1:hxfrwha8FOWp1H7sVb4qIVSezWSMOgamUCadRR4S58o= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.34.4/go.mod h1:vU4xegG7YujyiBgOqPbx1IGg1OeijviwP1rAK/p5U6w= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.7 h1:zOvYvWJQUI0amCkaUhS9d6ObzYkBodn31G9GkbdMSRk= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.15.7/go.mod h1:FgQ2k88o4rBYovSJ0Vi9Qo6/0KdoCc9GEydhsOkhAn4= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.5 h1:8vAgM2KvQL63O335li4QwvVcrMaABAAr38bbi6cniNU= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.34.5/go.mod h1:/LON1mHNfDZfZDuPKjl7qCavUC4d/rBZnjDwLdkNJAQ= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.6 h1:4FqI5E/fw0pH6HgflI1eyn25Ss1BxtE8Vy1ubVzQpFY= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.38.6/go.mod h1:QBuxmH6jvBz+VbBZRabFZ2z7sdPYS32OwSzzcPSbFso= +github.com/aws/aws-sdk-go-v2/service/appstream v1.49.5 h1:gbc/S8roq3jl9hdaIDdEYnK7oOhU23ET+rjidn045R4= +github.com/aws/aws-sdk-go-v2/service/appstream v1.49.5/go.mod h1:VHqX7t1TFzCW6c0/baFjL+c/uTLHTve9QvGnIl2t68E= +github.com/aws/aws-sdk-go-v2/service/appsync v1.51.5 h1:pZACTcwJMzHYlmqnF5V9QHTeRvHqCcRoKBVRs1b8tKw= +github.com/aws/aws-sdk-go-v2/service/appsync v1.51.5/go.mod h1:9peX7FKIuilf8nao3Sj6HqSyxq1cyxyS8hGOowUgw0s= +github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.7 h1:9WFtb9NflqlsC9/qoMYSMuHTPjefC9QjztCiWXroprM= +github.com/aws/aws-sdk-go-v2/service/arcregionswitch v1.2.7/go.mod h1:3NAtNcNccpi/I1R0UPcvYhroarbJKfxCewqIq+skiow= +github.com/aws/aws-sdk-go-v2/service/athena v1.55.5 h1:rZi1Qid0n2V4gnzxfmn6FEMEU6zKtCmcUV3VL9UiuRM= +github.com/aws/aws-sdk-go-v2/service/athena v1.55.5/go.mod h1:aLJfNa+nondGTH2gZ16OWEs9shuG2R1kM8XAFeyzMp8= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.5 h1:uzwUV8J0g+/tbZvfZxC/n7l7hurf7jQN+ZWEHwj784Q= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.45.5/go.mod h1:uMLfGaVbHvrR9i6RbRV+tuLqb659g9kkMEWpqkSo+S8= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.2 h1:YOWVoIjUoiwAVIRVU3PG2yNldh9dQT5OegnO99RO4ls= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.59.2/go.mod h1:t08UbddtoRQcKiIW2ZTfxX5x6vRaTj6KrKcf1R0I4tw= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.4 h1:qwgy4hxeCZmoYKMoxvY0DYNKmtJXv9exHVeVr0UVE4s= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.29.4/go.mod h1:jzCzRhms7J54Vx+T+OzbAPXu66H967Kx2pDBcQp1ebM= +github.com/aws/aws-sdk-go-v2/service/backup v1.47.5 h1:hXI1ic7LxVqoLJSifY9NRynWgKOV8MBqzRwqqlN+I+g= +github.com/aws/aws-sdk-go-v2/service/backup v1.47.5/go.mod h1:wFR/78TqeXIgQoFqu8m0SmwFx+ofSV3Mg7j1pyVTX4s= +github.com/aws/aws-sdk-go-v2/service/batch v1.57.9 h1:4zrkNVi3V20XlQ3tYJ8gLUyYWTGl1uAdES74M+mM//o= +github.com/aws/aws-sdk-go-v2/service/batch v1.57.9/go.mod h1:fWHsie3W5XBYLYlamL+Jv/zPhbjaSnOwoX6/2XvgXBA= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.7 h1:392wLo7mSsuSpYK61ozSmvSDThF7Xn6DOZltb8SOQjo= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.11.7/go.mod h1:CnVBOLm1nyq4dbS1Xl44GpxfOGZf4DiNn4d8kBJlQ6A= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.1 h1:vAnqxsmlnEYUzKUQLFjfy+YhilvIGqhBACU5vZPuP6I= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.47.1/go.mod h1:q/R1CT6xFa6YcVvNQtenUSMEs7tVd4S1oLulUd8+RCw= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.5 h1:M7a27wtqblMxOE8RnsCKXPO2xnuU8IVLl7nWpLOy27o= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.5/go.mod h1:NcYZhLyy4mnuIweU0K4WmE3GcxRzD/X6VqR5+3L6K/M= +github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.1 h1:r5tPK5Z9S0GxQCkVu5uDfMKiJUKyhR75aoVV9sIw+Tw= +github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.5.1/go.mod h1:cX30dTXPoDwf1ZVgnZU2wWaCV7QJdQvjBoMoWiJsnt4= +github.com/aws/aws-sdk-go-v2/service/billing v1.7.6 h1:dXylOk+JWTe/L3qzumnwz5CwO7+YLD9eacHOCJhtizI= +github.com/aws/aws-sdk-go-v2/service/billing v1.7.6/go.mod h1:NBTn4pyQeXa4/QT+wch5FqSPbZ41VfMZQmiBBePsL7k= +github.com/aws/aws-sdk-go-v2/service/budgets v1.39.1 h1:grOdaAKovx1HngbE3uFDzLqUXtGmnfMJP3WAiHA0jBs= +github.com/aws/aws-sdk-go-v2/service/budgets v1.39.1/go.mod h1:EDsMEIAC4BXqdkY/iTme86MCHd12edsjk5whpNyO6Bw= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.5 h1:HYVk9Mcs5/UtGov0QFkbee6kiJpFj+AXNQuDbHUi0T0= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.5/go.mod h1:PGj+XRbKggjufbcjSgl+FduG4flALTsKtjeSkG6UpKE= +github.com/aws/aws-sdk-go-v2/service/chime v1.40.4 h1:1mQj+E0k1DX9EgHFlSZT7ECVJt7acH2ZsVOCB5H9jbI= +github.com/aws/aws-sdk-go-v2/service/chime v1.40.4/go.mod h1:kGoQl88Hso174Z29Q/dodAmfWDZ7EHhqRbO1i9E2Xx0= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.5 h1:26+20xlISJWcOldgHLNY+Yuxbu2Tk/oDhuty3Zyjlpo= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.5/go.mod h1:eYayIHn6FawTcUhAqXd30b/pP8z3p0zfhfyse2qGWqE= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.4 h1:jFefKM709nuyV6uAYg6z/gxe2PidH/Vk3yADnjwSw18= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.26.4/go.mod h1:MBoFrOMGcstb0S5dglAEQ7SpX4TL+6Hn5FYZqWZI6qQ= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.34.0 h1:7zhXcQjI6YmzEyXWFIpGQl4IF6JzQSvFxmHu/oUMDSw= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.34.0/go.mod h1:poFTlKjRrbKjBOYKNTqfqsqoA4yM47e8Mk5HYHOeZ/k= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.4 h1:nWw9IVwWMylobwf2hR5uBhOMQ8+lj+xWNk4jP7w2skE= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.33.4/go.mod h1:rxayeoxnwqMBBypasFD2HL0taPiqntanftVq/raOkh0= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.5 h1:P6orsPAkseLLWPvAnniFTnpUFT43PLKXUFMwzHz7RLI= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.5/go.mod h1:xBedDPPftxA9mt/zRNFA5EZEtqEmBJEtEYbW+qJo5tM= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.3 h1:P+Jr65DtpIuYme6a3pjsvDIpCfNDk8oCFVzGsfhWqz0= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.66.3/go.mod h1:J5tabKm/zD5b3Uz4LKdZytESCQu0MGEzxUX7XYOOhNw= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.3 h1:JgzZxb/9UhqBwkRXrEVyHZMeGsjyovdERq15L3U9A0I= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.54.3/go.mod h1:uaoE1dsE7W/qZbWnAAfX46QEKpB4rrbdfnp3HRN4dDI= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.7 h1:tHmNsJ/QUJqBeUUD2gtpCJi1lQgDVNNkSGMxeRbsb6g= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.12.7/go.mod h1:cjvhAmUH3dIWLzOfxG3oVomq1w5etRw8PhxMU1Bu3LU= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.4 h1:F0f5RWjICiTvM9h5BP6U8tsdP6VdfSsy7euvha3hHTQ= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.34.4/go.mod h1:yztjcwCBIa6NSm6P4akOysMegI8AG7zwk62BQGYTuxA= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.5 h1:OemDTmq9D69Ur8gTtEpkdcGuD8LHOjeHfVcq/Rb6Sz8= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.5/go.mod h1:PzvSXLkE8mlOqSJl5ayXr1nc8+kaic9okDKL0F3rvZQ= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.5 h1:o6/qcMBLZ4YAfoDnRsPwE/xeM3kAU0nnnGP9ZPy4kTs= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.5/go.mod h1:RUoiEWrOYweLJemA9hLIuCaaJSXFiZryzZqK/AA9DYs= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.2 h1:RJJSBxXt3gEcZiWUDzTl0sLtknsfzGj7GrpGtZ81bDI= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.2/go.mod h1:6TdW6zAw6JIlaGSgRb/kV6pX7k7JfxiqKbymr6qB7ko= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.1 h1:JMYpgsJ31l0wjJCerJtIBo39HznZJ/ENJJzOSTcJh68= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.1/go.mod h1:zqtpx8Y/EydPCFy5MA9AJJBfJ+mCQz8BNHj2CvDvaYA= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.5 h1:Et3l7Yne0ZoMiaDS0fbq75oe6PbTr7hA1N0YOuXkpjM= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.5/go.mod h1:IwqSdfgHrMtfVwW5FFv0xj9sq3HM6z06DD2e1kselpQ= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.4 h1:2N3W0bdr/SxLQDfUGi1SPIORcuRSZ6FKm6FWBqGDo9g= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.4/go.mod h1:Pwyp2lLtt5/LXi53uMbJ13TXEwo3VPyYnHGP6N3hZOk= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.7 h1:+YQlq7rUHLV7B2szK9NfGjAhjun+MLiBQkCRSra0LMk= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.7/go.mod h1:vqJ0MON1UMGvFB3A+2LIuvVGRHdU9BFA2IaCcLSZ7zg= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.5 h1:IFvx5VOZbggY1Bpd/dFkMs9H6YtzZ4rBdEnkRaWA9i8= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.32.5/go.mod h1:vNYxiEmvRccYA7JJHtH4L4FoOGMSRiOvrczqh2FgxZg= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.4 h1:+HtFvo99RMfpgJN2mh/hn67UOY65y5RNU0S2uy9T+VM= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.10.4/go.mod h1:6CwXuWejMnqXkWdf3uskATk0EQ+v23e2pvgEn1TdqPk= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.4 h1:Wutz+Xyb863LzHbqhHftHXeAvIC0wrwmBASQY6c9f/M= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.34.4/go.mod h1:6M1YeHkMmOWtutcNJpkQ6Pm2lTcJhk5HlxOAXmOGDRo= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.4 h1:9qMax0S94rKAHoAuF1NJrD+okFd1rtBwgtPzfBNuYyA= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.29.4/go.mod h1:Nbt0nq5uPu0ejS5anjrSI3tBkERY8SL8rhBBn8M32Is= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.4 h1:mHsv+CicazS3rB1bUNj/ffwKbjQiHdY3PiJYb8SXYyw= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.34.4/go.mod h1:ZqROoQ6lpqfswK4A7MP31WgIGZxNp2hclWYIutHSbG8= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.5 h1:N2pNKqg02mEXeD+IBkzBMusuD/hLBAXh9Lwtbrj4xJk= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.46.5/go.mod h1:Bz8cpvViXoCeAdnVq5Z/lx8aAdPFXrH/LVYAgtbUHOU= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.5 h1:evPerbXm4GHFvROmQx7WZkKpvaP4zV86avDtcNEUdnE= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.34.5/go.mod h1:klJRj93ROIhdBewNs4ELuTq4fpqLahtFxy9BdFSDhqs= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.5 h1:CCBfmIsF8sIHv1E9mn/GJPui/R3BW5IJ10TUH04hyDc= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.31.5/go.mod h1:ZvOQmePGGdpBFiLqccrxzge8ggjjtSa8qpxmf5p1duQ= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.5 h1:3nYmv9oWR0rrG2q9jDtikenvpSjX5/YUTfznhxsIPgc= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.33.5/go.mod h1:h2tMUR2y5anI0f4DkuVcBH8exNYTTZ8BrLVypoiv7+w= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.6 h1:/EOZnHaz44R8IUPqmvdmwrRGs3I3fRjEIR8pSlqz5cQ= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.57.6/go.mod h1:gOSEL+GyAVlcUMPbw8P7qBZknGEhp8ShMw6gizLngE0= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.5 h1:oBCJmk5ZtWKY7yevlVVpUNmUzGYA5XFNEf9TCB1h3Pk= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.40.5/go.mod h1:Ftk2FokqewDroksWg0P02kASc+uoYtqbV3oGgi3YQJM= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.4 h1:f3VPBDMuIEA76JDNRXQ823SXQ922L200q5va1o37lUU= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.47.4/go.mod h1:rKRZAKXwLgUZOdXrjHfB3ko1zYj8KoQK6bpXTpUjan8= +github.com/aws/aws-sdk-go-v2/service/configservice v1.58.1 h1:YjwT6oWNI0KJANny3bZpMMLg6hKZajPIkHbAJ8fgYkI= +github.com/aws/aws-sdk-go-v2/service/configservice v1.58.1/go.mod h1:TDu0is6KJd6igH/aLiMY3ePszwUUL9srFr4eOUHzLVs= +github.com/aws/aws-sdk-go-v2/service/connect v1.140.1 h1:0APQTulMHxW9co+fScETtA0qmdeuIfqCK28uWU6Lmak= +github.com/aws/aws-sdk-go-v2/service/connect v1.140.1/go.mod h1:zkPWvG+gvw5UGyP9Iu/6FPaFHiSX94f9Fhffw2kgcvY= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.5 h1:dO/ryGBzpxLh1028JG19CzZBZ7oHowbHjzVLhD0vZS4= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.5/go.mod h1:mk7Q8p+AcP4xjdwGmBQSdof1pM5PIm+H9BO8Q/uzCW4= +github.com/aws/aws-sdk-go-v2/service/controltower v1.26.5 h1:sbORD+4WSo4hvVdIpUbE4CU+RrsoqDCoqBkI7S7+hJM= +github.com/aws/aws-sdk-go-v2/service/controltower v1.26.5/go.mod h1:jgAoCJvvCNC/OOtzyIvl11BZPASz5ATSNCknbUonX+w= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.5 h1:RabBaEOLoAvWVdqDwQ2cW4PF8DwXMmgarl2c6iuVaEc= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.5/go.mod h1:xmuTn3EtMz3rL35w3iUzR1nmKuAlLT7SM8PftOkIugQ= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.1 h1:HLDIBVSZkgZUpulXq9qccFzuCNbRgw+Tw4P6fLN7BsQ= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.1/go.mod h1:7DTxZXKffJHHcbPp9+0sRwFcXj2KL0fGpqB6DduPLhE= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.5 h1:P4vBeJGUzeWHZpZdyMXVSiIDx+Zw5zTnL374tQsfhjk= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.5/go.mod h1:ylrE0RKseaqxY7ERcqvwwCzdK6pvD+LDNJZYpil5RhA= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.5 h1:HIe9Q4h2mBPI6AMk4pzEEEDjG8vAukh7U63H9jDbPFw= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.5/go.mod h1:Th5Y0G4TvOMYN6lyCVEYgsLDz059NJXdDqlUOaeYDuM= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.5 h1:6T/CR26/V53CC4VvAK3bJlD4ibeXOO6tbt+DA+U9yYQ= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.5/go.mod h1:mn/2X3QkGZ7JW7Tb3dMwPing2cTzkYGuhyKUJzVEX/Y= +github.com/aws/aws-sdk-go-v2/service/databrew v1.38.4 h1:JgImAlmECnFCkhvnH9TCd553pzNTIRfH2Ul4R+p3d8k= +github.com/aws/aws-sdk-go-v2/service/databrew v1.38.4/go.mod h1:mL62FXgGPTF/Q/hepi1Qxh3HXU8Q5yp0y1wIIWANiFo= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.5 h1:+yel2bZWZRuhBqKX8PWFfXwr2HlTOHgnHPwXE9beoQU= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.39.5/go.mod h1:2D4PoeboTeeNKZ479TsSjl3B1F2pcQ5+GkOCgAZnzrI= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.4 h1:9mkH/ONm9RWxi3Ixym6LL1kvV6vo8orYBxQWPp6oExc= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.30.4/go.mod h1:OlSaTD0J8/KjGDsM+DnPhHiJVBamykRGLsAAg8A/OcA= +github.com/aws/aws-sdk-go-v2/service/datasync v1.54.5 h1:8BsejEevu0F/XLzi1Hc2GyU9t2qHMBl7OacFpmi8Jc8= +github.com/aws/aws-sdk-go-v2/service/datasync v1.54.5/go.mod h1:F0aJUK0TTE5AQAyWj8Dv9COO0t6UMoAyMnFESeZ/O+Q= +github.com/aws/aws-sdk-go-v2/service/datazone v1.41.2 h1:KA+OaZ1boO6q/Da+1pO0t4sjt42K9/dL0qqXMRiZyr8= +github.com/aws/aws-sdk-go-v2/service/datazone v1.41.2/go.mod h1:759UsQUMGOf3cm1iz9vsL+Epj7Wlddq58sldKqtJCFQ= +github.com/aws/aws-sdk-go-v2/service/dax v1.28.5 h1:jXqWwWs49FSwlfdkiNXFT82ZVyTou3oRGnd2QdUqAQk= +github.com/aws/aws-sdk-go-v2/service/dax v1.28.5/go.mod h1:lowvEGtcFbTbtL639HA0sek1VtvMtoQsflFi0ttTy8c= +github.com/aws/aws-sdk-go-v2/service/detective v1.37.6 h1:VvwWzJpBk4sup+mSuzX7Vmm30sW3y64czrCGUES8JUE= +github.com/aws/aws-sdk-go-v2/service/detective v1.37.6/go.mod h1:jXwgyIaSOaRuri9AWmyMDU39dAMMJ61RZ+YblT2R/6w= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.5 h1:40nKr1dmfn9f0doUxmvgC76QPGJ2F/1Mwh0+BXQBd7A= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.35.5/go.mod h1:++N+f27/Ne2Slli6+Yd8xomkzODF/cewRZZcfLqYc54= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.5 h1:POEwKseaALiTsWq5+aSb+sNg8+HzKOkVpSUrBI7i7d4= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.39.5/go.mod h1:RvU+42eaaSBXjDf5Og9Pswu+Gft/0fqvrJpSWkSlv6E= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.5 h1:ZeG7A3l7aMJE4/nxr4f8JKkPpbmMvg5/5A8DBJ99Cdc= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.37.5/go.mod h1:SQFyOg6kGN9d8NENqgQ3zjdVX610JXzyt+uN446hkhg= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.4 h1:ZDouCjBOrNmXq+GCCwC1fhoOzBpXQ/Usx05SHVpskjI= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.37.4/go.mod h1:rEEFx+xIPrVlhzJXFJiu79o6N13mys3LUCtHvHIygVo= +github.com/aws/aws-sdk-go-v2/service/dlm v1.34.5 h1:INJ+fEUVw4LwKU86UQv5OFQLg7U7Df3IxXtWZ1HDDaI= +github.com/aws/aws-sdk-go-v2/service/dlm v1.34.5/go.mod h1:CofHoDNqn6ZWkAgE3QuCJdvylmgp+IWh7gRssUnNyV8= +github.com/aws/aws-sdk-go-v2/service/docdb v1.46.5 h1:m7u48GaFM9XvDdSJGwHaHA5cmnE4/ioVjIeP60iQMXc= +github.com/aws/aws-sdk-go-v2/service/docdb v1.46.5/go.mod h1:9IAjRrIMPh5LFnWo4S2r1ZN+xq7qgKkC6RW8abBN1Go= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.5 h1:6aD1/jZBwjstYgB2wGpnuIohUqspeRvRmh0RFe1MI9A= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.19.5/go.mod h1:stxVYTXiIoyTTq+Gd/e1tVbi8AwGuSqi3m+1Itn0pmc= +github.com/aws/aws-sdk-go-v2/service/drs v1.35.5 h1:9HJvlrlqXyVo/5xYtnz30U3f6MifAQQTe/h4J/5Uuvw= +github.com/aws/aws-sdk-go-v2/service/drs v1.35.5/go.mod h1:TGMcQ5H9FecvGjhZqT8ozXOAFO+6a8sSTyFCEZ1EJ7g= +github.com/aws/aws-sdk-go-v2/service/dsql v1.9.7 h1:rwSOOhEKZXWYAqtqGjvIdslUOdOnbTYGpn83HPXJoL0= +github.com/aws/aws-sdk-go-v2/service/dsql v1.9.7/go.mod h1:kkU1xXHdCh7alFRoZA1qZPbB41Yy/uAINV2K6D79UbQ= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.4 h1:3EE5TTeBHPTKQNNeIHdXcJ6ENDsN7c2rCQUtbdolwV8= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.4/go.mod h1:8rWv4Lq/jrlspgd/wpdFeKrxLByJlfpFEk9g0Tw5iOw= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.0 h1:fTLR6dLDTGChAjecRPlVrKeznT0rVdzR4yn9Z68MTGk= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.0/go.mod h1:V0jbRy1/IPapnkqgXSwVOFB+u5pnCwd9S+R3pKWULC4= +github.com/aws/aws-sdk-go-v2/service/ecr v1.50.4 h1:kPe1ZLqERYZxxDi6ysoX4oYavSJ6lkGaadsN1ogg3I8= +github.com/aws/aws-sdk-go-v2/service/ecr v1.50.4/go.mod h1:cAJR/1pLXISKFSSJsrsTZPw05PLL5xOIpbbzxM7GLiI= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.5 h1:98e3/QHaQ14WdBt3tZTFSyDGRh8BTVmGE6DICjN2iHo= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.37.5/go.mod h1:z8vly/P3m0RZ5CsZyKESSjcdmVvCjqKQUIfj5VwaLO0= +github.com/aws/aws-sdk-go-v2/service/ecs v1.64.1 h1:kAzHjjqQnu3ET5/cX1N5tKPqtExYk97wpD6MpRadq/A= +github.com/aws/aws-sdk-go-v2/service/ecs v1.64.1/go.mod h1:HIaZTpBD7+mgQEIv2wMzXYJw2T23sMFVNp2Mkw/ODFk= +github.com/aws/aws-sdk-go-v2/service/efs v1.40.6 h1:+Iry/PsJmm0m99bGpU00ubukGCG9G6N48Hqj5WMrvv4= +github.com/aws/aws-sdk-go-v2/service/efs v1.40.6/go.mod h1:6bFGewZgq0SC5QGUIBHl1BYZihIOi/ZPipEJMIBfbHs= +github.com/aws/aws-sdk-go-v2/service/eks v1.74.1 h1:/twnp/d6RQaccM/hEin33E5iYG0vLQY9DDRDleB6UGw= +github.com/aws/aws-sdk-go-v2/service/eks v1.74.1/go.mod h1:YfA/RHfplvaNVxukwg3e4KWJpsL7Ic7bfvCXhJnhbzQ= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.4 h1:9KuzJb9bUyMwNJyyh0pHfsTMR2OJZNtp9WTfcV2Vj3s= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.4/go.mod h1:2nKJzgK0+jae6diDJ7Fo9IyYkQMuE4U3LZotgLJZY3A= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.6 h1:NLE0iKGz29Oq45OQg+CkpaDP1BqftKmM74H/VX5HOkI= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.33.6/go.mod h1:+FEEAJlFxEGU5bYPE0/NhxMZGpMJ/TCmd7WicVc3Qhs= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.5 h1:3WQ2wo4l7zwu0IWzvbI5QVtzsN7+Eg42QR4D5qYkr2s= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.5/go.mod h1:7KZQYpEEZg47FYjzxWNz3Gc7xY0xYl0vGyXMltWplKE= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.5 h1:q7goP7oXfAvRlBxP7oMYlUzKUA8MpMpRkUxxmHEHNes= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.50.5/go.mod h1:BrvdV5vYXNjnsO5tM5CLWGkxj7pCa6E67wVVt+yXt1E= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.5 h1:HKdMcWFqzUlobL80o9WNMFNuOQsdE5xdf+qwQUUFco4= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.37.5/go.mod h1:ke8t2vaPfy1jzUrBCPaXSVww3uauW/VVd8CCzDxL16U= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.5 h1:Nc1bF38DmDyDwebbR7BgxxuIH1Yhl1EfPkPaKH0xQ1U= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.32.5/go.mod h1:9tF20YvxWfJ7WTYt5A45oqPUoLReFTjWITxDXnbAONA= +github.com/aws/aws-sdk-go-v2/service/emr v1.54.4 h1:ZC0c/fOSA9Yy/BXTGJlqv+QkvDgM7a/an0EhOmWAopY= +github.com/aws/aws-sdk-go-v2/service/emr v1.54.4/go.mod h1:yCZW7KzmSSuWxLKfLrrmriZxuE/rolBic2WsFZkfsIA= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.1 h1:fQQoDSorzE5J4jXsef/97ekcYODbvKaph3+rCzfnuZE= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.40.1/go.mod h1:QB1EyqZPQS8UKslM0as2eT3GXDkAgwTUQOR/iKzLI6k= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.5 h1:BobchIW2pMeagzST84A3ICzCZDwNjsYLopOKwsGioYE= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.36.5/go.mod h1:d5C/KgwOZXr7Mxf/ZymiwgwvutFEqQB9lMooWMp7Uww= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.4 h1:Qc0hIguje+lCQ78VSx70qVPG0nrajvWRbC5mkYc1W7Q= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.4/go.mod h1:bOMdhYMX+c/AQzi20lbWmO0U8hWRawDo9kNxvKutwSk= +github.com/aws/aws-sdk-go-v2/service/evidently v1.28.4 h1:iti9VdkeC7Z78qId7zw32Lo1RnsU9kjfJ8qSsIsWhCU= +github.com/aws/aws-sdk-go-v2/service/evidently v1.28.4/go.mod h1:cv8RDvuN+5Y2/qvtljWMR5grqefjkGhSivf/kot/IQY= +github.com/aws/aws-sdk-go-v2/service/evs v1.5.1 h1:Kvu09SgEie1SoW3MCGu7bsizpMZqFKrhZ0g2myl3MMQ= +github.com/aws/aws-sdk-go-v2/service/evs v1.5.1/go.mod h1:O7A46zFyZAePaEHIBWzpuxWBFAVxtaJkUDD/4FD2bG0= +github.com/aws/aws-sdk-go-v2/service/finspace v1.33.5 h1:SrudNTicBccapfNU3IKO1uW9A8WVRJH9h1pRI0hWt7Q= +github.com/aws/aws-sdk-go-v2/service/finspace v1.33.5/go.mod h1:BmK10iWdy5WqBV5G2hFIqqS8hszTg3gkdQQWK4Jw1s0= +github.com/aws/aws-sdk-go-v2/service/firehose v1.41.5 h1:Osa/8apMLAe2WY2yVaB8kTTPdrEfzXd13uKCJd7lt18= +github.com/aws/aws-sdk-go-v2/service/firehose v1.41.5/go.mod h1:K7ecJD6/1hejYb7lSc4JczwNS9leHGq9RMTLuyEg4ko= +github.com/aws/aws-sdk-go-v2/service/fis v1.37.4 h1:HmEC/I6kWPZ1gixODkajwr/M/vxZtjLT6o5z3mB2/5U= +github.com/aws/aws-sdk-go-v2/service/fis v1.37.4/go.mod h1:xqDZvBdIoE0FE35rljgotQyT/+I/Fvuc337dWyWApgk= +github.com/aws/aws-sdk-go-v2/service/fms v1.44.4 h1:rA6Q75idyG1SQYIUeTNYUQZ8oe3koEnqmceJRAuXDl8= +github.com/aws/aws-sdk-go-v2/service/fms v1.44.4/go.mod h1:Gy9MDI0yRrBenHa9Jzg1ud2u0ZI9yAThQTjX+0IamDg= +github.com/aws/aws-sdk-go-v2/service/fsx v1.61.5 h1:hIAuUn0uFjFnmg8WGncoEpyfxf7Y/t9eFhd8PpKnF18= +github.com/aws/aws-sdk-go-v2/service/fsx v1.61.5/go.mod h1:WO+0YogiUvQcY7FchHpdQ7vnBjNzl1v+rM34JpoSRaI= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.5 h1:dtYIF39DQ1IhFQBnDqGB1pes/UPfUjP0VgHoYMnX5Eg= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.46.5/go.mod h1:z2n/O9ruWRawdzCKHSwh0aFib/3q73aPYFXkoygmH7k= +github.com/aws/aws-sdk-go-v2/service/glacier v1.31.5 h1:SghWxcZVyI7Iu14jng5dColevrhl9sJGJWduQ/sD83w= +github.com/aws/aws-sdk-go-v2/service/glacier v1.31.5/go.mod h1:/CyArR40faf3oHIYTkXGqYOkSQ07i9/kJP8T1ghbgf0= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.5 h1:W2UcvAIYBFAkz7fsLLbRUIIyT0bT6L7aChxItt7Tes0= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.34.5/go.mod h1:O8zO9cNML7tuG38unyE/vO7z01stN90R4PKH/pPyw1o= +github.com/aws/aws-sdk-go-v2/service/glue v1.128.4 h1:kuB0Y0rBB8ktzMer1aAkRr97VcMOV3htrK5ozwk+IXY= +github.com/aws/aws-sdk-go-v2/service/glue v1.128.4/go.mod h1:hkEsN8mLtY+OlMapw83O6YPjKnBpV/Xrlaqk/HFmM1M= +github.com/aws/aws-sdk-go-v2/service/grafana v1.31.5 h1:p3uJu5V5c/o2PePeELynpedWi+zBv5HGyeJxhvuLqnQ= +github.com/aws/aws-sdk-go-v2/service/grafana v1.31.5/go.mod h1:kRsZsMlOY+IRQjl7ENV4zeJJeJVhUvNmnvGmDPaxovw= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.5 h1:8FCU0h/3dbf5ElK5wwbKNgt4tKPCIRIwmSjaY6sFeDI= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.32.5/go.mod h1:S8KznekVEeSHkKl+5NvxhSelRR5pT3MBsHXGfmMaKp8= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.5 h1:SlAT6W1uY0XW7s8x69OelXX2OWopTbCBqu/G98z1ikA= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.37.5/go.mod h1:Jccq9CeVAqBaeBppITbzWP/roisx1dj1fE0AmRhyJXg= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.1 h1:gjjiS2bSuqxmN3YZgyivU5bji7lhByp5x0yDNcCirbU= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.64.1/go.mod h1:N/9Md/EYVqAOUB93qUF+SAQKwNL3LCaeVF/Bf8Le4kY= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.4 h1:42woA14NMIht4st8dzBp8nJjlM7bRm6fEf2pIlUUUU8= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.35.4/go.mod h1:E0EosqrhvVN1kr4GTNPQ3S0B/+WJrzEjymQ7wI4ry6k= +github.com/aws/aws-sdk-go-v2/service/iam v1.47.6 h1:EWehQXACWr+6hzfZPwZChlfoVhiUCfLHE0Xh3kAfzWQ= +github.com/aws/aws-sdk-go-v2/service/iam v1.47.6/go.mod h1:qRXgEBWPIltrWHQwU+HkyBvwh1QgeigFcaCGCIVrWk0= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.5 h1:trORK1psQM+4hgsOt+Hm53bc/AABOl7nGTP7zQT4PzU= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.32.5/go.mod h1:yHjAOYH1Y+2Ne18ZyiRPETfmOuGovtZ7jKnieO4RPnw= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.1 h1:lfBxnqWxgeLoN7Nx48eoEPdwt+umHOvTM1SHLyexJ1U= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.47.1/go.mod h1:MyVok3M4Be3gH7wf1vu0hYAC91XR7XWkRvVaBfYAR/M= +github.com/aws/aws-sdk-go-v2/service/inspector v1.30.4 h1:jBy3o4eCas8qTF32sYjkVMDaPi5F91eRpyDaKE7Ldns= +github.com/aws/aws-sdk-go-v2/service/inspector v1.30.4/go.mod h1:BqgWCL5RDqMH9lO7CmPzOYH9I+F/WRus88PmRCBNBp4= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.5 h1:KTtccDNYtBmnJ00hz3pM8OndRMI+FTKZXs2KQ61xv80= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.44.5/go.mod h1:IhhaIu8jGcyQTTn7Yu8qJe9JeeH7l3ZGBVjduQEN7ho= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.7 h1:zmZ8qvtE9chfhBPuKB2aQFxW5F/rpwXUgmcVCgQzqRw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.7/go.mod h1:vVYfbpd2l+pKqlSIDIOgouxNsGu5il9uDp0ooWb0jys= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.7 h1:VN9u746Erhm6xnVSmaUd1Saxs1MVZVum6v2yPOqj8xQ= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.7/go.mod h1:j0BhJWTdVsYsllEfO0E8EXtLToU8U7QeA7Gztxrl/8g= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 h1:mLgc5QIgOy26qyh5bvW+nDoAppxgn3J2WV3m9ewq7+8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7/go.mod h1:wXb/eQnqt8mDQIQTTmcw58B5mYGxzLGZGK8PWNFZ0BA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.7 h1:u3VbDKUCWarWiU+aIUK4gjTr/wQFXV17y3hgNno9fcA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.7/go.mod h1:/OuMQwhSyRapYxq6ZNpPer8juGNrB4P5Oz8bZ2cgjQE= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.3 h1:v+M3A2R7TNmbVhw7wytXX9ctBvvnTv010rwFJcZNcs0= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.3/go.mod h1:EpmzQeMyCRDtBImp/K8sRrW16WZUUlRNwNPFe9sEs6U= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.6 h1:VNUsqkO+szznLLFD52B/2SZ48L3jbZQH0ofpc71sC9w= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.6/go.mod h1:DSynFACIuJ1cnaaEX6tPX7qqrfQg1ZyQ32w+u0d89oA= -github.com/aws/aws-sdk-go-v2/service/iot v1.69.3 h1:o19grvwrTdqhYCpajI8OxAlNVR5dOqvM14oVSVK8PzI= -github.com/aws/aws-sdk-go-v2/service/iot v1.69.3/go.mod h1:WsuAKoDHNY6zWTyNZ2/JSHfxOfvDiXo4ubuXMJYgxHk= -github.com/aws/aws-sdk-go-v2/service/ivs v1.47.4 h1:xDy3gXOGhNAxDW3WQWKocY5+48cS7cLPmiFd8yWBmZQ= -github.com/aws/aws-sdk-go-v2/service/ivs v1.47.4/go.mod h1:DtvaoBrJNJvhMuvF9WUr7mO12aYHpKtoCh9Cc7I88IU= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.3 h1:LSpJln8/THTOxbnQw2YISj2++4s2oWLIC7eQ2sCwRi0= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.3/go.mod h1:ppZDSvVcyUaB2VTGhFt8WzGknMFBHvVEfzJtA4E3QDM= -github.com/aws/aws-sdk-go-v2/service/kafka v1.43.4 h1:SbVDfvwIpB3c3FWTDw8VnGatPxVEn3HjOiR6y3iUY9M= -github.com/aws/aws-sdk-go-v2/service/kafka v1.43.4/go.mod h1:nQ7kmni4yUHB1Ax8GCjeQ2myyBOBxmh1XuElflbI0tA= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.3 h1:CF89p3rDUgZy4wI+1l2naDAwjae62ZkF98Q5gy3FZ80= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.3/go.mod h1:bmMKA1Y2O17TwKGE/R3dWejg/V2phqFdJPlpLCQ60k8= -github.com/aws/aws-sdk-go-v2/service/kendra v1.60.4 h1:5GheR8I6Qb4Oa8ipPBTVes6rLMJ4gpTcbg2hoXFa4+Q= -github.com/aws/aws-sdk-go-v2/service/kendra v1.60.4/go.mod h1:gX8HtkI85+T9s7z+q6w+573klD0kC8qcrm222lRCok8= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.4 h1:Rok4GMqmZ3wyP4ubfM5a1ia3cGuUKzNMjW9HfNWPyEs= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.4/go.mod h1:M96RNHHtJNKYkVbFEc42Fi+4CkLC6YddWHgw5KpDfM0= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.3 h1:AoRNFVaU2jdjK7/U54bUHi4ebqCyylITnTYunhJR/FM= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.3/go.mod h1:4b0kNfWNrJ2hhTYU4/AVC4VZ3C2EdxFIk91hrW4I+k8= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.4 h1:JhFlkXPYduCLdZlgKcImnTxpVoC6sfIruCx6RbXHO6w= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.4/go.mod h1:NXGXhtu34BjQ5jWxt07Rx6ohjbnTw10mJ6p+hP7Auvw= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.5 h1:vdO631vuDYqochDF84nI9PchF0SU5mc8d/SASKlV3H0= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.5/go.mod h1:OzhZi7OpEyaniPOiAiM4pcL5LmQD27//6tlKJQ+MJdU= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.3 h1:lpi4DqhhfZJu8NfbMqwX2boeMvkFKu6xAgkkJvqwClU= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.3/go.mod h1:MgPt51mNcd1Mkr3QvnHg0CS+l1ppJREra0Al+eEiXY0= -github.com/aws/aws-sdk-go-v2/service/kms v1.45.3 h1:hp7qDEQkW3IwV5eaTy2inECTgRHo0o/vgIVxq+ydNiU= -github.com/aws/aws-sdk-go-v2/service/kms v1.45.3/go.mod h1:EADaLXofJkof++MP9zhzSZ0byBMOZTIRjtJO/ZMuPVE= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.3 h1:5En5SduZgfy7CMqJrrwqhsydJNn2Il+v+149eaR/czU= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.3/go.mod h1:6rMPymXCx3++UxDcNSYlGj/UqJZZ7V5RMCBGw1qubws= -github.com/aws/aws-sdk-go-v2/service/lambda v1.77.4 h1:jUPCc+cetLIJK/YJnuLou24IjY5vIpt+8pwOgX2n6eI= -github.com/aws/aws-sdk-go-v2/service/lambda v1.77.4/go.mod h1:uCclLX4a0dWB1ZToNE4ZhC9R1gQTWP+0uN6uxWftB1o= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.4 h1:HhwP4DuLp2bgrEIjOt4XF0Y8YeOaMaPcQZzs4eX+xBw= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.4/go.mod h1:lsDYhMs9sGvYXgKKT9b42o4hDKjeFLCCUa6in0trELQ= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.3 h1:f9RSnGMIyc+WyBMJsrly9mVxb5Up0Jz8PzptVYJvAcs= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.3/go.mod h1:171yAFRSu2K4YKivdeSuAwBoOls+TVM2dIBpBupv4zY= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.4 h1:K297CdV2flRnCUNuxfXbomdBULprxHfCbnVp7r9Sa/M= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.4/go.mod h1:otunm0ffELOmfzAU963x83T50hvwlFtXg/auheggHJo= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.4 h1:mRg6eaBhdPScsiNhZx+v13yhR85l+ekqGq2x+D4ge8g= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.4/go.mod h1:mIBfCC5hqV38YL6U6ycbPQwnP3uj3c4mIaF8ul1ImW4= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.4 h1:rJjEP5CSJw3Xsoe5Lvhbvr5P8q+rdt8/5IL2MDCc5n0= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.4/go.mod h1:O5Ew7rQ2iERj/HtA0AxBWymP0UVcG4iuMoIQzbRhcZU= -github.com/aws/aws-sdk-go-v2/service/location v1.49.4 h1:0t8gadZLdquTVjABf62XpZ8yW5oMj6oRWmmc8OQUktI= -github.com/aws/aws-sdk-go-v2/service/location v1.49.4/go.mod h1:EV0qekjOMdno6fSieFV0MHFmoKri3Mbuax62BDPK9Gs= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.4 h1:8RKWBINRxIMnPvlLQer6GmoD8kxEwRaodsEVxiZRDt0= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.4/go.mod h1:pXoUqkAGeHjluc720BlxTdi+58Ma718i6rsyptmifa4= -github.com/aws/aws-sdk-go-v2/service/m2 v1.25.4 h1:KswHF/oPvDYmumr9vj3d1jwfFDZCKPh7vI/OiLrYzRM= -github.com/aws/aws-sdk-go-v2/service/m2 v1.25.4/go.mod h1:p+b+yn/pIYO6RDpigWEPw4pdLUeaQyu1XNu1MfTLJrY= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.4 h1:1ExmmTFrP7UgFHOoNEiSrqWH7Yr52+VtAhxmbSyKKEA= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.4/go.mod h1:zV6j52ML5ASJWBs+87lGFcW96tNNwu/cQymiE9ex5lo= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.4 h1:c4LeHvhTAYsO8md5in7QrPUFpGqOXFYdRTxBULlOE74= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.4/go.mod h1:1bIbSQ+gsTKdBcHkmxoft9hxDy7bip7gWHB6zdJ6VWo= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.4 h1:88tdsQqAz0hhrCo4jVxjrTSB9eoNtRLRW1FyfLUCDB0= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.4/go.mod h1:KRt+IAhw3rjGeBZdOJMaKzV8dcRH0FjidiANtilzjVE= -github.com/aws/aws-sdk-go-v2/service/medialive v1.83.0 h1:rufgl2SNcJduX2er681q1KOXe1nB8WsvB0MNxDV7Nm4= -github.com/aws/aws-sdk-go-v2/service/medialive v1.83.0/go.mod h1:sslxx162DAlYmkfvajs1wCLhZMVJ9Egd7ZH9EeaDEms= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.4 h1:1vRJmRaj700hsd9p+gXRrbSu13xheA5YPkpVALYNC7U= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.4/go.mod h1:uVi/2YwWZnWEhlPG3Y0eYrE3rljwGYvFGddE9SvYC48= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.1 h1:GJPo1aJDfnKPRcdsw9zOCY0zsoA8bN0jRJYADGzUfTo= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.1/go.mod h1:ZF/rFGHoMQ+5LDdQU+sCR2Mq5Mtii2kDfmPbDpcXCbw= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.4 h1:vDkjDkQM5EpRWQeOz1PKi1TpcdtmFjcLJxLPAjxjmg8= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.4/go.mod h1:hMHrZjV9ZTsskcYRCwrd2pHs9ToNfAb1TezdX5t0HO4= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.4 h1:Ighjb/ZyKkpHgkbNJsV1g794OaYOMkZ0joAUbXEAL+M= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.4/go.mod h1:2MC38vgXki1cSD22Ihc0EMYRxURUpQ0rqEy+g+6OMgU= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.4 h1:MUW9N/0Y/Wkl4Jt5l9xDWB+nZjaEUwUm56ViraOiBks= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.4/go.mod h1:xTkekmoJ/62dew9BDNBsl3DPrDZh4eOZtxiJsi+ocas= -github.com/aws/aws-sdk-go-v2/service/mgn v1.37.3 h1:vkmwiUCG5x9JH4tyrrsFQFspXTGnIpZpUo7kPt2A3Ak= -github.com/aws/aws-sdk-go-v2/service/mgn v1.37.3/go.mod h1:gBTV3R+Zq9V0oxeqNTaJGjbmiCe+G8czSZQOzgdI1KY= -github.com/aws/aws-sdk-go-v2/service/mq v1.34.2 h1:I16KUtaBYENTDjorLAxJRCjVqax9O323KlVCqwLMKM8= -github.com/aws/aws-sdk-go-v2/service/mq v1.34.2/go.mod h1:RuIswi2hpR2gabSzQBuK4om45lb3Qebj1IO8JBtyz48= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.4 h1:O11wfyGLkKU6lFrVF2qbikVyqJ22MiEVtFhbRc3ndzE= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.4/go.mod h1:fXZkNcG4+GDd+Y4IPI7lBFKSteUCHRYJl6uJLXeM0eU= -github.com/aws/aws-sdk-go-v2/service/neptune v1.42.2 h1:CM7nhsuvZf0mCv6TMqG5tzKUQb3x/tW99jnEpDchtbQ= -github.com/aws/aws-sdk-go-v2/service/neptune v1.42.2/go.mod h1:88XuulV9AwKNmG/7hAyByJoWghbrch+qltar7syXoG4= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.3 h1:jrJGbbokc3KIB6IzSB/JJuQOwWHqdWmZpkEEl/Zmyf0= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.3/go.mod h1:wmNqMkTjyx6wPaHH0SiSCCg812AzFJ9QFnfHCMvraxs= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.0 h1:ddZd2siH+HpBu1T9QKFXVX/mL9qe13xWeRrkPz5Ddwk= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.0/go.mod h1:6x2e0M/7Z9XzPqgOvTZcwCNbjN761VJbIui3Zx0pEXs= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.5 h1:e/d9+n5bKYXCR6A6xuqWoFVsDEm5FNJh526rS1sXyC4= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.5/go.mod h1:tt09THrgGMdWj38DuEy5rakTOgHaA/G4V3o6f/ChiTo= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.4 h1:idjLJX03bHXAly/JajH7FDi1LnTjm+vz1Bm74l3+5jo= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.4/go.mod h1:f/madZysMOG6Yf418461uIO5SpLyI264ppfbFH+p/kY= -github.com/aws/aws-sdk-go-v2/service/notifications v1.7.2 h1:+zM/r3nG0slry9af+m0jgaiFJJvinNHSXj2uOVZNMdo= -github.com/aws/aws-sdk-go-v2/service/notifications v1.7.2/go.mod h1:z0eB/DYXOhMK7y8fUuIVUBcPm1WaTAZB9jynJCW670U= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.6 h1:iGhPRaXDmVgFkoJp/VPZqxN7gx8mXqiOJsW0aDKKQpU= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.6/go.mod h1:exwHzGIoNxvOYtJjeYaxEW5F+ezLmzbDh/0CNrwhVXI= -github.com/aws/aws-sdk-go-v2/service/oam v1.22.3 h1:DCKlfaaVB7mE7dtfGD60gWX1Y5nc+yh8qcBHvpdkRqs= -github.com/aws/aws-sdk-go-v2/service/oam v1.22.3/go.mod h1:uSLwrlkn0YO7P4xzMy4yJDgyyi6BYzZA73D0iv5gPpo= -github.com/aws/aws-sdk-go-v2/service/odb v1.4.4 h1:e72yFD4IgA7oHv5VPwnpT7vsiPUdxUw7tMky2k+LBE8= -github.com/aws/aws-sdk-go-v2/service/odb v1.4.4/go.mod h1:88VYy48//R1g2YQndZDbcVPp0buXwvPljHLOhoiuPKk= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.3 h1:lHnod6e9i7gBkixiA3Wqoj3hX3a/NQELZl1/yPpPXpE= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.3/go.mod h1:Lnd0WvqAJxXC/qWrB5dFEEZ0q/GMC3WgPBVZEjWWxfM= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 h1:7d4lqzz/V3uC/AkHGwIPHvh1SBXkvM+eJlV+nb3pi2o= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2/go.mod h1:sAaa0p7rtN50HBxl1LEGGaHJ+w3dXd43V+wqRf/Wlfk= -github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 h1:j5Cyl8uJi7rF8FczVWWVI0A7WQgqN+ED2OSRe5IZCec= -github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1/go.mod h1:ot0vk4sn+d7lY8g6oI91XE41Vz74ZNnTH+7UrsIsJVg= -github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 h1:8A0pne1+ZhifID091uJXKN3GTgXP2QlGw7m6qflEBmU= -github.com/aws/aws-sdk-go-v2/service/osis v1.20.0/go.mod h1:jTMFR2G2mZQYlH6xqPMMq/FrYk6gPdx4kMB2SSLRy9c= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 h1:IJ1eYLAMYOWT6jr3nPGG2JVtcvURLXjLUj2OeMhFEGU= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5/go.mod h1:oEwTEYL6jq3k0aYlGr811o291esaRs5vgUyx7Iw0oIM= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 h1:Xa+1EAhqSQXNmGBsIanfy8tNo85XdhUk4TRi6uxMaJw= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0/go.mod h1:oTU8PgBAPmgXqcGNysGtsvHSVaB1t70POQWzrvvzekM= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 h1:fSfw+4bF7B23fCjB63HZOVsJmAYMz3SIcCK28B6kvPk= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4/go.mod h1:niQNNLiBhOtmIZdsx+ysgpmltLaENic1qZC0l+eMDyY= -github.com/aws/aws-sdk-go-v2/service/pcs v1.13.0 h1:SPpe4DXZI8Vvqzt+uDS/FwesOLlj2t0Ht4s+5ZteWaM= -github.com/aws/aws-sdk-go-v2/service/pcs v1.13.0/go.mod h1:cSG0ngVM0DDPX0ETny4wHuT8pNvmYNd4pGEAS7DpMfc= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.4 h1:qMVA3qezunrP0ZIvF75T8ktwA20HBXlBsHwR1U0A0H8= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.4/go.mod h1:+JWai1T8zNQiXaPy5fVSKClFUnVMU6YbWxl9yaNkuJs= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.3 h1:yQLjzkSYNfTFg0W03zmAvhykcAVCIoupphhKb9LKbWY= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.3/go.mod h1:SaGkr4WogIn/vf0sj6Ua2W7VJxzLq5G8FrIUrEwPm0M= -github.com/aws/aws-sdk-go-v2/service/pipes v1.23.3 h1:39TMmOdMKH69U8Srk6BFgH/yOyl8vAJc81ArWTAVXNE= -github.com/aws/aws-sdk-go-v2/service/pipes v1.23.3/go.mod h1:uR15p7dUhavBllTbAoskEdh/py47zVqD6j1S4VlSH7c= -github.com/aws/aws-sdk-go-v2/service/polly v1.53.4 h1:1EFYY1zW80E/1CdoEdKkRjq0F/3V9Q5KRh8eWbf4FQU= -github.com/aws/aws-sdk-go-v2/service/polly v1.53.4/go.mod h1:zFmbFlqzPOmhtFWL2wq9Ld5U+7ub3OTPKb6vJEo4VTM= -github.com/aws/aws-sdk-go-v2/service/pricing v1.39.4 h1:FLRgwQXpnb+NWOAg1oP0VD0wM+q7OWJRssKyDsbrIEo= -github.com/aws/aws-sdk-go-v2/service/pricing v1.39.4/go.mod h1:EWTrh/FVF3sDmcK5tKy1ETFPn6VX2nfLy5gDTsCy2+s= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.4 h1:TQ0TJxq5Ke7E5bPP8fEBsvqqgacjQA6xa/kS/Js6Jpc= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.4/go.mod h1:qc2aOP01g+JGeH+49eopeEuXlGIGN8jHF8pBmUkI9gA= -github.com/aws/aws-sdk-go-v2/service/qldb v1.30.4 h1:ezX6I8vkNJDSYWH6Fxs3HZif3vCXXm1d8lg9BjhSdic= -github.com/aws/aws-sdk-go-v2/service/qldb v1.30.4/go.mod h1:YFfh8o2ao94xoukSHq4+VyS1d80dCNy1I7d1dWIJZMs= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.0 h1:15uL9RzToUifJuMkW6ONnWioTETxryUbgMBIOQ5D1rA= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.0/go.mod h1:y6RX8GTCi2DI7lOyw//2ePenD4X6DYLt38VL1YbLXpU= -github.com/aws/aws-sdk-go-v2/service/ram v1.34.4 h1:TCaXm9jWgdARQXQg5geTepn5/v6Iqn6d4JkAmODNpbc= -github.com/aws/aws-sdk-go-v2/service/ram v1.34.4/go.mod h1:AsP8whp7pNZFVwNpxUMhQbR81Fmb+8SywIa5OfjUlRM= -github.com/aws/aws-sdk-go-v2/service/rbin v1.26.4 h1:NDgqGmtlBkSNxDzbYFLfPnCq91kyr1kkf9Wa68Im9MQ= -github.com/aws/aws-sdk-go-v2/service/rbin v1.26.4/go.mod h1:KHNVBn5Axg/mdA/Fl7uQB9VMQccunTxYdSjkvJuNLQQ= -github.com/aws/aws-sdk-go-v2/service/rds v1.107.0 h1:PcG+YEp/ADK4JBq21G2I/PYlsq6wuDvUQqw2YEtECU8= -github.com/aws/aws-sdk-go-v2/service/rds v1.107.0/go.mod h1:EVYMTmrAQr0LbGPy3FxHJHvPcP8x6byBwFJ9fUZKU3Q= -github.com/aws/aws-sdk-go-v2/service/redshift v1.58.3 h1:rXoN3hvwUimq8Z6uu2lsYncGPDQS+i70Rp1G0c0C/zk= -github.com/aws/aws-sdk-go-v2/service/redshift v1.58.3/go.mod h1:OfB6wMvsEozZQbEjgqe6J68wF5u7wXNEAdG4FLKLk/Y= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.4 h1:egzZblPqPYLXClImxh6zL0kVt+aINhKMtj0Dlzt6LgM= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.4/go.mod h1:Jb2pR/0IhKbpPmetMChm8rxQDk2MLmb9ZNSDZlsGB4g= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.6 h1:cb/WGaO0yn9eyOQf0ekFEZdk0LlvOaIBW6ayZk4n/hM= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.6/go.mod h1:X10Ql/ih4yUJl87EKfnrX8iC9zfn2VFgVMCeWqGlOjI= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.3 h1:1440u1Pza3HtYqsUiofmOYUB/i4fwLXRgvG9c37wz8w= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.3/go.mod h1:TDGlJxUrttcw4osr2qAj2KKn2tQf2AwaqjcXKxSaM5U= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.4 h1:50EjSzYo2Zl1WRSRtNTNqH0inalyK5xzGjzNsxoP/Qw= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.4/go.mod h1:P/9XHmSvStom3E+8lIheJkBNqNkPBBK3pHBqzybn48s= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.4 h1:GWT+w34GEzacg4VLVFOAJrBMgWZqKSMe2LQqvjA5I64= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.4/go.mod h1:3WHDQPDWkMNWmQtho56OWCTw3q0JH0rxHT77Ir/qMyU= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.5 h1:2TQhiZYYw3PG/ZuX4m/ge6knQxHIWdJjnMRJASe9u+8= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.5/go.mod h1:5f2WgJnsuOpjWuycQwg93EMfEIljLN/urNxnFTrpvaU= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.4 h1:LmoqYCi723i8jvkALGA7E+1GeaOc2OHZNLdkwp7cjZA= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.4/go.mod h1:KV1rGdzLiPDfq5EId56EPFzKL5f3FQ8vB4kN/RkkVC4= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.4 h1:LGXwwMDiIEAoUtzqVAqh96G6sFQ7bybZ/2sYGMiTYoc= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.4/go.mod h1:rvU558bgt8FdrptMtRIuvYGGkaFsjnbHhN+MgKRjVGc= -github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2 h1:uqxTxY0i8b1ZFHxIf6pZYpUCOuYV/xxcgTv0vDz8Iig= -github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2/go.mod h1:py/7C8W37SHqyHk6tkvZKiFDvMA/WkfPv5Qd8dUXYQw= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.2 h1:YT611m4CLcfXC6/qJxAk5AWWiFr4Ojt794aTk4a+HUA= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.2/go.mod h1:VaHlCP2omJqU49RN4huDRy9IkwxdrKkdEojKuRt3tn0= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.4 h1:xSBL13ZwehSHGJf8hjCMDj4s4OTrSLl79LBbVpFv3Kc= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.4/go.mod h1:m47qERwRjRAO5eIperT+g+9Yry9ugqGGoVbrWdm7uOI= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.5 h1:1xhgFCZOCiGCKfz9FmPc9mVLotoY2UVfA247qQeCQnc= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.5/go.mod h1:8TB1F5Qui8ZgO2Zlg9H23LnoQ5+SU5i4vXlp15WjDH0= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.4 h1:1/zOH9q49LFP84tXlP2eyNmFK/wM+F5241kWWujDn4A= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.4/go.mod h1:kyAP4Dyjtlgj16fsRVi8sE8cpTnSl/BLFOBFTpoR3dw= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.4 h1:v3OoF8GxebOBR1XEW4FEvuFQwDUxiG8S/XxfYtB6fVI= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.4/go.mod h1:EON/gLcVKy0Q4B2SjVU442WEO18U4Nr3wbmm511ge2E= -github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 h1:5kyaUvSPlD4a9c788wy5uUxEnn3AKviElMtSYh7mFKE= -github.com/aws/aws-sdk-go-v2/service/rum v1.28.5/go.mod h1:/GaTIfsZbDtYuom89etFZvu+Pfoct6mMU786iQk98RM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 h1:+RpGuaQ72qnU83qBKVwxkznewEdAGhIWo/PQCmkhhog= -github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1/go.mod h1:xajPTguLoeQMAOE44AAP2RQoUhF8ey1g5IFHARv71po= -github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 h1:D9WB9VxwSlT4Xj00VDORofAteKEBdV4vZ85k4X61xyk= -github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0/go.mod h1:AVQJ22NtzirbX3shogiVLeEuEsYaPEpXSel/GD8ALF8= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 h1:GD28/y7URKoEGUS0OLSxnVl/j7zd7njJHzvKAKBuvA8= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4/go.mod h1:4KJY0ZwVCZFKfQBU3w7kgNG8LzLfcj/0G58soNebaec= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 h1:EdifhWi+JJJxF3cNWeam8camVWASGJrWl89ewbUvqhM= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3/go.mod h1:uJ2LFMOgDhfLRh8vGhPSvsMR1eY0MBATt0ixY8FTtAw= -github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.6 h1:iUPmajNNwGUNByohjkfZIHDh5OtS7uWYevZ2xpdPCs4= -github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.6/go.mod h1:bAwVCwfk1JMqw22owv6SahhVJvwWawKHyZVyZTbm6B0= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1 h1:KKqYw88o9dAaD4Cr36kw6lzy/ZIGKlF6x1uK2ufqvJs= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1/go.mod h1:fKQyhwdNeHKwwLhdvxw31qUtK+rYr8i/8e9wA8eHa+A= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.3 h1:it6H2TgSLlwa0RAR5Mb0f2HrrJDbCYAoIpmZHXp+5do= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.3/go.mod h1:z2FWXQLqZxk0JJWNDacAQQFIdpcaqcjCytbapGhsGlM= -github.com/aws/aws-sdk-go-v2/service/schemas v1.33.3 h1:imDQ/7RtFfGZssclTJRJq0QADHBHAbI6kW/SYd3qE6Q= -github.com/aws/aws-sdk-go-v2/service/schemas v1.33.3/go.mod h1:o11VZdyu0AgDlJ4+45ziQ3RkMcz817vxYCHWfrG4q2A= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.4 h1:zWISPZre5hQb3mDMCEl6uni9rJ8K2cmvp64EXF7FXkk= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.4/go.mod h1:GrB/4Cn7N41psUAycqnwGDzT7qYJdUm+VnEZpyZAG4I= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.2 h1:NjP7tNKnUnaQDKQpbSytFXbz1mNdHOPxOvJNu8kdJog= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.2/go.mod h1:/yFqGxCC/m8z1L0WjTEV3X1Ml2w612hMetWFrPJrRvA= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.4 h1:CtJyph+31QRGcBa9Z6AZKx0uNdLpoMK+jQeIxaGqqdM= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.4/go.mod h1:/Okrv6oh8a+j7ZTr5Arh843M0FFxwFjTKnW/kE/lkM4= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.4 h1:Mf9vV6JHwq7RMHeX6IUxyARZSCRrLKZAMDIbeQJBg18= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.4/go.mod h1:Fo3qCHv5pY+HbAouapwroSU5JkKBWrqYcaZYZdzT1NY= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.4 h1:ToxRxnVNC+UMHc6JYX/LtVywHtPFAgnFXFbP2OXEmwU= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.4/go.mod h1:iHaKyrKZWhjGdQ+h7SUuy6te+nI8iyctSY1iWvF3OxU= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.4 h1:cqQhPQGmTOmMgMMmp4SZh0X1DxQhtWKMVqOM6VhDeiE= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.4/go.mod h1:RLu3GzzFOWKqSQ7qV7A552pJA4x8VTPwobt4ALAIwc8= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.7 h1:18YXcNXXEZ9kcHUkXP351Am/VxZtIJFSXPWY/JPbXrE= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.7/go.mod h1:DG2IU+u5lxfU4N/UI0oviGcFBwcQat/b+pGEbGwGeWY= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.3 h1:v+COFz9X0cbchDgyLpkteKIeGRYoMPgmqfPvJkIv6tY= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.3/go.mod h1:spOhDlIdJOt54qozrlq8UGLpUcX3Uwrs7dy7CrF/Imk= -github.com/aws/aws-sdk-go-v2/service/ses v1.34.3 h1:pqqG8002es1CoJdDa0iIMITLoEAgMv0d5Pznnmo90i8= -github.com/aws/aws-sdk-go-v2/service/ses v1.34.3/go.mod h1:0nxuY5ZFo90mPGqqCjeDFa1luIcjWLkr8vZfa7qZ53U= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.3 h1:Ln5b+2lKA/amSuuKqjkEtL7hz1woblO14OfQ8dmB0J0= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.3/go.mod h1:2Esboo6CABuhrL3SXNweOPeEC7OvhZvEhZhLw3uaCRA= -github.com/aws/aws-sdk-go-v2/service/sfn v1.39.4 h1:/UOPu+KSWWd6x7rIUSCmu8l2tnmTrrdwhe+77JzRPXA= -github.com/aws/aws-sdk-go-v2/service/sfn v1.39.4/go.mod h1:l/gPrFPuKAwI0CVumrRq5syQ9fKswotmji2dGka36ZQ= -github.com/aws/aws-sdk-go-v2/service/shield v1.34.4 h1:bsm64pDIz5N1TRqftK218TXsWWf3GxP2CDIvar8SPQw= -github.com/aws/aws-sdk-go-v2/service/shield v1.34.4/go.mod h1:R4lwN/HQdCUYW57V0aOOxlayc65/07rGydQ+frndPmU= -github.com/aws/aws-sdk-go-v2/service/signer v1.31.4 h1:dX2NzZmdQQuCUQ1gPnrcad6xNlE4tIId1ftXVj8kN70= -github.com/aws/aws-sdk-go-v2/service/signer v1.31.4/go.mod h1:DjrlOQ7vINGoemyAXwovy//giBjLUbWencjjp4X1v80= -github.com/aws/aws-sdk-go-v2/service/sns v1.38.3 h1:4T0EjsLqUANqnBWafst2+Nr3Uw44MPdrPgysNbxDqBs= -github.com/aws/aws-sdk-go-v2/service/sns v1.38.3/go.mod h1:kHMCS+JDWKuKSDP9J/v3dlV2S9zNBKbXzaLy/kHSdEE= -github.com/aws/aws-sdk-go-v2/service/sqs v1.42.6 h1:TxOBDZKQGhO2Q2Z3HiaqXjw582f6IFue+z9sM/RgXkk= -github.com/aws/aws-sdk-go-v2/service/sqs v1.42.6/go.mod h1:wCAPjT7bNg5+4HSNefwNEC2hM3d+NSD5w5DU/8jrPrI= -github.com/aws/aws-sdk-go-v2/service/ssm v1.64.4 h1:GaIjQJwGv06w4/vdgYDpkbuNJ2sX7ROHD3/J4YWRvpA= -github.com/aws/aws-sdk-go-v2/service/ssm v1.64.4/go.mod h1:5O20AzpAiVXhRhrJd5Tv9vh1gA5+iYHqAMVc+6t4q7g= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.6 h1:Tpm/fpaqiA2+70esCG+ZURVZiQ05V2+GBQPvFrwnFI8= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.6/go.mod h1:0wE83jsojPt3FEktE7dNeT0MDYbB5faa0THNVEotmAc= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.3 h1:8s1MuIH1Zinwe64qbt6ekR3mPK+RYUY3+qBQbhX9iV0= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.3/go.mod h1:cGRkPMFQDxRL0n62dql49CTDfFWFEP15BVZCZianPXQ= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.4 h1:VFWAEcHK1Ci9FpBMzsD+sKAxQRFSV9Mq4uvzXyNLSL4= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.4/go.mod h1:cRGxg1wGs1iDhAbCrw+48EK+O2R3izDN5ysTmrwbo3o= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.3 h1:+3Y7HSw3r6w5C5hpthlykvHcAyQeQGpSk6Q+m4X5Ezc= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.3/go.mod h1:0MqV2PKowmF9iRBs6Ih8b57YLZzeP+njutpY5ziCFKw= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 h1:7PKX3VYsZ8LUWceVRuv0+PU+E7OtQb1lgmi5vmUE9CM= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.3/go.mod h1:Ql6jE9kyyWI5JHn+61UT/Y5Z0oyVJGmgmJbZD5g4unY= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.35.4 h1:72Upm349w28OYUiynjP7pIyzWYjDLpT0YQMGGyq/Wzg= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.35.4/go.mod h1:rHOWsPdb3a76utx/DCpC05mhxvhIOVqOWGFuBxqKjhc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5 h1:gBBZmSuIySGqDLtXdZiYpwyzbJKXQD2jjT0oDY6ywbo= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5/go.mod h1:XclEty74bsGBCr1s0VSaA11hQ4ZidK4viWK7rRfO88I= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.4 h1:Gh7vhnzighFyKJJcdYiYRjxKO0Nlofu9VpaGp+ZgKvQ= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.4/go.mod h1:jEoHxll7uwZM3zuOsnYLDLrwgqrSVPVajshyBwWac7Q= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.4 h1:PR00NXRYgY4FWHqOGx3fC3lhVKjsp1GdloDv2ynMSd8= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.4/go.mod h1:Z+Gd23v97pX9zK97+tX4ppAgqCt3Z2dIXB02CtBncK8= -github.com/aws/aws-sdk-go-v2/service/swf v1.32.3 h1:tL0fQyve3dknUaaWBeAvqRe2mb9AjaSfw/6ynBhIx3A= -github.com/aws/aws-sdk-go-v2/service/swf v1.32.3/go.mod h1:k2CTS1J6Jan+aujLBPmkfklnxS4hThnsxaX0mAmyqko= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.4 h1:/25TExlOUQ+ujvARatWJq6vn8JBHSGx50HhkZQQO3R0= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.4/go.mod h1:JRvZN5iCGfh5MIm67cR/z0LQw2p6EA6wB6UHcpqqtiw= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.4 h1:/yeQDqRM0QY715QgXA6WZaW5VqTK6uw04Hq+M1w4l0w= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.4/go.mod h1:UpjPLGY4914sA/+KKlRaxrbNt40sP19I+WBWdBDDOXI= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.4 h1:XRb8NiG+6sz3tApwcIFzZiu2TJeRV318W3qdRhhggiY= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.4/go.mod h1:Rk5mMcObqqP6PUQDg4+JX3wq3EhwL2D+yyX3oisK9Xo= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.3 h1:gtt7zDM6ZlB0xciw21A+vbl/A4myL/NK6am2y0Pl1kE= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.3/go.mod h1:aSaZ8uAKSKAffxazXGUa/htcsPSg2BXh+3ySU9nw3hE= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 h1:lG559VMq/SjLPgJ4sz7Qh8LVHKCi+En0CBz4Cx6YgIQ= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3/go.mod h1:hEgxA1cAEctcJI458bb5OYbUna18HuOU0rlIYJsV5ac= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 h1:4JC0KVW1KO0h8iOrV+4aw6OcbevCPizyiblhnl+e4aM= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4/go.mod h1:66IUhA3+gDSLwS9aFz9SH4544slFSSkxuMdiUCCPTgY= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 h1:7tNYT4dIDHWWPlcMpponb8mIqzDMpeiG0cxThWijMpo= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5/go.mod h1:avf10drg2PsQEExButqDu6Uj3pvdVPaXA+0XDujNY1U= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 h1:20JAmlxhN45SbHV2oXvdTJKURR+ZHCcTES3wQeOq8B4= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2/go.mod h1:jT4zf0DhyP4qrrWpgE/5huVRDsEXZUATErmvWB+U5DU= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 h1:FtX5kYvSuq4y03jSuAX7nDsIqU5jNSb4c3iWLgmgFqA= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3/go.mod h1:zIRgONJlVxI2R12aS2HMT0Fr6RyZMgeyR/KyFe2vm5A= -github.com/aws/aws-sdk-go-v2/service/waf v1.30.3 h1:PCF7qkr1aYxZlBhCjoQjwoogEHhAJpT0d+AgeVKWvWg= -github.com/aws/aws-sdk-go-v2/service/waf v1.30.3/go.mod h1:daNqb6estNKtRMyRY0gEl7RLEGUjm2ElxqmiYkqBfak= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.4 h1:JtmylnUAIto+udJAxmyx9L5gLemItC+BFf9HQ/L1DeY= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.4/go.mod h1:qGEJhA3DwwWcEovjNKTICRbQNJ9/cugefvB0AmaFYcM= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.5 h1:e4ecT6WQrX02XTgDgE/UCJFF2vKQyuEBsUdnp/I/IGk= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.5/go.mod h1:r6GBj3SqoSMBKxvi7VszEEVazcCLcNTNOJrCWjfl86Q= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.4 h1:TG2MJZFEVhB7VHS8T9BCPRgOOguWtimq+yI937Q60fo= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.4/go.mod h1:nwWzjAK91o7OmcnvMKAmMlZPVFbDGNrxQq8XfsrncvM= -github.com/aws/aws-sdk-go-v2/service/workmail v1.36.2 h1:weOe+mOfoNacPyRBWVFe+aMxMVzj+LJjdUYE6piMWmc= -github.com/aws/aws-sdk-go-v2/service/workmail v1.36.2/go.mod h1:WG/X3d+YF7C+z3pjWyOBRjaMw606gE4lF8GQYtVJ4bQ= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.4 h1:HFApAbF5FyX/y+Rjbis/kFWbXDDFPnfrTLmzGXgDbyE= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.4/go.mod h1:3YIq2J58ChCezXxq/ZPrh7mCqCy8MdA8TWDRRV3zObs= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.4 h1:AThzT7RGEAmXLcawvUvxCDAZqLCH1pqqeIB60qeBtZo= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.4/go.mod h1:SJaiVD1WR0fWgNH4In624+g+sOpqYCtcbUHNqM/hg5E= -github.com/aws/aws-sdk-go-v2/service/xray v1.36.2 h1:XE8FE0DcJ+NftSdKx4b5Ahx4gaBTZPD17N9Jn4yqbBU= -github.com/aws/aws-sdk-go-v2/service/xray v1.36.2/go.mod h1:o94CN7+Dy8jnBGow7cxAV3ZEOx2EMtSUclryNWV8WLc= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.8 h1:tIN8MFT1z5STK5kTdOT1TCfMN/bn5fSEnlKsTL8qBOU= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.8/go.mod h1:VKS56txtNWjKI8FqD/hliL0BcshyF4ZaLBa1rm2Y+5s= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.8 h1:0lJ7+zL81zesTu1nd1ocKpEoYi6BqDppjoAJLn18Vr0= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.8/go.mod h1:5t+iImUczd3RYSVnc20t/ohBrmrkpdcy89pm62BSDQo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.8 h1:M6JI2aGFEzYxsF6CXIuRBnkge9Wf9a2xU39rNeXgu10= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.8/go.mod h1:Fw+MyTwlwjFsSTE31mH211Np+CUslml8mzc0AFEG09s= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.8 h1:AgYCo1Rb8XChJXA871BXHDNxNWOTAr6V5YdsRIBbgv0= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.8/go.mod h1:Au9dvIGm1Hbqnt29d3VakOCQuN9l0WrkDDTRq8biWS4= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.4 h1:pqXQW3DS4n+LvhbMnI0dYu48/ezMZHyQ3hgZmqppWDA= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.25.4/go.mod h1:LlNojdmrHYdc58JiW4d1iiVauXMR67I6w7AOuNO/7QM= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.7 h1:ZwuNG7d6j3BIelPU/cjuU2WnbPPPr6HzTtkQHhCfVDg= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.6.7/go.mod h1:ro6V5D4DB4GTNjElv465FEbFLkArIZk8dfwlQu0CDVk= +github.com/aws/aws-sdk-go-v2/service/iot v1.69.4 h1:aE6flqYMH7oN70XXJ8NAzM6jsTK6dwv5DlYU/tTO9iE= +github.com/aws/aws-sdk-go-v2/service/iot v1.69.4/go.mod h1:JlM6Y9/lpdIu6Nbm2PHKsWBl4pEEjzeKcIwaceNzI8A= +github.com/aws/aws-sdk-go-v2/service/ivs v1.47.5 h1:aJ1AE3Dt/mwkFcR3Ak8HGJ8ack7sD21r3/oJJ1CzvIo= +github.com/aws/aws-sdk-go-v2/service/ivs v1.47.5/go.mod h1:ulDEMSCfB7GJPlDkbN8VZTQwuY+gzQS7uMhkPKc08Xk= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.4 h1:sRozLJvRu6LW2LNdjI7vNGz85BaHDTgrpnlxg0kjWfo= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.21.4/go.mod h1:Zz8GTvGWBPnle4TVu0fWZrWnEJM/ohy1AEvz72Q8T0o= +github.com/aws/aws-sdk-go-v2/service/kafka v1.43.5 h1:GD6O4rGwvpuXMW3G+LGmcAisxwEJ/qWTEHVh2EJ9YAg= +github.com/aws/aws-sdk-go-v2/service/kafka v1.43.5/go.mod h1:3JzaPchevdU28xVcUGvZihkHEgcxj6mc1M0jmIPBZCk= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.4 h1:sqxHUxLuh47E1yfvyIpqJ3Rlq86/Zp+qY3qdg1CwZls= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.27.4/go.mod h1:WD/XxqAT+x1ALiZh2mFgSZ2w7hhK1bgJyxrGczg5FeY= +github.com/aws/aws-sdk-go-v2/service/kendra v1.60.5 h1:wl1Jvy+LnplN3DA63LvFaiNRKAQQ/RJWJxNMhNc6uvk= +github.com/aws/aws-sdk-go-v2/service/kendra v1.60.5/go.mod h1:z6MqqmaBB0jB7j6TtqU74wZX43HuOAjW+xcPhlVtcLU= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.5 h1:WbkAo6akNMmDSY14aTX2P5JfLBPYaky3KowtTpUu+Dg= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.23.5/go.mod h1:V5N6Q6xPxATXIYhnINepbmj8v7SFjH/RvcR2tvwemqc= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.4 h1:EklnkOC4Hvk0qz7JEyj1lUQwuzhxNQwoWGzn+B9p/SQ= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.40.4/go.mod h1:P3rzrvQKKDJdr8DSQ+HrnPe0vZHObzGArI8VjS8TD/c= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.5 h1:rtFOjsNi/FF/ccQOWKJJ0DLJUmAjYHhrtKd21Vgis1k= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.30.5/go.mod h1:s5gBWn3mAmbzP1VH4gKCrZ8cvoPT3O4PFf2iqgnFv7o= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.6 h1:JqYFrkvba3uTBNT9SnHX3zY8xwAMIf67AAE9gKM6Wqg= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.36.6/go.mod h1:blmPmauXqE222j/1bBnWbnu5HmOFKaq57TDVEp5TY6E= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.4 h1:AtXxx3T2m3MtsOx6RYECZ9CY/xR+bs9IBpRcWjfYm7k= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.32.4/go.mod h1:Jw474eZ6bJAkOCNDip0lAwPIpGhaPumFuZ3WBftEZAI= +github.com/aws/aws-sdk-go-v2/service/kms v1.45.4 h1:6gzIbiRNs6o/K/WaLta0Vwac0bI9ou3gfx8ASSMf3wU= +github.com/aws/aws-sdk-go-v2/service/kms v1.45.4/go.mod h1:ooAdc5n3rjgEznIXncCYY6V9+YQDcJAYyZDJ4TwLSDM= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.4 h1:SkLIob+eQ2x917Dm6J8ZYBOKJQcubfnDvlFtBDTj3HA= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.45.4/go.mod h1:Llzlro6KcIlCQ9XlF67XWmWwB/SiSQ4E3+FAW9MF2P0= +github.com/aws/aws-sdk-go-v2/service/lambda v1.77.5 h1:rKc5Ad3PJlXGo5pigWii+m/hSPgxbNJtOicEP5nbV2E= +github.com/aws/aws-sdk-go-v2/service/lambda v1.77.5/go.mod h1:fPYDox6U6puh6xhMyWpUWd19QIIqMlcQ6iCdC1jk2cE= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.5 h1:kzVE1YGQzh2EsH2/2rru9KlTT1EcnyzPFh/ziT0bjmA= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.13.5/go.mod h1:Cj8DwO1GPQM1am9utweFWdc1l/hIPacK5NHukImj0/I= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.4 h1:4EXJ0zche8Tcb459h2JGnYTxBY5ipAWttvV+2UcPDn4= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.33.4/go.mod h1:fJv0jAIV2g4lLrIol3kE/2zt6P8l+66L2UFGMtD8I1Y= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.5 h1:0T2rzgz1a/snpBVTIen7eSwnGhWvAPd6437/yZ99tss= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.56.5/go.mod h1:E4DRF4KQX1XZN8t28fSq5W+BMksVqnV6U2ce2A4gXUQ= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.5 h1:0O5ABLP0OFZzFvj28caDllk2YH4mc1fP6i+4HuNfHek= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.36.5/go.mod h1:nxxXvBLZEm+j3hsKeTQ+nWnXlgHRaI9WDiagMPeT59M= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.5 h1:w5f4GFD4VPp92gw8Lu+5bLNta8PQpi1Uc5TZCR05F6g= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.48.5/go.mod h1:PYBtpUhvxpPQcFHNezTW+7S2q0EMm1tHmMxZ8EL17IA= +github.com/aws/aws-sdk-go-v2/service/location v1.49.5 h1:cRtSrpvv27SdsdAPlol8T2nnM3O66VdenjcPCKSIXHA= +github.com/aws/aws-sdk-go-v2/service/location v1.49.5/go.mod h1:Y+SWwVf3QLr3rW2ys+e4EdaXKfVkzXskNqdRda6XOJ0= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.5 h1:ETYc5MpIm5WSDShGfbSYTmklAB76FFuuxGfOsX+M+nc= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.36.5/go.mod h1:9orzVPgSp0QB6sBj7bJ14uA5p+/4JmpoFMZEST2WeWU= +github.com/aws/aws-sdk-go-v2/service/m2 v1.25.5 h1:ZdpvRHcAsuS+r68qUCpC/J9jeVr2hjQupXHej5pdp5Y= +github.com/aws/aws-sdk-go-v2/service/m2 v1.25.5/go.mod h1:mkXvkEK6xuq9HQyMcb+8OxFN08JEIHUiSLYZtvIUynk= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.5 h1:gc6xw799PWQwqSPiCUjSUeJFwktPxdu4EEv/JjtbaHg= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.49.5/go.mod h1:SJrA0S1rZf+hJZ8A14qyGSKEfo0+xgcHybOMuso4pGo= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.5 h1:SlM5+NZGTGDle6ttbPKF/WHJcwxbj3oEgdzDZ9Qw3Qw= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.44.5/go.mod h1:Qf4V6X3IK9jRR830+XweeOn1xjewIeLn2D3e2NCkobA= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.5 h1:FhZZhB3XgafXOd7GRTDPNie3n/HrF3Zv8bB4LBn/tuM= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.82.5/go.mod h1:jdqkPR7VkqoYZSFDaWNJO5117OB5ahm1OsdpL3N+FMA= +github.com/aws/aws-sdk-go-v2/service/medialive v1.83.1 h1:8uRoFG6r/9RxWNPpuyHj508tMBvZThOWzNFN6ulTt30= +github.com/aws/aws-sdk-go-v2/service/medialive v1.83.1/go.mod h1:QkW7SVV35Eq52NiDipbbq5Fdjprxdt0BevJGMOSI3cg= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.5 h1:cqAHLMgzD7lRgev2a1Mo+Yx1lrbQeUMrdYMG0tXTHDQ= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.39.5/go.mod h1:anm0e41ZROI5kucwbWCuL9Nuk/gIBhh+bOnwEKnyPaI= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.2 h1:bJf3EQ7U9YhLX0LZ/mWb2Ca4VDB0RHMXn7JHv9H1H+o= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.31.2/go.mod h1:3iKCnq745r5o1cK5T8sWPdBlca92hkOV9MRjkyLSoPs= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.5 h1:NpMBTC1/EUDCiR1QsAaJx5B5aQxfRAa3LI3o8o/ygzg= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.39.5/go.mod h1:ClEQ25nOCArJXha4xw1SKmNRBqokGa5wUWrY0CSljQc= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.5 h1:z8YzBokMM+ACy+VAt9ML6t15bl4PWg2Qa+gLZxSMzsI= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.29.5/go.mod h1:pX/zpqdhpMeXOgf4IaTj0R7huKhqmrz4Ycmqgd0OBVM= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.5 h1:2RFdzA+rAgOh+pvBPniDT0SApO5klmNUHUFegbxq924= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.31.5/go.mod h1:XFXsu3EXiGwEG4R64MkML234uPPXQBxcAY7qUXCyHaM= +github.com/aws/aws-sdk-go-v2/service/mgn v1.37.4 h1:g2h94C45Mqi88liuvo0IcH2eSL/FwgKOBXTVgp0Zy7U= +github.com/aws/aws-sdk-go-v2/service/mgn v1.37.4/go.mod h1:jSgQjRJnBdoNJEGHnpQ2PgOLys7ohNJkQKmzBQ8FYw4= +github.com/aws/aws-sdk-go-v2/service/mq v1.34.3 h1:Rz/lroysK+RqrcTY7J6psFC0EG0+lc/wDNITYhyZqS8= +github.com/aws/aws-sdk-go-v2/service/mq v1.34.3/go.mod h1:Xii/g+EJLpxVHa4A1dbKfp+beF9dbqFVwtsmcYoRjnk= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.5 h1:Nf2+SGxaMZ3KfRZ+DIYjrzWWhBUICOUG5+RrvdTNttQ= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.39.5/go.mod h1:T1nupRx4k6E8GYN/fqcV9e+Ezn8s6RyrDxcyBd0ylH4= +github.com/aws/aws-sdk-go-v2/service/neptune v1.42.3 h1:wQZ3ZoxMhSWeI+Gx04TdnPGVyiyse0JbnU8H/RnHVmc= +github.com/aws/aws-sdk-go-v2/service/neptune v1.42.3/go.mod h1:GrbX2ileXVUAUK8aqjYOpf7XsmkMwhtM5FL6L08REDs= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.4 h1:BwUXxuGTkfCJBxSeCyj9FGXzAORVGpW1vJeNDuljzaU= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.21.4/go.mod h1:63FrdK0c39o4iZR2SXgRVm5HAR4UO52U3aUAtsyiCFU= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.1 h1:9C74Am5h6+Zq8MFuq/LS8Kd6le8Jqoy/W2BES5HMnWY= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.56.1/go.mod h1:fdoS8BPmAwWCsz/T5z4Gj6rzgAJjSAsf88e+Qic7cQs= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.6 h1:gkW089f1iICPJKVq0UbtK57znJBbyLv0ryYpC3d3nHw= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.39.6/go.mod h1:u3gTjlgiO+GaYHD7mjiXTHEAkHzmv1jlqA27JaJCLAQ= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.5 h1:LVzNnDazY/+KJQfmzmy296vHVAsjt+KlBXKvK3RLAP4= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.12.5/go.mod h1:72XMlkVojEDuZTW9InSxprH/s18r6tOI/p3/Rjxd/e8= +github.com/aws/aws-sdk-go-v2/service/notifications v1.7.3 h1:yKNPjCC/kINzsM6V//q4gKeBkXjko3DOlLZ5XvvkW0w= +github.com/aws/aws-sdk-go-v2/service/notifications v1.7.3/go.mod h1:3JeNkPARZA8cQWkggggJRAWfn8YYL7IyR/Ng9fi8QWk= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.7 h1:LXBCZlJsWU9P/2wQJG+aOEBzzVkeqytNvVSP/AiM2xo= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.5.7/go.mod h1:1/9XnEIGQt6i7wFXCBTaFNBj2vmzc7g5O0YrrOoLZcM= +github.com/aws/aws-sdk-go-v2/service/oam v1.22.4 h1:hc6vhGJR/Oo3wUirrCdk2kcjUEbaAgKY/MaUoHdR7dc= +github.com/aws/aws-sdk-go-v2/service/oam v1.22.4/go.mod h1:yJfcx5ndz1LTXA3WQ7qZWmPQXOtE3d4Rx7fwF9CMeAs= +github.com/aws/aws-sdk-go-v2/service/odb v1.4.5 h1:g3WQYf6RoN7x0dqdf9edQROEw13c+rhU6ztseY3cfuo= +github.com/aws/aws-sdk-go-v2/service/odb v1.4.5/go.mod h1:YcfGEDn5kPX/cObRuQbLj0kaGgfJ62mg6vKwk261gY0= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.4 h1:dFR3ire/PYB9qIdAKes2dsIWSPSbmXDR+hYoWBOSvNM= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.4/go.mod h1:aglzJEixBNrJcfZkRFo9zUIiqgqau71VgMUpNF9aq20= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.3 h1:FcB0JD+m42HH2xQebadyl1w4nBsaXy3CezzLotSW5U0= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.3/go.mod h1:Kq0rlqHHSo8NhLze+I63WipfRDQ8RE5xwmUD6CbhRYI= +github.com/aws/aws-sdk-go-v2/service/organizations v1.45.2 h1:UrgNIo7nnNcJ41RSZ8I6mz0t5j6M19KPzb+XW9QF5U0= +github.com/aws/aws-sdk-go-v2/service/organizations v1.45.2/go.mod h1:g24aovax3vUoQp2D3+XAOPlJ7VeeM3MdI+3k/U2gg2s= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.1 h1:iNDGJwuGrWFQgaUYSZ5V+0bqBGy91HrZYmvAVsPvdMg= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.1/go.mod h1:WtOr7MJmClnNHHimDVC3uknN7UKiT8bnjnowP7DDPDM= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.6 h1:XcTh52znPsNYzIWyozFwu8Uu+XLkoGxL6grXNwxMAKs= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.6/go.mod h1:ffRwILonyjECbO5dHGK5HOXMUVmKX23X0PUOBecZeRo= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.1 h1:ko0VIzCAX4cT3gcoh0XE8GIzQNjYYwXVJfcbiCmJ1mM= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.1/go.mod h1:Rl6JV2tdH5DbnBiRzu2+N8Q3nnZaUofdvk+9EpRH/0A= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.5 h1:RPJr4Eavdpw9lrcKzcmWBaButkGxdZHXYLKuhhNDTcs= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.5/go.mod h1:ziQOjxhY7/5u/s50cq/rIixwBY4pFvuMz2WZfDGWvAg= +github.com/aws/aws-sdk-go-v2/service/pcs v1.13.1 h1:Dj5rB1dYKFBGbCC1ju0XnNnc/ww4MYOGu6NKCDkcSRQ= +github.com/aws/aws-sdk-go-v2/service/pcs v1.13.1/go.mod h1:/koo7XUOt4SD7GWfe+aJmVvQRFWc3qxg/V3J7GSKwtQ= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.5 h1:1w+7cQ8xLV5HHqXLsU951goCUuoMSz5LOUpmzCwC6As= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.39.5/go.mod h1:ioCORBoHu2o16hJpLFZg/e4S0f0yuPB9W+JjYMMNfu0= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.4 h1:f8GjAtK/4vlm8smVV6rJxlbYhzUfkGu1/BTPcFYRZwY= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.25.4/go.mod h1:X3wPHDPz8ned4UQ+a+kViPTNlIkY4Ccm6XpcN71/et8= +github.com/aws/aws-sdk-go-v2/service/pipes v1.23.4 h1:b7/6w7OW1h1OdpiJbtRTDxB1cNVBOEjm8iHWcRVCsws= +github.com/aws/aws-sdk-go-v2/service/pipes v1.23.4/go.mod h1:8SPFrFynF5Wn1iU2w4scParKYA9jDimBHFeDbyoGQTE= +github.com/aws/aws-sdk-go-v2/service/polly v1.53.5 h1:B8FqAPzKZYuTSF+iWzOdh2yuayZqDaz0rHeY7r7+Czw= +github.com/aws/aws-sdk-go-v2/service/polly v1.53.5/go.mod h1:sMQztn8/ymRqblrKqYi8Tp5WR2u75rDJsnmm23F+y6I= +github.com/aws/aws-sdk-go-v2/service/pricing v1.39.5 h1:6XZD3eQtNzrLQGjs5afZn1lW2TZRDWVfA/3SaQB412Y= +github.com/aws/aws-sdk-go-v2/service/pricing v1.39.5/go.mod h1:9AbXh+nl1DAjTjoSiDYz6IeKO5xeGJ05H/JIjb1Siwk= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.5 h1:2yXmH6W2446BciTlCzYlGEZeBt4IwwqIgkaXR5Q3i7U= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.33.5/go.mod h1:thMIBdJa0cHBOpqpUXjZVKJItdp5nYvAtd0OwtxUc30= +github.com/aws/aws-sdk-go-v2/service/qldb v1.30.5 h1:1s/KnPcDCWFcESJe5kg9Insc1cpM7kOJZxbmHF8Yy5w= +github.com/aws/aws-sdk-go-v2/service/qldb v1.30.5/go.mod h1:MuSf1hpqGEl5HzjSV2p5N1uJMykHP8YmX/QS0mugRTo= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.1 h1:O7hHDZF/5+DN4oPRQq1u3zd1SHnxwDgpvvxThUhP1+Q= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.94.1/go.mod h1:/Mot6Jj1Qd2/B8WxiOwOkxRv8nVtu7TVTCKgQcpgbJk= +github.com/aws/aws-sdk-go-v2/service/ram v1.34.5 h1:PvZedq8Nr3QiAOx3tXbZhD3uqvijB7AqgtjSK9HH1vE= +github.com/aws/aws-sdk-go-v2/service/ram v1.34.5/go.mod h1:6T048C/TFPVH5LDnuB27uZiWz4neaMX/k4PQuwsSGYI= +github.com/aws/aws-sdk-go-v2/service/rbin v1.26.5 h1:cIKPk2ps8dwc5Eb16VZnYMKQW+9FMbz+qDRgTzglXPU= +github.com/aws/aws-sdk-go-v2/service/rbin v1.26.5/go.mod h1:COEStyfI/PSW8awNT1HoHlRgYQqVjCdRhJZ1Sw7qpjI= +github.com/aws/aws-sdk-go-v2/service/rds v1.107.1 h1:j7GQZWF0CbHCObPEZUK6QuP3yUQwjBJmlaojHPRZ6f8= +github.com/aws/aws-sdk-go-v2/service/rds v1.107.1/go.mod h1:OW/mwGWAs6l1HnZpJupatcUFt1V0y6OiUMUp+Wd0DEc= +github.com/aws/aws-sdk-go-v2/service/redshift v1.58.4 h1:3/K+FgsR6//ZSK/Uv2QTeb8Ug1IdKjNgwb7205a4n4M= +github.com/aws/aws-sdk-go-v2/service/redshift v1.58.4/go.mod h1:t+6WfvYqxtwQ0MDg56sYFfH07EKT+Jz+NHamFAulkwg= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.5 h1:2hyuttSMbpJzTdpPAA6pbsmdcQSb3t7AQPGYKb8Pbw8= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.37.5/go.mod h1:l8JdskDXH9DHRDCXrUQeLwJMmuViPtTz/iz+MvBnSCc= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.7 h1:7ISSWB8eMzpZt4X3KeDd5yF0sOPQKbFaYikeElWgzIM= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.31.7/go.mod h1:o1kE7Aq8tpQm0aalh8i0wcwK0Yhrj/JB9FfvBAnbwjQ= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.4 h1:A0+WSnZw5q6HRbmql7OLmHuUHnaWUXgjmjSv4xshn8Y= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.51.4/go.mod h1:mxURAM325+JC3eHlWei2+mzWCxNZ5feN1uoRzT8miTs= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.5 h1:7ibWyVXWXpXoqaeoxRBl6FWKvDAYxpCEmjpjSQGum7M= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.34.5/go.mod h1:gBH/5F+DqH6XdzzHk3cmKGWmQbea1+nQM25S0dNKBFw= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.5 h1:/osdwwAdfwUJslToz4OetbXS1IZdNK0uYJ7UvhuJTIY= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.21.5/go.mod h1:47z4n+dkh/oTmOlaWxSy6RT3x7GkR9K7NCNHSN97NBk= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.6 h1:3jUHJ+wceveycmaOrwQXZSBv/7XRhtv68sLoQ+/zj4M= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.33.6/go.mod h1:ScoN6z1s8UGadFNYNsTYwXgztfW0r7+FyINMkmJmOgo= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.5 h1:UA3sejPQHzCKU16k1VY+AnTDr4FCWWQxLYKxlslKEU0= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.5/go.mod h1:yyo15Q/sYN7ztaSSP/kpAx+DdMNaQO0mP4GGBAm7BRw= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.5 h1:dVj+l4NIKnDsOMtlW1e1tWM1s1jO51Pm2QStoU13Y68= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.21.5/go.mod h1:doLe0bLdFnLMfaF9JacaeWritZRGLW9Nm6p+bNDUpRg= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3 h1:jQzRC+0eI/l5mFXVoPTyyolrqyZtKIYaKHSuKJoIJKs= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3/go.mod h1:1GNaojT/gG4Ru9tT39ton6kRZ3FvptJ/QRKBoqUOVX4= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.3 h1:sfRAFot/FdWktEsGAPS2sUFOjd7FJM8FQiRr7F3bNmo= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.34.3/go.mod h1:Fu3cGFzUxs17sZS5NJnaBPZTrZufyRDDPQX/D1erARA= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.5 h1:2jOEIGAK54GVbprEefZL9TtcIIdN3XAnzYvqn6NuGME= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.9.5/go.mod h1:nHZv5ixEJObIzWNp61Gg69rUPd2pCkrgOJB5Rvx2MXY= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.6 h1:oHhQ63HSIH6LNwMMdE/vo/DgXB8ro3H8x1DgNb8x62Q= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.31.6/go.mod h1:4nDaomeiHh3Se3hq0dNOKJFU5hmomS0F66afMsuYq2o= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.5 h1:SIyhgC6Yn9AepbdFEXYA9+NyM0M++QhUNVLAjZdMZMk= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.26.5/go.mod h1:NYmSbafb2MHeTQiQC0de+czBefxkM+5+6MthkmZTI4Y= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.5 h1:s4bVZWDzxzbZI0n943TUlvUoPLdUKUeBknowTUKWS0Q= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.5/go.mod h1:zsGRe0oBLauYWlFrj6FHK1mNhR4NCbuqj+JQelGFC3M= +github.com/aws/aws-sdk-go-v2/service/rum v1.28.6 h1:vYgurgqbwV9vkW34/bYqIfEahxe1vScs9ttre2nYEw8= +github.com/aws/aws-sdk-go-v2/service/rum v1.28.6/go.mod h1:qzw/AMuwYDbiaF31RS28qwtaDENs6uDk/KpgV8OBS0k= +github.com/aws/aws-sdk-go-v2/service/s3 v1.88.2 h1:T7b3qniouutV5Wwa9B1q7gW+Y8s1B3g9RE9qa7zLBIM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.88.2/go.mod h1:tW9TsLb6t1eaTdBE6LITyJW1m/+DjQPU78Q/jT2FJu8= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.1 h1:E2w689yRS6Goe3khBmlBrJvH1EdXKRbPajF28qvlus8= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.1/go.mod h1:R+UodcuiGX37eSCau+g8HfeOU8eINOYBmUF5F2Bh1K4= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.5 h1:F1yNtV8GCt4R1sN4eM0HxS1g4yFypBdN1jg8f8Y7wdI= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.5/go.mod h1:o9uktj0GTuXRPjzlf6LL8bYe5Maf/2efObAwtqBanhI= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.4 h1:unOY5Zy8JPGTto/ceP+fWbBRJbR+nv0iVmgQxzhl/MU= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.4/go.mod h1:n67J7pPexZgufeaQNdYrEugPZAWB5cPo7T1Z5aiZAN4= +github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.7 h1:gCinGWsye9fd57h+ZUrqJU2D0HEVwAOa4Y300Hilzwo= +github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.7/go.mod h1:gWGWfs4Firg447Gr4VnPcCpGzof+8+HEQTmJJGIj2nM= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.2 h1:3PzLhyagzne3V9s0lcYr9rwqmhFMuwa3IboGUai+s58= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.2/go.mod h1:nEk9o0OcHc6ZtCS9hYSHdnMVzUZLVr2M6VeWpKA7NQY= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.4 h1:YMt6+3drr9IcU4SUyG7O5+kIEjbR17xhis7QyGelHcg= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.17.4/go.mod h1:X026FtKGqEZm6e5Cgj8uus2v0EJEMU3h+YjGwUHYGGQ= +github.com/aws/aws-sdk-go-v2/service/schemas v1.33.4 h1:PHjUXL8ySNGYVl6ro54FXwu8BgdNsm/xjwySpqA+I4k= +github.com/aws/aws-sdk-go-v2/service/schemas v1.33.4/go.mod h1:z1T3zem9JVEVUsMtBoFf9CI6UVqO+bZCYAARD3mLWH8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.5 h1:ssRo1z8FdFaoZc1AWz1R6/amdsxy56akVPql15/AYSs= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.5/go.mod h1:ut4ISJEOb5t2M1DNfx1787tF3UJGlwF3Q97uEulV/lU= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.3 h1:6o8+ze30fwnc4V/nhto/0fBYoiws9v78g7M9LbqofrU= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.64.3/go.mod h1:OGz8b7RoqQTdMhzy5fdiaRkOwyOV0yEg/aO9uAnkb+I= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.5 h1:JBJfUR1njXvmK9d3ZqC6K3WkttWAkbRf7+9XoIaPy/E= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.24.5/go.mod h1:QOVKb80l0cIaF3MwnX4V8rnHwHdnBJSC8jYGxeP9Bfs= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.5 h1:MVnXAF5vPF26AkAe+Fo6z78Oou8E0bZ+ms6hT/u0hoc= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.29.5/go.mod h1:qGotrkSA9OGOZVFQWedkzOzLDGcrUT2EnbCWCivBGX0= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.5 h1:ENz/xNI5OSdTobZSyfTxlXZlMS23/tH/sFVTl/Wvwuc= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.38.5/go.mod h1:7W1TBwi28cH8groqlEvrmXU/ezEIGG09HjBBsmGDB+c= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.5 h1:zsPa71rrBoG4oc60Nc9jmvNwQnwX5rMZZUzxAR3nIXc= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.35.5/go.mod h1:zQylvlg2uShkf/uj9nrOmdbwBH4+jGfvzDAeH6zQlq8= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.8 h1:iu7ZfkC7lZbkLFiiJ3Znl/YXuKNk3XTmwYMHaXXsPUo= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.8/go.mod h1:gcmimEFXc7ksrkBtLR2f7JYT9ANpQanofvwP1bq39Sw= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.4 h1:TJYHJY/TEOtWAyaI1p00lGRPQXx6DPLLmna8BjoCwrk= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.32.4/go.mod h1:gtv4gMhWF+201MWqog46V/fNHgUSddtt9IU6qYgZ4CQ= +github.com/aws/aws-sdk-go-v2/service/ses v1.34.4 h1:0GQy17zYn0U1CHXLh9rEbPZW3zSusSqiGbVBUYDJ2qs= +github.com/aws/aws-sdk-go-v2/service/ses v1.34.4/go.mod h1:NS7mQGFRialwnzHj/bVn8eurbcAGM4xKgPiIk/rwri4= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.4 h1:0T0pWRMBsWSP32FvuCmK/p7ufoEZitS+PODM3+aOTKA= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.53.4/go.mod h1:yKXc38qs9onyyKCBnH0QFkozi96GqVZGu6//HwpqMP8= +github.com/aws/aws-sdk-go-v2/service/sfn v1.39.5 h1:/HaGWiHdPxAxgwsYY+ZhEz47IOjcQcofFNk7Gd3yLbY= +github.com/aws/aws-sdk-go-v2/service/sfn v1.39.5/go.mod h1:OEmM4ipS3JRTTZxoU8TOLHirsqNHifZUwNciT76xZQ0= +github.com/aws/aws-sdk-go-v2/service/shield v1.34.5 h1:n7OaaYO5Id90TbZStXxd10ZHgzJP/dsmVrUkTvnX7f4= +github.com/aws/aws-sdk-go-v2/service/shield v1.34.5/go.mod h1:5yZs0QTVUBzFVcdmznzUlhvnJFe6ByjGa0L7X71GaRo= +github.com/aws/aws-sdk-go-v2/service/signer v1.31.5 h1:CPMtYBeWQ6SHfp47/6VnA6MoNs4OQDetNqt3/Nf7Z5s= +github.com/aws/aws-sdk-go-v2/service/signer v1.31.5/go.mod h1:wn4LhsujYbBhJyfdeAsLFJmuBGH3Ux6SodfoBjh0r28= +github.com/aws/aws-sdk-go-v2/service/sns v1.38.4 h1:MkaMcZGwW9vt0cW+N2i5JSF/zkxKyDqpGCP1VWip3YM= +github.com/aws/aws-sdk-go-v2/service/sns v1.38.4/go.mod h1:S0rwG+VHP1/jKoT6xJDe8f8Apz9HO42dUI8DmnOzYYU= +github.com/aws/aws-sdk-go-v2/service/sqs v1.42.7 h1:KZldI+77SMG8vHDE55HYSjPcKSeOy2WIRo+HtIz2IY8= +github.com/aws/aws-sdk-go-v2/service/sqs v1.42.7/go.mod h1:wbgNsM9psd+xQtLSDUAICjFCT/HXNZIgx3qyjqQNt88= +github.com/aws/aws-sdk-go-v2/service/ssm v1.65.0 h1:6bPuMpky+qG4L7VQ1RyYVkBrEix1JRC/JPweTRfRDko= +github.com/aws/aws-sdk-go-v2/service/ssm v1.65.0/go.mod h1:mbnkxOJSgkV4YHA5dWSlLolvC1EuxNcaGfn0Gf4e9UU= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.7 h1:kz/8Mw8HrNrGlZjh5LIGMNeg/h7wtFMu/zXzbNEJ+z4= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.30.7/go.mod h1:gNXImFj9hXsjX5tgtgH+3GAhzJ1gkwXKVl8cu448dVA= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.4 h1:HT2hU7SaHSz7RINT8vRz++MEdDUGvbrrBEOiDtIleQ0= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.39.4/go.mod h1:pdKXsrQEqtzcuFgy/9dbDBCdznCECK0fs826ODHAaD8= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.5 h1:joNgSFjCVcqO4ChehYL1g7P8zC3WfjD0lggqFyVbUlE= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.8.5/go.mod h1:H67jYNIX7T7SLe5iZVDMwAtoA8TabGpFW2f/NrPUP0s= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.4 h1:SuE/GiqX4BmG1RJ/SXCuiGX6y4XP4tRkAGSn6wpmgPQ= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.25.4/go.mod h1:ixryFI/P2+QSLHiT2KLmg1Fl4uZ+SZe9Hj+YdRFMNgg= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.4 h1:FTdEN9dtWPB0EOURNtDPmwGp6GGvMqRJCAihkSl/1No= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.4/go.mod h1:mYubxV9Ff42fZH4kexj43gFPhgc/LyC7KqvUKt1watc= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.36.0 h1:zW0XCIX3weYJpbbE+8GIWK+ewISjcm9XuItb/+90UDc= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.36.0/go.mod h1:33Y0SLyIseFE7x9sk4TwQTGZLvKCEoQNMaBIyRc6S8E= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.0 h1:I7ghctfGXrscr7r1Ga/mDqSJKm7Fkpl5Mwq79Z+rZqU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.0/go.mod h1:Zo9id81XP6jbayIFWNuDpA6lMBWhsVy+3ou2jLa4JnA= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.5 h1:66xiSm2c+yKfW89ZCuSUGSpjhlXrnnujYVzMTvlBn9U= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.42.5/go.mod h1:h9W8UyJy3tqo2JUZJKDCzms5P6nAdfctF5AE6wbih8Y= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.5 h1:+LVB0xBqEgjQoqr9bGZbRzvg212B0f17JdflleJRNR4= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.5/go.mod h1:xoaxeqnnUaZjPjaICgIy5B+MHCSb/ZSOn4MvkFNOUA0= +github.com/aws/aws-sdk-go-v2/service/swf v1.32.4 h1:8Vir3v5ofhVSyq+uQsZbhHv5gDmeFB8MOHOBbBTQtic= +github.com/aws/aws-sdk-go-v2/service/swf v1.32.4/go.mod h1:Dn78lVa2sYo1frnLV2Y/VGjPf1cU2AZaXbCskYmRGgM= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.5 h1:QFbPjZPYsHIvEfH2IgmmJ5RKLzcxdYAFom2NDtdH9Wg= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.40.5/go.mod h1:UY4GoG7FjIRXEFEy1xI8C2tfq50rwbsmIS3sf5C7pn0= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.5 h1:aCsvthnYzQUhclNnOnY6y98GE/5QcSDiJKnZ/O6cM8E= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.16.5/go.mod h1:hEQ9Hci23FipEndGjVf13gKknP1iou0u8v+YZyFwzfE= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.5 h1:ULU5NJasc33+18uhZCaxfnENf5S9u8fmLWGtpoR/cng= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.16.5/go.mod h1:UUCLRjt77Mi12nID7LOXKiaHp7tBlS8QSLNNNHv2YVk= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.4 h1:jBCvWkHfU0CDXr88Jk2iDP/2w/Ix7N0yoW5JRXHWb4I= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.4/go.mod h1:csNEYpo3KmbQvPBGvSvOyRESGHhWn4H2dnuhYTGBH94= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.4 h1:lCEmLYq7SKuAovCyT2tVVaRuYvuq/DCOBIiEYhUNiYw= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.4/go.mod h1:xzj/HUCYOPwWxjymulevwAu5aEd14h1DbrgD3xcmpE8= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.5 h1:+53FqSqWDrlmPr784MGo4uOMS21NJwUJVGtdliCb9tg= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.5/go.mod h1:Z72GfN19PJCKpKKQU7/9Rj3dzcK9EScyUj5xd4GwqOc= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.6 h1:gxMSPqweeuO+f/UswVu13fLU/A5NGilUascqtivEwbU= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.6/go.mod h1:G3NKnR/n/5iL2FX3ETW10cDnMcs21yaxCgbFoOq8EYU= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.3 h1:gArDyF9h3/Ae7cjsaCeb27qrfQ2TTZpXeFQnTOc8rOU= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.3/go.mod h1:QhnmLIvllivoSp0DNBF2rJwKrZqSCUhlbF5aHOkTl2c= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.4 h1:rSH+7J2CYam9KjTnP/McEBXGKek3ZKmPIjxzbg9JccY= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.4/go.mod h1:8kiKl6iX78tF/zC2Xre57+tIzyqUgss5EC4XTYbTGsg= +github.com/aws/aws-sdk-go-v2/service/waf v1.30.4 h1:I8iRy0FZaIzvKQbYd+so9dwHjfTH7gJStIto9jVdyGo= +github.com/aws/aws-sdk-go-v2/service/waf v1.30.4/go.mod h1:lX0RUUJZv3o0i7eJpOb5v8U/b1nLXOSrDw+5IDfeQ2k= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.5 h1:IsxWqce1g3oinoU7IrhMLHBC9fjU2bsa4a9uB+04ZXk= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.30.5/go.mod h1:cXlfX/JQZm571jLbsJ2KwSkWNL519cIuEGvHRhE00nU= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.6 h1:/1GODXDwDC0VajRPSOM7WEB/lt1nHf4EFGq3tek1mfo= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.67.6/go.mod h1:q1Vkk7vOGe+ZOVoAPF40G79KmvIA4PUopJX7MoX02wY= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.5 h1:edH2U4T6OVZ3oSF1RQJd5uUkYT5qXsv///5eNbjtctA= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.39.5/go.mod h1:MH8WKWPx4mST1eiSCzfnbM/WnbYAYBjquREGQoXiw1k= +github.com/aws/aws-sdk-go-v2/service/workmail v1.36.3 h1:4fr59LE0V+wHppPzH6KcXnPjYsTnSrOmLfg0fCesPSo= +github.com/aws/aws-sdk-go-v2/service/workmail v1.36.3/go.mod h1:CxGZ2aCZsgLJ5joHnUdydAZnGseF8J+k9Q95dQmslCY= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.5 h1:csqxgZrn2tPvnasMPNxIaLCTy6lSXAPMYGks7JkrvzE= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.63.5/go.mod h1:xNd6H5yqIyFcoOwDuJZjR0o6doMVIABzTJ/s6KpVnok= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.5 h1:niTF0DKSzYbSwHbqvfgkTGDjCc4KS9AomYar+FtG4Q8= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.32.5/go.mod h1:oOqgO8CM0jBAailzE/c7Y578WoNGZkge1MW/HZ3M0Co= +github.com/aws/aws-sdk-go-v2/service/xray v1.36.3 h1:4EA/KYvUBptDbTt8aWyyasx8ae4ofSkwX4f2EEG3y7k= +github.com/aws/aws-sdk-go-v2/service/xray v1.36.3/go.mod h1:Gb+Fn+VUhd4TJvFpqn7l/+ny0suOK0IZAA+eE7+9oGo= github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beevik/etree v1.6.0 h1:u8Kwy8pp9D9XeITj2Z0XtA5qqZEmtJtuXZRQi+j03eE= diff --git a/internal/service/appconfig/application_data_source.go b/internal/service/appconfig/application_data_source.go new file mode 100644 index 000000000000..0dd26c6d525c --- /dev/null +++ b/internal/service/appconfig/application_data_source.go @@ -0,0 +1,159 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package appconfig + +import ( + "context" + "fmt" + "iter" + + "github.com/YakDriver/regexache" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/appconfig" + awstypes "github.com/aws/aws-sdk-go-v2/service/appconfig/types" + "github.com/hashicorp/terraform-plugin-framework-validators/datasourcevalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + tfslices "github.com/hashicorp/terraform-provider-aws/internal/slices" + "github.com/hashicorp/terraform-provider-aws/internal/smerr" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkDataSource("aws_appconfig_application", name="Application") +func newDataSourceApplication(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceApplication{}, nil +} + +type dataSourceApplication struct { + framework.DataSourceWithModel[dataSourceApplicationModel] +} + +func (d *dataSourceApplication) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrDescription: schema.StringAttribute{ + Computed: true, + }, + names.AttrID: schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: []validator.String{ + stringvalidator.RegexMatches( + regexache.MustCompile(`^[0-9a-z]{4,7}$`), + "value must contain 4-7 lowercase letters or numbers", + ), + }, + }, + names.AttrName: schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: []validator.String{ + stringvalidator.LengthBetween(1, 64), + }, + }, + }, + } +} + +func (d *dataSourceApplication) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().AppConfigClient(ctx) + + var data dataSourceApplicationModel + smerr.EnrichAppend(ctx, &resp.Diagnostics, req.Config.Get(ctx, &data)) + if resp.Diagnostics.HasError() { + return + } + + var out *awstypes.Application + var err error + var input appconfig.ListApplicationsInput + if !data.ID.IsNull() { + out, err = findApplicationWithFilter(ctx, conn, &input, func(v *awstypes.Application) bool { + return aws.ToString(v.Id) == data.ID.ValueString() + }, tfslices.WithReturnFirstMatch) + } + + if !data.Name.IsNull() { + out, err = findApplicationWithFilter(ctx, conn, &input, func(v *awstypes.Application) bool { + return aws.ToString(v.Name) == data.Name.ValueString() + }, tfslices.WithReturnFirstMatch) + } + + if err != nil { + smerr.AddError(ctx, &resp.Diagnostics, err, smerr.ID, data.Name.String()) + return + } + + smerr.EnrichAppend(ctx, &resp.Diagnostics, flex.Flatten(ctx, out, &data), smerr.ID, data.Name.String()) + if resp.Diagnostics.HasError() { + return + } + + data.ARN = flex.StringValueToFramework(ctx, d.Meta().RegionalARN(ctx, "appconfig", "application/"+data.ID.ValueString())) + + smerr.EnrichAppend(ctx, &resp.Diagnostics, resp.State.Set(ctx, &data), smerr.ID, data.Name.String()) +} + +func (d *dataSourceApplication) ConfigValidators(_ context.Context) []datasource.ConfigValidator { + return []datasource.ConfigValidator{ + datasourcevalidator.ExactlyOneOf( + path.MatchRoot(names.AttrID), + path.MatchRoot(names.AttrName), + ), + } +} + +type dataSourceApplicationModel struct { + framework.WithRegionModel + ARN types.String `tfsdk:"arn"` + Description types.String `tfsdk:"description"` + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` +} + +func findApplicationWithFilter(ctx context.Context, conn *appconfig.Client, input *appconfig.ListApplicationsInput, filter tfslices.Predicate[*awstypes.Application], optFns ...tfslices.FinderOptionsFunc) (*awstypes.Application, error) { + opts := tfslices.NewFinderOptions(optFns) + var output []awstypes.Application + for value, err := range listApplications(ctx, conn, input, filter) { + if err != nil { + return nil, err + } + + output = append(output, value) + if opts.ReturnFirstMatch() { + break + } + } + + return tfresource.AssertSingleValueResult(output) +} + +func listApplications(ctx context.Context, conn *appconfig.Client, input *appconfig.ListApplicationsInput, filter tfslices.Predicate[*awstypes.Application]) iter.Seq2[awstypes.Application, error] { + return func(yield func(awstypes.Application, error) bool) { + pages := appconfig.NewListApplicationsPaginator(conn, input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + yield(awstypes.Application{}, fmt.Errorf("listing AppConfig Applications: %w", err)) + return + } + + for _, v := range page.Items { + if filter(&v) { + if !yield(v, nil) { + return + } + } + } + } + } +} diff --git a/internal/service/appconfig/application_data_source_test.go b/internal/service/appconfig/application_data_source_test.go new file mode 100644 index 000000000000..60c4de6d1220 --- /dev/null +++ b/internal/service/appconfig/application_data_source_test.go @@ -0,0 +1,98 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package appconfig_test + +import ( + "fmt" + "testing" + + "github.com/YakDriver/regexache" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccAppConfigApplicationDataSource_basic_name(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + dataSourceName := "data.aws_appconfig_application.test" + resourceName := "aws_appconfig_application.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.AppConfigEndpointID) + }, + ErrorCheck: acctest.ErrorCheck(t, names.AppConfigServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckApplicationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccApplicationDataSourceConfig_name(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckApplicationExists(ctx, dataSourceName), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrDescription, resourceName, names.AttrDescription), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrID, resourceName, names.AttrID), + resource.TestMatchResourceAttr(dataSourceName, names.AttrID, regexache.MustCompile(`[a-z\d]{4,7}`)), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrName, resourceName, names.AttrName), + ), + }, + }, + }) +} + +func TestAccAppConfigApplicationDataSource_basic_id(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + dataSourceName := "data.aws_appconfig_application.test" + resourceName := "aws_appconfig_application.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.AppConfigEndpointID) + }, + ErrorCheck: acctest.ErrorCheck(t, names.AppConfigServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckApplicationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccApplicationDataSourceConfig_id(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckApplicationExists(ctx, dataSourceName), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrDescription, resourceName, names.AttrDescription), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrID, resourceName, names.AttrID), + resource.TestMatchResourceAttr(dataSourceName, names.AttrID, regexache.MustCompile(`[a-z\d]{4,7}`)), + resource.TestCheckResourceAttrPair(dataSourceName, names.AttrName, resourceName, names.AttrName), + ), + }, + }, + }) +} + +func testAccApplicationDataSourceConfig_baseConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_appconfig_application" "test" { + name = %[1]q + description = "Example AppConfig Application" +} +`, rName) +} + +func testAccApplicationDataSourceConfig_name(rName string) string { + return acctest.ConfigCompose(testAccApplicationDataSourceConfig_baseConfig(rName), ` +data "aws_appconfig_application" "test" { + name = aws_appconfig_application.test.name +} +`) +} + +func testAccApplicationDataSourceConfig_id(rName string) string { + return acctest.ConfigCompose(testAccApplicationDataSourceConfig_baseConfig(rName), ` +data "aws_appconfig_application" "test" { + id = aws_appconfig_application.test.id +} +`) +} diff --git a/internal/service/appconfig/service_package_gen.go b/internal/service/appconfig/service_package_gen.go index daefe1a74249..afc8c8bf945d 100644 --- a/internal/service/appconfig/service_package_gen.go +++ b/internal/service/appconfig/service_package_gen.go @@ -18,7 +18,14 @@ import ( type servicePackage struct{} func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { - return []*inttypes.ServicePackageFrameworkDataSource{} + return []*inttypes.ServicePackageFrameworkDataSource{ + { + Factory: newDataSourceApplication, + TypeName: "aws_appconfig_application", + Name: "Application", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + } } func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { diff --git a/internal/service/bedrock/provisioned_model_throughput.go b/internal/service/bedrock/provisioned_model_throughput.go index 97bbf8cad0cd..706a29f97670 100644 --- a/internal/service/bedrock/provisioned_model_throughput.go +++ b/internal/service/bedrock/provisioned_model_throughput.go @@ -35,7 +35,7 @@ import ( // @FrameworkResource("aws_bedrock_provisioned_model_throughput", name="Provisioned Model Throughput") // @Tags(identifierAttribute="provisioned_model_arn") -// @ArnIdentity(identityDuplicateAttributes="id") +// @ArnIdentity("provisioned_model_arn", identityDuplicateAttributes="id") // Testing is cost-prohibitive // @Testing(tagsTest=false, identityTest=false) func newProvisionedModelThroughputResource(context.Context) (resource.ResourceWithConfigure, error) { diff --git a/internal/service/bedrock/service_package_gen.go b/internal/service/bedrock/service_package_gen.go index 0c92629c2078..cbe863945353 100644 --- a/internal/service/bedrock/service_package_gen.go +++ b/internal/service/bedrock/service_package_gen.go @@ -115,7 +115,7 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser IdentifierAttribute: "provisioned_model_arn", }), Region: unique.Make(inttypes.ResourceRegionDefault()), - Identity: inttypes.RegionalARNIdentity(inttypes.WithIdentityDuplicateAttrs(names.AttrID)), + Identity: inttypes.RegionalARNIdentityNamed("provisioned_model_arn", inttypes.WithIdentityDuplicateAttrs(names.AttrID)), Import: inttypes.FrameworkImport{ WrappedImport: true, }, diff --git a/internal/service/billing/billing_service_account_data_source_test.go b/internal/service/billing/billing_service_account_data_source_test.go index 5bbf4ed6198c..320a5c99b18c 100644 --- a/internal/service/billing/billing_service_account_data_source_test.go +++ b/internal/service/billing/billing_service_account_data_source_test.go @@ -17,7 +17,7 @@ func TestAccBillingServiceAccountDataSource_basic(t *testing.T) { dataSourceName := "data.aws_billing_service_account.test" billingAccountID := "386209384616" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, tfmeta.PseudoServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, diff --git a/internal/service/billing/views_data_source_test.go b/internal/service/billing/views_data_source_test.go index 4058dea241a5..45ab53ae7b1f 100644 --- a/internal/service/billing/views_data_source_test.go +++ b/internal/service/billing/views_data_source_test.go @@ -16,7 +16,7 @@ func TestAccBillingViewsDataSource_basic(t *testing.T) { dataSourceName := "data.aws_billing_views.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, diff --git a/internal/service/connect/connect_test.go b/internal/service/connect/connect_test.go index 2b5d54e3854f..4f9a955fd5bb 100644 --- a/internal/service/connect/connect_test.go +++ b/internal/service/connect/connect_test.go @@ -54,11 +54,15 @@ func TestAccConnect_serial(t *testing.T) { "dataSource_name": testAccHoursOfOperationDataSource_name, }, "Instance": { - acctest.CtBasic: testAccInstance_basic, - "directory": testAccInstance_directory, - "saml": testAccInstance_saml, - "dataSource_basic": testAccInstanceDataSource_basic, - "tags": testAccInstance_tags, + acctest.CtBasic: testAccInstance_basic, + "directory": testAccInstance_directory, + "saml": testAccInstance_saml, + "dataSource_basic": testAccInstanceDataSource_basic, + "tags": testAccInstance_tags, + "identityBasic": testAccConnectInstance_Identity_Basic, + "identityExistingResource": testAccConnectInstance_Identity_ExistingResource, + "identityExistingResourceNoRefresh": testAccConnectInstance_Identity_ExistingResource_NoRefresh_NoChange, + "identityRegionOverride": testAccConnectInstance_Identity_RegionOverride, }, "InstanceStorageConfig": { acctest.CtBasic: testAccInstanceStorageConfig_basic, @@ -82,12 +86,16 @@ func TestAccConnect_serial(t *testing.T) { "dataSource_basic": testAccLambdaFunctionAssociationDataSource_basic, }, "PhoneNumber": { - acctest.CtBasic: testAccPhoneNumber_basic, - acctest.CtDisappears: testAccPhoneNumber_disappears, - "tags": testAccPhoneNumber_tags, - "description": testAccPhoneNumber_description, - "prefix": testAccPhoneNumber_prefix, - "targetARN": testAccPhoneNumber_targetARN, + acctest.CtBasic: testAccPhoneNumber_basic, + acctest.CtDisappears: testAccPhoneNumber_disappears, + "tags": testAccPhoneNumber_tags, + "description": testAccPhoneNumber_description, + "prefix": testAccPhoneNumber_prefix, + "targetARN": testAccPhoneNumber_targetARN, + "identityBasic": testAccConnectPhoneNumber_Identity_Basic, + "identityExistingResource": testAccConnectPhoneNumber_Identity_ExistingResource, + "identityExistingResourceNoRefresh": testAccConnectPhoneNumber_Identity_ExistingResource_NoRefresh_NoChange, + "identityRegionOverride": testAccConnectPhoneNumber_Identity_RegionOverride, }, "PhoneNumberContactFlowAssociation": { acctest.CtBasic: testAccPhoneNumberContactFlowAssociation_basic, diff --git a/internal/service/connect/generate.go b/internal/service/connect/generate.go index d299385e1711..42a67ee7564b 100644 --- a/internal/service/connect/generate.go +++ b/internal/service/connect/generate.go @@ -3,6 +3,7 @@ //go:generate go run ../../generate/tags/main.go -KVTValues -ServiceTagsMap -UpdateTags //go:generate go run ../../generate/servicepackage/main.go +//go:generate go run ../../generate/identitytests/main.go // ONLY generate directives and package declaration! Do not add anything else to this file. package connect diff --git a/internal/service/connect/instance.go b/internal/service/connect/instance.go index ea21a0fd313b..a14c47f50f74 100644 --- a/internal/service/connect/instance.go +++ b/internal/service/connect/instance.go @@ -45,6 +45,10 @@ var ( // @SDKResource("aws_connect_instance", name="Instance") // @Tags(identifierAttribute="arn") +// @IdentityAttribute("id") +// @Testing(preIdentityVersion="6.14.1") +// @Testing(serialize=true) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/connect/types;types.Instance") func resourceInstance() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceInstanceCreate, @@ -52,10 +56,6 @@ func resourceInstance() *schema.Resource { UpdateWithoutTimeout: resourceInstanceUpdate, DeleteWithoutTimeout: resourceInstanceDelete, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(5 * time.Minute), Delete: schema.DefaultTimeout(5 * time.Minute), diff --git a/internal/service/connect/instance_identity_gen_test.go b/internal/service/connect/instance_identity_gen_test.go new file mode 100644 index 000000000000..dc999e2c54c9 --- /dev/null +++ b/internal/service/connect/instance_identity_gen_test.go @@ -0,0 +1,321 @@ +// Code generated by internal/generate/identitytests/main.go; DO NOT EDIT. + +package connect_test + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfknownvalue "github.com/hashicorp/terraform-provider-aws/internal/acctest/knownvalue" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func testAccConnectInstance_IdentitySerial(t *testing.T) { + t.Helper() + + testCases := map[string]func(t *testing.T){ + acctest.CtBasic: testAccConnectInstance_Identity_Basic, + "ExistingResource": testAccConnectInstance_Identity_ExistingResource, + "RegionOverride": testAccConnectInstance_Identity_RegionOverride, + } + + acctest.RunSerialTests1Level(t, testCases, 0) +} + +func testAccConnectInstance_Identity_Basic(t *testing.T) { + ctx := acctest.Context(t) + + var v types.Instance + resourceName := "aws_connect_instance.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckInstanceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckInstanceExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.Region()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + }, + }) +} + +func testAccConnectInstance_Identity_RegionOverride(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_connect_instance.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: acctest.CheckDestroyNoop, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.AlternateRegion()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func testAccConnectInstance_Identity_ExistingResource(t *testing.T) { + ctx := acctest.Context(t) + + var v types.Instance + resourceName := "aws_connect_instance.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckInstanceDestroy(ctx), + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckInstanceExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.Region()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func testAccConnectInstance_Identity_ExistingResource_NoRefresh_NoChange(t *testing.T) { + ctx := acctest.Context(t) + + var v types.Instance + resourceName := "aws_connect_instance.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckInstanceDestroy(ctx), + AdditionalCLIOptions: &resource.AdditionalCLIOptions{ + Plan: resource.PlanOptions{ + NoRefresh: true, + }, + }, + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckInstanceExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Instance/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + }, + }) +} diff --git a/internal/service/connect/phone_number.go b/internal/service/connect/phone_number.go index b2279f064807..3c774b4295e7 100644 --- a/internal/service/connect/phone_number.go +++ b/internal/service/connect/phone_number.go @@ -29,6 +29,10 @@ import ( // @SDKResource("aws_connect_phone_number", name="Phone Number") // @Tags(identifierAttribute="arn") +// @IdentityAttribute("id") +// @Testing(preIdentityVersion="v6.14.1") +// @Testing(serialize=true) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/connect/types;types.ClaimedPhoneNumberSummary") func resourcePhoneNumber() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourcePhoneNumberCreate, @@ -36,10 +40,6 @@ func resourcePhoneNumber() *schema.Resource { UpdateWithoutTimeout: resourcePhoneNumberUpdate, DeleteWithoutTimeout: resourcePhoneNumberDelete, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(2 * time.Minute), Update: schema.DefaultTimeout(2 * time.Minute), diff --git a/internal/service/connect/phone_number_identity_gen_test.go b/internal/service/connect/phone_number_identity_gen_test.go new file mode 100644 index 000000000000..8cacf22b0ad0 --- /dev/null +++ b/internal/service/connect/phone_number_identity_gen_test.go @@ -0,0 +1,321 @@ +// Code generated by internal/generate/identitytests/main.go; DO NOT EDIT. + +package connect_test + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfknownvalue "github.com/hashicorp/terraform-provider-aws/internal/acctest/knownvalue" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func testAccConnectPhoneNumber_IdentitySerial(t *testing.T) { + t.Helper() + + testCases := map[string]func(t *testing.T){ + acctest.CtBasic: testAccConnectPhoneNumber_Identity_Basic, + "ExistingResource": testAccConnectPhoneNumber_Identity_ExistingResource, + "RegionOverride": testAccConnectPhoneNumber_Identity_RegionOverride, + } + + acctest.RunSerialTests1Level(t, testCases, 0) +} + +func testAccConnectPhoneNumber_Identity_Basic(t *testing.T) { + ctx := acctest.Context(t) + + var v types.ClaimedPhoneNumberSummary + resourceName := "aws_connect_phone_number.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckPhoneNumberDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckPhoneNumberExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.Region()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + }, + }) +} + +func testAccConnectPhoneNumber_Identity_RegionOverride(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_connect_phone_number.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: acctest.CheckDestroyNoop, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.AlternateRegion()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func testAccConnectPhoneNumber_Identity_ExistingResource(t *testing.T) { + ctx := acctest.Context(t) + + var v types.ClaimedPhoneNumberSummary + resourceName := "aws_connect_phone_number.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckPhoneNumberDestroy(ctx), + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckPhoneNumberExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrAccountID: tfknownvalue.AccountID(), + names.AttrRegion: knownvalue.StringExact(acctest.Region()), + names.AttrID: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrID)), + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func testAccConnectPhoneNumber_Identity_ExistingResource_NoRefresh_NoChange(t *testing.T) { + ctx := acctest.Context(t) + + var v types.ClaimedPhoneNumberSummary + resourceName := "aws_connect_phone_number.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.Test(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ConnectServiceID), + CheckDestroy: testAccCheckPhoneNumberDestroy(ctx), + AdditionalCLIOptions: &resource.AdditionalCLIOptions{ + Plan: resource.PlanOptions{ + NoRefresh: true, + }, + }, + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckPhoneNumberExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/PhoneNumber/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + }, + }) +} diff --git a/internal/service/connect/service_package_gen.go b/internal/service/connect/service_package_gen.go index a9fa5b82b72d..7308f25394a8 100644 --- a/internal/service/connect/service_package_gen.go +++ b/internal/service/connect/service_package_gen.go @@ -186,7 +186,11 @@ func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePa Tags: unique.Make(inttypes.ServicePackageResourceTags{ IdentifierAttribute: names.AttrARN, }), - Region: unique.Make(inttypes.ResourceRegionDefault()), + Region: unique.Make(inttypes.ResourceRegionDefault()), + Identity: inttypes.RegionalSingleParameterIdentity(names.AttrID), + Import: inttypes.SDKv2Import{ + WrappedImport: true, + }, }, { Factory: resourceInstanceStorageConfig, @@ -207,7 +211,11 @@ func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePa Tags: unique.Make(inttypes.ServicePackageResourceTags{ IdentifierAttribute: names.AttrARN, }), - Region: unique.Make(inttypes.ResourceRegionDefault()), + Region: unique.Make(inttypes.ResourceRegionDefault()), + Identity: inttypes.RegionalSingleParameterIdentity(names.AttrID), + Import: inttypes.SDKv2Import{ + WrappedImport: true, + }, }, { Factory: resourceQueue, diff --git a/internal/service/connect/testdata/Instance/basic/main_gen.tf b/internal/service/connect/testdata/Instance/basic/main_gen.tf new file mode 100644 index 000000000000..7ad26d07a1f0 --- /dev/null +++ b/internal/service/connect/testdata/Instance/basic/main_gen.tf @@ -0,0 +1,16 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_instance" "test" { + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} + + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} diff --git a/internal/service/connect/testdata/Instance/basic_v6.14.1/main_gen.tf b/internal/service/connect/testdata/Instance/basic_v6.14.1/main_gen.tf new file mode 100644 index 000000000000..433dcb6dff3b --- /dev/null +++ b/internal/service/connect/testdata/Instance/basic_v6.14.1/main_gen.tf @@ -0,0 +1,26 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_instance" "test" { + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} + + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "6.14.1" + } + } +} + +provider "aws" {} diff --git a/internal/service/connect/testdata/Instance/region_override/main_gen.tf b/internal/service/connect/testdata/Instance/region_override/main_gen.tf new file mode 100644 index 000000000000..d798b8b533d3 --- /dev/null +++ b/internal/service/connect/testdata/Instance/region_override/main_gen.tf @@ -0,0 +1,24 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_instance" "test" { + region = var.region + + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} + + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "region" { + description = "Region to deploy resource in" + type = string + nullable = false +} diff --git a/internal/service/connect/testdata/PhoneNumber/basic/main_gen.tf b/internal/service/connect/testdata/PhoneNumber/basic/main_gen.tf new file mode 100644 index 000000000000..fde939ec9f6d --- /dev/null +++ b/internal/service/connect/testdata/PhoneNumber/basic/main_gen.tf @@ -0,0 +1,20 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_phone_number" "test" { + target_arn = aws_connect_instance.test.arn + country_code = "US" + type = "DID" +} + +resource "aws_connect_instance" "test" { + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} diff --git a/internal/service/connect/testdata/PhoneNumber/basic_v6.14.1/main_gen.tf b/internal/service/connect/testdata/PhoneNumber/basic_v6.14.1/main_gen.tf new file mode 100644 index 000000000000..cd1b59fd8669 --- /dev/null +++ b/internal/service/connect/testdata/PhoneNumber/basic_v6.14.1/main_gen.tf @@ -0,0 +1,30 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_phone_number" "test" { + target_arn = aws_connect_instance.test.arn + country_code = "US" + type = "DID" +} + +resource "aws_connect_instance" "test" { + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "6.14.1" + } + } +} + +provider "aws" {} diff --git a/internal/service/connect/testdata/PhoneNumber/region_override/main_gen.tf b/internal/service/connect/testdata/PhoneNumber/region_override/main_gen.tf new file mode 100644 index 000000000000..1a3fce7997d8 --- /dev/null +++ b/internal/service/connect/testdata/PhoneNumber/region_override/main_gen.tf @@ -0,0 +1,30 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_connect_phone_number" "test" { + region = var.region + + target_arn = aws_connect_instance.test.arn + country_code = "US" + type = "DID" +} + +resource "aws_connect_instance" "test" { + region = var.region + + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "region" { + description = "Region to deploy resource in" + type = string + nullable = false +} diff --git a/internal/service/connect/testdata/tmpl/instance_tags.gtpl b/internal/service/connect/testdata/tmpl/instance_tags.gtpl new file mode 100644 index 000000000000..99d5645b71cb --- /dev/null +++ b/internal/service/connect/testdata/tmpl/instance_tags.gtpl @@ -0,0 +1,9 @@ +resource "aws_connect_instance" "test" { +{{- template "region" }} + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +{{- template "tags" }} +} + diff --git a/internal/service/connect/testdata/tmpl/phone_number_tags.gtpl b/internal/service/connect/testdata/tmpl/phone_number_tags.gtpl new file mode 100644 index 000000000000..b0568a7498a3 --- /dev/null +++ b/internal/service/connect/testdata/tmpl/phone_number_tags.gtpl @@ -0,0 +1,15 @@ +resource "aws_connect_phone_number" "test" { +{{- template "region" }} + target_arn = aws_connect_instance.test.arn + country_code = "US" + type = "DID" +{{- template "tags" }} +} + +resource "aws_connect_instance" "test" { +{{- template "region" }} + identity_management_type = "CONNECT_MANAGED" + inbound_calls_enabled = true + instance_alias = var.rName + outbound_calls_enabled = true +} \ No newline at end of file diff --git a/internal/service/eks/cluster.go b/internal/service/eks/cluster.go index 49b43f0f0123..fe559e43665a 100644 --- a/internal/service/eks/cluster.go +++ b/internal/service/eks/cluster.go @@ -54,46 +54,11 @@ func resourceCluster() *schema.Resource { CustomizeDiff: customdiff.Sequence( validateAutoModeCustomizeDiff, + validateAutoModeComputeConfigCustomizeDiff, customdiff.ForceNewIfChange("encryption_config", func(_ context.Context, old, new, meta any) bool { // You cannot disable envelope encryption after enabling it. This action is irreversible. return len(old.([]any)) == 1 && len(new.([]any)) == 0 }), - func(ctx context.Context, rd *schema.ResourceDiff, meta any) error { - if rd.Id() == "" { - return nil - } - oldValue, newValue := rd.GetChange("compute_config") - - oldComputeConfig := expandComputeConfigRequest(oldValue.([]any)) - newComputeConfig := expandComputeConfigRequest(newValue.([]any)) - - if newComputeConfig == nil || oldComputeConfig == nil { - return nil - } - - oldRoleARN := aws.ToString(oldComputeConfig.NodeRoleArn) - newRoleARN := aws.ToString(newComputeConfig.NodeRoleArn) - - newComputeConfigEnabled := aws.ToBool(newComputeConfig.Enabled) - - // Do not force new if auto mode is disabled in new config and role ARN is unset - if !newComputeConfigEnabled && newRoleARN == "" { - return nil - } - - // Do not force new if built-in node pools are zeroed in new config and role ARN is unset - if len(newComputeConfig.NodePools) == 0 && newRoleARN == "" { - return nil - } - - // only force new if an existing role has changed, not if a new role is added - if oldRoleARN != "" && oldRoleARN != newRoleARN { - if err := rd.ForceNew("compute_config.0.node_role_arn"); err != nil { - return err - } - } - return nil - }, ), Timeouts: &schema.ResourceTimeout{ @@ -153,12 +118,14 @@ func resourceCluster() *schema.Resource { "compute_config": { Type: schema.TypeList, Optional: true, + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ names.AttrEnabled: { Type: schema.TypeBool, Optional: true, + Computed: true, }, "node_pools": { Type: schema.TypeSet, @@ -270,6 +237,7 @@ func resourceCluster() *schema.Resource { names.AttrEnabled: { Type: schema.TypeBool, Optional: true, + Computed: true, }, }, }, @@ -411,6 +379,7 @@ func resourceCluster() *schema.Resource { "storage_config": { Type: schema.TypeList, Optional: true, + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -423,6 +392,7 @@ func resourceCluster() *schema.Resource { names.AttrEnabled: { Type: schema.TypeBool, Optional: true, + Computed: true, }, }, }, @@ -520,17 +490,19 @@ func resourceCluster() *schema.Resource { func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { var diags diag.Diagnostics - conn := meta.(*conns.AWSClient).EKSClient(ctx) name := d.Get(names.AttrName).(string) input := eks.CreateClusterInput{ BootstrapSelfManagedAddons: aws.Bool(d.Get("bootstrap_self_managed_addons").(bool)), + ComputeConfig: expandComputeConfigRequest(d.Get("compute_config").([]any)), EncryptionConfig: expandEncryptionConfig(d.Get("encryption_config").([]any)), + KubernetesNetworkConfig: expandKubernetesNetworkConfigRequest(d.Get("kubernetes_network_config").([]any)), Logging: expandLogging(d.Get("enabled_cluster_log_types").(*schema.Set)), Name: aws.String(name), ResourcesVpcConfig: expandVpcConfigRequest(d.Get(names.AttrVPCConfig).([]any)), RoleArn: aws.String(d.Get(names.AttrRoleARN).(string)), + StorageConfig: expandStorageConfigRequest(d.Get("storage_config").([]any)), Tags: getTagsIn(ctx), } @@ -538,18 +510,10 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any input.AccessConfig = expandCreateAccessConfigRequest(v.([]any)) } - if v, ok := d.GetOk("compute_config"); ok { - input.ComputeConfig = expandComputeConfigRequest(v.([]any)) - } - if v, ok := d.GetOk(names.AttrDeletionProtection); ok { input.DeletionProtection = aws.Bool(v.(bool)) } - if v, ok := d.GetOk("kubernetes_network_config"); ok { - input.KubernetesNetworkConfig = expandKubernetesNetworkConfigRequest(v.([]any)) - } - if v, ok := d.GetOk("outpost_config"); ok { input.OutpostConfig = expandOutpostConfigRequest(v.([]any)) } @@ -558,10 +522,6 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any input.RemoteNetworkConfig = expandCreateRemoteNetworkConfigRequest(v.([]any)) } - if v, ok := d.GetOk("storage_config"); ok { - input.StorageConfig = expandStorageConfigRequest(v.([]any)) - } - if v, ok := d.GetOk("upgrade_policy"); ok { input.UpgradePolicy = expandUpgradePolicy(v.([]any)) } @@ -574,8 +534,8 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any input.ZonalShiftConfig = expandZonalShiftConfig(v.([]any)) } - outputRaw, err := tfresource.RetryWhen(ctx, propagationTimeout, - func(ctx context.Context) (any, error) { + output, err := tfresource.RetryWhen(ctx, propagationTimeout, + func(ctx context.Context) (*eks.CreateClusterOutput, error) { return conn.CreateCluster(ctx, &input) }, func(err error) (bool, error) { @@ -611,7 +571,7 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any return sdkdiag.AppendErrorf(diags, "creating EKS Cluster (%s): %s", name, err) } - d.SetId(aws.ToString(outputRaw.(*eks.CreateClusterOutput).Cluster.Name)) + d.SetId(aws.ToString(output.Cluster.Name)) if _, err := waitClusterCreated(ctx, conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return sdkdiag.AppendErrorf(diags, "waiting for EKS Cluster (%s) create: %s", d.Id(), err) @@ -705,7 +665,6 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta any) func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { var diags diag.Diagnostics - conn := meta.(*conns.AWSClient).EKSClient(ctx) // Do any version update first. @@ -755,27 +714,28 @@ func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, meta any } } + // All three fields are required to enable/disable Auto Mode or else you receive the error: + // InvalidParameterException: For EKS Auto Mode, please ensure that all required configs, + // including computeConfig, kubernetesNetworkConfig, and blockStorage are all either fully enabled or fully disabled. + // In addition, when updating other Auto Mode arguments (i.e. - computeConfig.nodePools/nodeRoleARN), all 3 fields are required. if d.HasChanges("compute_config", "kubernetes_network_config", "storage_config") { - computeConfig := expandComputeConfigRequest(d.Get("compute_config").([]any)) - kubernetesNetworkConfig := expandKubernetesNetworkConfigRequest(d.Get("kubernetes_network_config").([]any)) - storageConfig := expandStorageConfigRequest(d.Get("storage_config").([]any)) input := eks.UpdateClusterConfigInput{ - ComputeConfig: computeConfig, - KubernetesNetworkConfig: kubernetesNetworkConfig, + ComputeConfig: expandComputeConfigRequest(d.Get("compute_config").([]any)), + KubernetesNetworkConfig: expandKubernetesNetworkConfigRequest(d.Get("kubernetes_network_config").([]any)), Name: aws.String(d.Id()), - StorageConfig: storageConfig, + StorageConfig: expandStorageConfigRequest(d.Get("storage_config").([]any)), } output, err := conn.UpdateClusterConfig(ctx, &input) if err != nil { - return sdkdiag.AppendErrorf(diags, "updating EKS Cluster (%s) compute config: %s", d.Id(), err) + return sdkdiag.AppendErrorf(diags, "updating EKS Cluster (%s) Auto Mode settings: %s", d.Id(), err) } updateID := aws.ToString(output.Update.Id) if _, err = waitClusterUpdateSuccessful(ctx, conn, d.Id(), updateID, d.Timeout(schema.TimeoutUpdate)); err != nil { - return sdkdiag.AppendErrorf(diags, "waiting for EKS Cluster (%s) compute config update (%s): %s", d.Id(), updateID, err) + return sdkdiag.AppendErrorf(diags, "waiting for EKS Cluster (%s) Auto Mode settings update (%s): %s", d.Id(), updateID, err) } } @@ -923,7 +883,6 @@ func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, meta any func resourceClusterDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { var diags diag.Diagnostics - conn := meta.(*conns.AWSClient).EKSClient(ctx) // If a cluster is scaling up due to load a delete request will fail @@ -936,9 +895,7 @@ func resourceClusterDelete(ctx context.Context, d *schema.ResourceData, meta any Name: aws.String(d.Id()), } err := tfresource.Retry(ctx, timeout, func(ctx context.Context) *tfresource.RetryError { - var err error - - _, err = conn.DeleteCluster(ctx, &input) + _, err := conn.DeleteCluster(ctx, &input) if errs.IsAErrorMessageContains[*types.ResourceInUseException](err, "in progress") { return tfresource.RetryableError(err) @@ -1209,8 +1166,15 @@ func expandUpdateAccessConfigRequest(tfList []any) *types.UpdateAccessConfigRequ } func expandComputeConfigRequest(tfList []any) *types.ComputeConfigRequest { + apiObject := &types.ComputeConfigRequest{} + if len(tfList) == 0 { - return nil + // Ensure this is always present to avoid the error: + // InvalidParameterException: The type for cluster update was not provided. + // when the field is removed (nil). + apiObject.Enabled = aws.Bool(false) + + return apiObject } tfMap, ok := tfList[0].(map[string]any) @@ -1218,8 +1182,6 @@ func expandComputeConfigRequest(tfList []any) *types.ComputeConfigRequest { return nil } - apiObject := &types.ComputeConfigRequest{} - if v, ok := tfMap[names.AttrEnabled].(bool); ok { apiObject.Enabled = aws.Bool(v) } @@ -1282,8 +1244,17 @@ func expandProvider(tfList []any) *types.Provider { } func expandStorageConfigRequest(tfList []any) *types.StorageConfigRequest { + apiObject := &types.StorageConfigRequest{} + if len(tfList) == 0 { - return nil + // Ensure this is always present to avoid the error: + // InvalidParameterException: The type for cluster update was not provided. + // when the field is removed (nil). + apiObject.BlockStorage = &types.BlockStorage{ + Enabled: aws.Bool(false), + } + + return apiObject } tfMap, ok := tfList[0].(map[string]any) @@ -1291,8 +1262,6 @@ func expandStorageConfigRequest(tfList []any) *types.StorageConfigRequest { return nil } - apiObject := &types.StorageConfigRequest{} - if v, ok := tfMap["block_storage"].([]any); ok { apiObject.BlockStorage = expandBlockStorage(v) } @@ -1390,8 +1359,18 @@ func expandVpcConfigRequest(tfList []any) *types.VpcConfigRequest { // nosemgrep } func expandKubernetesNetworkConfigRequest(tfList []any) *types.KubernetesNetworkConfigRequest { + apiObject := &types.KubernetesNetworkConfigRequest{} + if len(tfList) == 0 { - return nil + // Required to avoid the error: + // InvalidParameterException: For EKS Auto Mode, please ensure that all required configs, + // including computeConfig, kubernetesNetworkConfig, and blockStorage are all either fully enabled or fully disabled. + // since the other two fields have been injected with `enabled: false` when the field is not present. + apiObject.ElasticLoadBalancing = &types.ElasticLoadBalancing{ + Enabled: aws.Bool(false), + } + + return apiObject } tfMap, ok := tfList[0].(map[string]any) @@ -1399,8 +1378,6 @@ func expandKubernetesNetworkConfigRequest(tfList []any) *types.KubernetesNetwork return nil } - apiObject := &types.KubernetesNetworkConfigRequest{} - if v, ok := tfMap["elastic_load_balancing"].([]any); ok { apiObject.ElasticLoadBalancing = expandKubernetesNetworkConfigElasticLoadBalancing(v) } @@ -1479,6 +1456,7 @@ func expandUpdateRemoteNetworkConfigRequest(tfList []any) *types.RemoteNetworkCo return apiObject } + func expandRemoteNodeNetworks(tfList []any) []types.RemoteNodeNetwork { var apiObjects = []types.RemoteNodeNetwork{} @@ -1581,16 +1559,16 @@ func expandZonalShiftConfig(tfList []any) *types.ZonalShiftConfigRequest { return ZonalShiftConfigRequest } -func flattenCertificate(certificate *types.Certificate) []map[string]any { - if certificate == nil { +func flattenCertificate(apiObject *types.Certificate) []map[string]any { + if apiObject == nil { return []map[string]any{} } - m := map[string]any{ - "data": aws.ToString(certificate.Data), + tfMap := map[string]any{ + "data": aws.ToString(apiObject.Data), } - return []map[string]any{m} + return []map[string]any{tfMap} } func flattenComputeConfigResponse(apiObject *types.ComputeConfigResponse) []map[string]any { @@ -1598,37 +1576,37 @@ func flattenComputeConfigResponse(apiObject *types.ComputeConfigResponse) []map[ return []map[string]any{} } - m := map[string]any{ + tfMap := map[string]any{ names.AttrEnabled: aws.ToBool(apiObject.Enabled), - "node_pools": flex.FlattenStringValueList(apiObject.NodePools), + "node_pools": apiObject.NodePools, "node_role_arn": aws.ToString(apiObject.NodeRoleArn), } - return []map[string]any{m} + return []map[string]any{tfMap} } -func flattenIdentity(identity *types.Identity) []map[string]any { - if identity == nil { +func flattenIdentity(apiObject *types.Identity) []map[string]any { + if apiObject == nil { return []map[string]any{} } - m := map[string]any{ - "oidc": flattenOIDC(identity.Oidc), + tfMap := map[string]any{ + "oidc": flattenOIDC(apiObject.Oidc), } - return []map[string]any{m} + return []map[string]any{tfMap} } -func flattenOIDC(oidc *types.OIDC) []map[string]any { - if oidc == nil { +func flattenOIDC(apiObject *types.OIDC) []map[string]any { + if apiObject == nil { return []map[string]any{} } - m := map[string]any{ - names.AttrIssuer: aws.ToString(oidc.Issuer), + tfMap := map[string]any{ + names.AttrIssuer: aws.ToString(apiObject.Issuer), } - return []map[string]any{m} + return []map[string]any{tfMap} } func flattenAccessConfigResponse(apiObject *types.AccessConfigResponse, bootstrapClusterCreatorAdminPermissions *bool) []any { @@ -1681,30 +1659,29 @@ func flattenProvider(apiObject *types.Provider) []any { return []any{tfMap} } -func flattenVPCConfigResponse(vpcConfig *types.VpcConfigResponse) []map[string]any { // nosemgrep:ci.caps5-in-func-name - if vpcConfig == nil { +func flattenVPCConfigResponse(apiObject *types.VpcConfigResponse) []map[string]any { // nosemgrep:ci.caps5-in-func-name + if apiObject == nil { return []map[string]any{} } - m := map[string]any{ - "cluster_security_group_id": aws.ToString(vpcConfig.ClusterSecurityGroupId), - "endpoint_private_access": vpcConfig.EndpointPrivateAccess, - "endpoint_public_access": vpcConfig.EndpointPublicAccess, - names.AttrSecurityGroupIDs: vpcConfig.SecurityGroupIds, - names.AttrSubnetIDs: vpcConfig.SubnetIds, - "public_access_cidrs": vpcConfig.PublicAccessCidrs, - names.AttrVPCID: aws.ToString(vpcConfig.VpcId), + tfMap := map[string]any{ + "cluster_security_group_id": aws.ToString(apiObject.ClusterSecurityGroupId), + "endpoint_private_access": apiObject.EndpointPrivateAccess, + "endpoint_public_access": apiObject.EndpointPublicAccess, + names.AttrSecurityGroupIDs: apiObject.SecurityGroupIds, + names.AttrSubnetIDs: apiObject.SubnetIds, + "public_access_cidrs": apiObject.PublicAccessCidrs, + names.AttrVPCID: aws.ToString(apiObject.VpcId), } - return []map[string]any{m} + return []map[string]any{tfMap} } -func flattenLogging(logging *types.Logging) []string { +func flattenLogging(apiObject *types.Logging) []string { enabledLogTypes := []types.LogType{} - if logging != nil { - logSetups := logging.ClusterLogging - for _, logSetup := range logSetups { + if apiObject != nil { + for _, logSetup := range apiObject.ClusterLogging { if !aws.ToBool(logSetup.Enabled) { continue } @@ -1731,13 +1708,13 @@ func flattenKubernetesNetworkConfigResponse(apiObject *types.KubernetesNetworkCo return []any{tfMap} } -func flattenKubernetesNetworkConfigElasticLoadBalancing(apiObjects *types.ElasticLoadBalancing) []any { - if apiObjects == nil { +func flattenKubernetesNetworkConfigElasticLoadBalancing(apiObject *types.ElasticLoadBalancing) []any { + if apiObject == nil { return nil } tfMap := map[string]any{ - names.AttrEnabled: aws.ToBool(apiObjects.Enabled), + names.AttrEnabled: aws.ToBool(apiObject.Enabled), } return []any{tfMap} @@ -1779,7 +1756,7 @@ func flattenRemoteNodeNetwork(apiObjects []types.RemoteNodeNetwork) []any { for _, apiObject := range apiObjects { tfMap := map[string]any{ - "cidrs": flex.FlattenStringValueList(apiObject.Cidrs), + "cidrs": apiObject.Cidrs, } tfList = append(tfList, tfMap) @@ -1797,7 +1774,7 @@ func flattenRemotePodNetwork(apiObjects []types.RemotePodNetwork) []any { for _, apiObject := range apiObjects { tfMap := map[string]any{ - "cidrs": flex.FlattenStringValueList(apiObject.Cidrs), + "cidrs": apiObject.Cidrs, } tfList = append(tfList, tfMap) @@ -1885,3 +1862,44 @@ func validateAutoModeCustomizeDiff(_ context.Context, d *schema.ResourceDiff, _ return nil } + +// Allow setting `compute_config.node_role_arn` to `null` when disabling auto mode or +// built-in node pools without forcing re-creation of the cluster +func validateAutoModeComputeConfigCustomizeDiff(_ context.Context, diff *schema.ResourceDiff, _ any) error { + if diff.Id() == "" { + return nil + } + + oldValue, newValue := diff.GetChange("compute_config") + + oldComputeConfig := expandComputeConfigRequest(oldValue.([]any)) + newComputeConfig := expandComputeConfigRequest(newValue.([]any)) + + if newComputeConfig == nil || oldComputeConfig == nil { + return nil + } + + oldRoleARN := aws.ToString(oldComputeConfig.NodeRoleArn) + newRoleARN := aws.ToString(newComputeConfig.NodeRoleArn) + + newComputeConfigEnabled := aws.ToBool(newComputeConfig.Enabled) + + // Do not force new if auto mode is disabled in new config and role ARN is unset + if !newComputeConfigEnabled && newRoleARN == "" { + return nil + } + + // Do not force new if built-in node pools are zeroed in new config and role ARN is unset + if len(newComputeConfig.NodePools) == 0 && newRoleARN == "" { + return nil + } + + // only force new if an existing role has changed, not if a new role is added + if oldRoleARN != "" && oldRoleARN != newRoleARN { + if err := diff.ForceNew("compute_config.0.node_role_arn"); err != nil { + return err + } + } + + return nil +} diff --git a/internal/service/eks/cluster_test.go b/internal/service/eks/cluster_test.go index a08a2d5409e8..812578fff82f 100644 --- a/internal/service/eks/cluster_test.go +++ b/internal/service/eks/cluster_test.go @@ -66,7 +66,7 @@ func TestAccEKSCluster_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "certificate_authority.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "certificate_authority.0.data"), resource.TestCheckNoResourceAttr(resourceName, "cluster_id"), - resource.TestCheckResourceAttr(resourceName, "compute_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "compute_config.#", "1"), acctest.CheckResourceAttrRFC3339(resourceName, names.AttrCreatedAt), resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, acctest.CtFalse), resource.TestCheckResourceAttr(resourceName, "enabled_cluster_log_types.#", "0"), @@ -86,7 +86,7 @@ func TestAccEKSCluster_basic(t *testing.T) { resource.TestMatchResourceAttr(resourceName, "platform_version", regexache.MustCompile(`^eks\.\d+$`)), resource.TestCheckResourceAttrPair(resourceName, names.AttrRoleARN, "aws_iam_role.cluster", names.AttrARN), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, string(types.ClusterStatusActive)), - resource.TestCheckResourceAttr(resourceName, "storage_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "storage_config.#", "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"), resource.TestMatchResourceAttr(resourceName, names.AttrVersion, regexache.MustCompile(`^\d+\.\d+$`)), resource.TestCheckResourceAttr(resourceName, "upgrade_policy.#", "1"), @@ -380,7 +380,7 @@ func TestAccEKSCluster_ComputeConfig_OnCreate(t *testing.T) { func TestAccEKSCluster_ComputeConfig_OnUpdate(t *testing.T) { ctx := acctest.Context(t) - var cluster1, cluster2 types.Cluster + var cluster types.Cluster rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) resourceName := "aws_eks_cluster.test" @@ -393,15 +393,43 @@ func TestAccEKSCluster_ComputeConfig_OnUpdate(t *testing.T) { { Config: testAccClusterConfig_computeConfig_onUpdateSetup(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckClusterExists(ctx, resourceName, &cluster1), - resource.TestCheckResourceAttr(resourceName, "compute_config.#", "0"), + testAccCheckClusterExists(ctx, resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "compute_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.enabled", acctest.CtFalse), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.node_pools.#", "0"), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.#", "1"), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.0.enabled", acctest.CtFalse), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.ip_family", "ipv4"), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv4_cidr", "172.20.0.0/16"), resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv6_cidr", ""), - resource.TestCheckResourceAttr(resourceName, "storage_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "storage_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.0.enabled", acctest.CtFalse), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"bootstrap_self_managed_addons"}, + }, + { + Config: testAccClusterConfig_computeConfig_nodePoolsSetup(rName, false), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists(ctx, resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "compute_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.enabled", acctest.CtFalse), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.node_pools.#", "0"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.0.enabled", acctest.CtFalse), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.ip_family", "ipv4"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv4_cidr", "172.20.0.0/16"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv6_cidr", ""), + resource.TestCheckResourceAttr(resourceName, "storage_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.0.enabled", acctest.CtFalse), ), }, { @@ -412,9 +440,13 @@ func TestAccEKSCluster_ComputeConfig_OnUpdate(t *testing.T) { }, { Config: testAccClusterConfig_computeConfig(rName, true, "aws_iam_role.node.arn"), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + }, + }, Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckClusterExists(ctx, resourceName, &cluster2), - testAccCheckClusterNotRecreated(&cluster1, &cluster2), + testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, "compute_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "compute_config.0.enabled", acctest.CtTrue), resource.TestCheckResourceAttr(resourceName, "compute_config.0.node_pools.#", "1"), @@ -437,6 +469,35 @@ func TestAccEKSCluster_ComputeConfig_OnUpdate(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"bootstrap_self_managed_addons"}, }, + { + Config: testAccClusterConfig_computeConfig_nodePoolsSetup(rName, false), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + }, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists(ctx, resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "compute_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.enabled", acctest.CtFalse), + resource.TestCheckResourceAttr(resourceName, "compute_config.0.node_pools.#", "0"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.elastic_load_balancing.0.enabled", acctest.CtFalse), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.ip_family", "ipv4"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv4_cidr", "172.20.0.0/16"), + resource.TestCheckResourceAttr(resourceName, "kubernetes_network_config.0.service_ipv6_cidr", ""), + resource.TestCheckResourceAttr(resourceName, "storage_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.#", "1"), + resource.TestCheckResourceAttr(resourceName, "storage_config.0.block_storage.0.enabled", acctest.CtFalse), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"bootstrap_self_managed_addons"}, + }, }, }) } diff --git a/internal/service/elasticache/serverless_cache.go b/internal/service/elasticache/serverless_cache.go index 3f02c04bb47b..b44e3b90efef 100644 --- a/internal/service/elasticache/serverless_cache.go +++ b/internal/service/elasticache/serverless_cache.go @@ -200,9 +200,20 @@ func (r *serverlessCacheResource) Schema(ctx context.Context, request resource.S Attributes: map[string]schema.Attribute{ "maximum": schema.Int64Attribute{ Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, "minimum": schema.Int64Attribute{ Optional: true, + Computed: true, + Validators: []validator.Int64{ + int64validator.Between(1, 5000), + }, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, names.AttrUnit: schema.StringAttribute{ CustomType: fwtypes.StringEnumType[awstypes.DataStorageUnit](), @@ -220,15 +231,23 @@ func (r *serverlessCacheResource) Schema(ctx context.Context, request resource.S Attributes: map[string]schema.Attribute{ "maximum": schema.Int64Attribute{ Optional: true, + Computed: true, Validators: []validator.Int64{ int64validator.Between(1000, 15000000), }, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, "minimum": schema.Int64Attribute{ Optional: true, + Computed: true, Validators: []validator.Int64{ int64validator.Between(1000, 15000000), }, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, }, }, diff --git a/internal/service/elastictranscoder/pipeline_test.go b/internal/service/elastictranscoder/pipeline_test.go index 152374c4cfd2..893f955a6986 100644 --- a/internal/service/elastictranscoder/pipeline_test.go +++ b/internal/service/elastictranscoder/pipeline_test.go @@ -14,11 +14,9 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/elastictranscoder" awstypes "github.com/aws/aws-sdk-go-v2/service/elastictranscoder/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/errs" tfelastictranscoder "github.com/hashicorp/terraform-provider-aws/internal/service/elastictranscoder" "github.com/hashicorp/terraform-provider-aws/names" @@ -28,18 +26,18 @@ func TestAccElasticTranscoderPipeline_basic(t *testing.T) { ctx := acctest.Context(t) pipeline := &awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "elastictranscoder", regexache.MustCompile(`pipeline/.+`)), ), }, @@ -56,19 +54,19 @@ func TestAccElasticTranscoderPipeline_kmsKey(t *testing.T) { ctx := acctest.Context(t) pipeline := &awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) keyResourceName := "aws_kms_key.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_kmsKey(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), resource.TestCheckResourceAttrPair(resourceName, "aws_kms_key_arn", keyResourceName, names.AttrARN), ), }, @@ -86,18 +84,18 @@ func TestAccElasticTranscoderPipeline_notifications(t *testing.T) { pipeline := awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_notifications(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, &pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, &pipeline), testAccCheckPipeline_notifications(&pipeline, []string{"warning", "completed"}), ), }, @@ -110,7 +108,7 @@ func TestAccElasticTranscoderPipeline_notifications(t *testing.T) { { Config: testAccPipelineConfig_notificationsUpdate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, &pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, &pipeline), testAccCheckPipeline_notifications(&pipeline, []string{"completed"}), ), }, @@ -156,18 +154,18 @@ func TestAccElasticTranscoderPipeline_withContent(t *testing.T) { pipeline := &awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_content(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), ), }, { @@ -178,7 +176,7 @@ func TestAccElasticTranscoderPipeline_withContent(t *testing.T) { { Config: testAccPipelineConfig_contentUpdate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), ), }, }, @@ -190,18 +188,18 @@ func TestAccElasticTranscoderPipeline_withPermissions(t *testing.T) { pipeline := &awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_perms(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), ), }, { @@ -217,18 +215,18 @@ func TestAccElasticTranscoderPipeline_disappears(t *testing.T) { ctx := acctest.Context(t) pipeline := &awstypes.Pipeline{} resourceName := "aws_elastictranscoder_pipeline.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPipelineDestroy(ctx), + CheckDestroy: testAccCheckPipelineDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPipelineConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPipelineExists(ctx, resourceName, pipeline), + testAccCheckPipelineExists(ctx, t, resourceName, pipeline), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfelastictranscoder.ResourcePipeline(), resourceName), ), ExpectNonEmptyPlan: true, @@ -237,7 +235,7 @@ func TestAccElasticTranscoderPipeline_disappears(t *testing.T) { }) } -func testAccCheckPipelineExists(ctx context.Context, n string, res *awstypes.Pipeline) resource.TestCheckFunc { +func testAccCheckPipelineExists(ctx context.Context, t *testing.T, n string, res *awstypes.Pipeline) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -248,7 +246,7 @@ func testAccCheckPipelineExists(ctx context.Context, n string, res *awstypes.Pip return fmt.Errorf("No Pipeline ID is set") } - conn := acctest.Provider.Meta().(*conns.AWSClient).ElasticTranscoderClient(ctx) + conn := acctest.ProviderMeta(ctx, t).ElasticTranscoderClient(ctx) out, err := conn.ReadPipeline(ctx, &elastictranscoder.ReadPipelineInput{ Id: aws.String(rs.Primary.ID), @@ -264,9 +262,9 @@ func testAccCheckPipelineExists(ctx context.Context, n string, res *awstypes.Pip } } -func testAccCheckPipelineDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckPipelineDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ElasticTranscoderClient(ctx) + conn := acctest.ProviderMeta(ctx, t).ElasticTranscoderClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_elastictranscoder_pipline" { @@ -292,7 +290,7 @@ func testAccCheckPipelineDestroy(ctx context.Context) resource.TestCheckFunc { } func testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ElasticTranscoderClient(ctx) + conn := acctest.ProviderMeta(ctx, t).ElasticTranscoderClient(ctx) input := &elastictranscoder.ListPipelinesInput{} diff --git a/internal/service/elastictranscoder/preset_test.go b/internal/service/elastictranscoder/preset_test.go index d2de67ee731a..78ce6fb8e918 100644 --- a/internal/service/elastictranscoder/preset_test.go +++ b/internal/service/elastictranscoder/preset_test.go @@ -12,11 +12,9 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/elastictranscoder" awstypes "github.com/aws/aws-sdk-go-v2/service/elastictranscoder/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/errs" tfet "github.com/hashicorp/terraform-provider-aws/internal/service/elastictranscoder" "github.com/hashicorp/terraform-provider-aws/names" @@ -26,18 +24,18 @@ func TestAccElasticTranscoderPreset_basic(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "elastictranscoder", regexache.MustCompile(`preset/.+`)), ), }, @@ -54,18 +52,18 @@ func TestAccElasticTranscoderPreset_video_noCodec(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_videoNoCodec(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), ), }, { @@ -82,18 +80,18 @@ func TestAccElasticTranscoderPreset_audio_noBitRate(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_noBitRate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), ), }, { @@ -109,18 +107,18 @@ func TestAccElasticTranscoderPreset_disappears(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfet.ResourcePreset(), resourceName), ), ExpectNonEmptyPlan: true, @@ -134,18 +132,18 @@ func TestAccElasticTranscoderPreset_AudioCodecOptions_empty(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_audioCodecOptionsEmpty(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), ), }, { @@ -162,18 +160,18 @@ func TestAccElasticTranscoderPreset_description(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_description(rName, "description1"), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "description1"), ), }, @@ -191,18 +189,18 @@ func TestAccElasticTranscoderPreset_full(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_full1(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), resource.TestCheckResourceAttr(resourceName, "audio.#", "1"), resource.TestCheckResourceAttr(resourceName, "audio_codec_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "thumbnails.#", "1"), @@ -219,7 +217,7 @@ func TestAccElasticTranscoderPreset_full(t *testing.T) { { Config: testAccPresetConfig_full2(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), resource.TestCheckResourceAttr(resourceName, "audio.#", "1"), resource.TestCheckResourceAttr(resourceName, "audio_codec_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "thumbnails.#", "1"), @@ -242,18 +240,18 @@ func TestAccElasticTranscoderPreset_Video_frameRate(t *testing.T) { ctx := acctest.Context(t) var preset awstypes.Preset resourceName := "aws_elastictranscoder_preset.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ElasticTranscoderServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckPresetDestroy(ctx), + CheckDestroy: testAccCheckPresetDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccPresetConfig_videoFrameRate(rName, "29.97"), Check: resource.ComposeTestCheckFunc( - testAccCheckPresetExists(ctx, resourceName, &preset), + testAccCheckPresetExists(ctx, t, resourceName, &preset), resource.TestCheckResourceAttr(resourceName, "video.0.frame_rate", "29.97"), ), }, @@ -266,9 +264,9 @@ func TestAccElasticTranscoderPreset_Video_frameRate(t *testing.T) { }) } -func testAccCheckPresetExists(ctx context.Context, name string, preset *awstypes.Preset) resource.TestCheckFunc { +func testAccCheckPresetExists(ctx context.Context, t *testing.T, name string, preset *awstypes.Preset) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ElasticTranscoderClient(ctx) + conn := acctest.ProviderMeta(ctx, t).ElasticTranscoderClient(ctx) rs, ok := s.RootModule().Resources[name] if !ok { @@ -292,9 +290,9 @@ func testAccCheckPresetExists(ctx context.Context, name string, preset *awstypes } } -func testAccCheckPresetDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckPresetDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ElasticTranscoderClient(ctx) + conn := acctest.ProviderMeta(ctx, t).ElasticTranscoderClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_elastictranscoder_preset" { diff --git a/internal/service/emrserverless/application.go b/internal/service/emrserverless/application.go index e8865cef61b6..52a6b238e2bc 100644 --- a/internal/service/emrserverless/application.go +++ b/internal/service/emrserverless/application.go @@ -15,7 +15,6 @@ import ( "github.com/aws/aws-sdk-go-v2/service/emrserverless/types" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" "github.com/hashicorp/terraform-provider-aws/internal/flex" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/internal/verify" @@ -309,7 +309,7 @@ func resourceApplicationRead(ctx context.Context, d *schema.ResourceData, meta a application, err := findApplicationByID(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] EMR Serverless Application (%s) not found, removing from state", d.Id()) d.SetId("") return diags @@ -447,8 +447,7 @@ func findApplicationByID(ctx context.Context, conn *emrserverless.Client, id str if errs.IsA[*types.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -467,8 +466,8 @@ func findApplicationByID(ctx context.Context, conn *emrserverless.Client, id str return output.Application, nil } -func statusApplication(ctx context.Context, conn *emrserverless.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusApplication(conn *emrserverless.Client, id string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := findApplicationByID(ctx, conn, id) if tfresource.NotFound(err) { @@ -492,7 +491,7 @@ func waitApplicationCreated(ctx context.Context, conn *emrserverless.Client, id stateConf := &retry.StateChangeConf{ Pending: enum.Slice(types.ApplicationStateCreating), Target: enum.Slice(types.ApplicationStateCreated), - Refresh: statusApplication(ctx, conn, id), + Refresh: statusApplication(conn, id), Timeout: timeout, MinTimeout: minTimeout, Delay: delay, @@ -502,7 +501,7 @@ func waitApplicationCreated(ctx context.Context, conn *emrserverless.Client, id if output, ok := outputRaw.(*types.Application); ok { if stateChangeReason := output.StateDetails; stateChangeReason != nil { - tfresource.SetLastError(err, errors.New(aws.ToString(stateChangeReason))) + retry.SetLastError(err, errors.New(aws.ToString(stateChangeReason))) } return output, err @@ -520,7 +519,7 @@ func waitApplicationTerminated(ctx context.Context, conn *emrserverless.Client, stateConf := &retry.StateChangeConf{ Pending: enum.Values[types.ApplicationState](), Target: []string{}, - Refresh: statusApplication(ctx, conn, id), + Refresh: statusApplication(conn, id), Timeout: timeout, MinTimeout: minTimeout, Delay: delay, @@ -530,7 +529,7 @@ func waitApplicationTerminated(ctx context.Context, conn *emrserverless.Client, if output, ok := outputRaw.(*types.Application); ok { if stateChangeReason := output.StateDetails; stateChangeReason != nil { - tfresource.SetLastError(err, errors.New(aws.ToString(stateChangeReason))) + retry.SetLastError(err, errors.New(aws.ToString(stateChangeReason))) } return output, err diff --git a/internal/service/emrserverless/application_test.go b/internal/service/emrserverless/application_test.go index 7327c103dbb8..054ae6ef1862 100644 --- a/internal/service/emrserverless/application_test.go +++ b/internal/service/emrserverless/application_test.go @@ -10,13 +10,11 @@ import ( "github.com/YakDriver/regexache" "github.com/aws/aws-sdk-go-v2/service/emrserverless/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfemrserverless "github.com/hashicorp/terraform-provider-aws/internal/service/emrserverless" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -24,18 +22,18 @@ func TestAccEMRServerlessApplication_basic(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "emr-serverless", regexache.MustCompile(`/applications/.+$`)), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrType, "hive"), @@ -64,18 +62,18 @@ func TestAccEMRServerlessApplication_arch(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_arch(rName, "ARM64"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "architecture", "ARM64"), ), }, @@ -87,7 +85,7 @@ func TestAccEMRServerlessApplication_arch(t *testing.T) { { Config: testAccApplicationConfig_arch(rName, "X86_64"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "architecture", "X86_64"), ), }, @@ -99,18 +97,18 @@ func TestAccEMRServerlessApplication_releaseLabel(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_releaseLabel(rName, "emr-6.10.0"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "release_label", "emr-6.10.0"), ), }, @@ -122,7 +120,7 @@ func TestAccEMRServerlessApplication_releaseLabel(t *testing.T) { { Config: testAccApplicationConfig_releaseLabel(rName, "emr-6.11.0"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "release_label", "emr-6.11.0"), ), }, @@ -134,18 +132,18 @@ func TestAccEMRServerlessApplication_initialCapacity(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_initialCapacity(rName, "2 vCPU"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "initial_capacity.#", "1"), resource.TestCheckResourceAttr(resourceName, "initial_capacity.0.initial_capacity_type", "HiveDriver"), resource.TestCheckResourceAttr(resourceName, "initial_capacity.0.initial_capacity_config.#", "1"), @@ -163,7 +161,7 @@ func TestAccEMRServerlessApplication_initialCapacity(t *testing.T) { { Config: testAccApplicationConfig_initialCapacity(rName, "4 vCPU"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "initial_capacity.#", "1"), resource.TestCheckResourceAttr(resourceName, "initial_capacity.0.initial_capacity_type", "HiveDriver"), resource.TestCheckResourceAttr(resourceName, "initial_capacity.0.initial_capacity_config.#", "1"), @@ -184,7 +182,7 @@ func TestAccEMRServerlessApplication_imageConfiguration(t *testing.T) { } var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) firstVersionRegex := regexache.MustCompile(`1\.0\.0`) secondVersionRegex := regexache.MustCompile(`1\.0\.1`) @@ -199,16 +197,16 @@ func TestAccEMRServerlessApplication_imageConfiguration(t *testing.T) { t.Error(err) } - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: firstImageConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "image_configuration.#", "1"), resource.TestMatchResourceAttr(resourceName, "image_configuration.0.image_uri", firstVersionRegex), ), @@ -221,7 +219,7 @@ func TestAccEMRServerlessApplication_imageConfiguration(t *testing.T) { { Config: secondImageConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "image_configuration.#", "1"), resource.TestMatchResourceAttr(resourceName, "image_configuration.0.image_uri", secondVersionRegex), ), @@ -234,18 +232,18 @@ func TestAccEMRServerlessApplication_interactiveConfiguration(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_interactiveConfiguration(rName, true, true), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.livy_endpoint_enabled", acctest.CtTrue), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.studio_enabled", acctest.CtTrue), @@ -259,7 +257,7 @@ func TestAccEMRServerlessApplication_interactiveConfiguration(t *testing.T) { { Config: testAccApplicationConfig_interactiveConfiguration(rName, true, false), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.livy_endpoint_enabled", acctest.CtTrue), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.studio_enabled", acctest.CtFalse), @@ -268,7 +266,7 @@ func TestAccEMRServerlessApplication_interactiveConfiguration(t *testing.T) { { Config: testAccApplicationConfig_interactiveConfiguration(rName, false, true), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.livy_endpoint_enabled", acctest.CtFalse), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.0.studio_enabled", acctest.CtTrue), @@ -277,7 +275,7 @@ func TestAccEMRServerlessApplication_interactiveConfiguration(t *testing.T) { { Config: testAccApplicationConfig_interactiveConfiguration(rName, false, false), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "interactive_configuration.#", "1"), resource.TestCheckNoResourceAttr(resourceName, "interactive_configuration.0.livy_endpoint_enabled"), resource.TestCheckNoResourceAttr(resourceName, "interactive_configuration.0.studio_enabled"), @@ -291,18 +289,18 @@ func TestAccEMRServerlessApplication_maxCapacity(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_maxCapacity(rName, "2 vCPU"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.#", "1"), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.0.cpu", "2 vCPU"), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.0.memory", "10 GB"), @@ -316,7 +314,7 @@ func TestAccEMRServerlessApplication_maxCapacity(t *testing.T) { { Config: testAccApplicationConfig_maxCapacity(rName, "4 vCPU"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.#", "1"), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.0.cpu", "4 vCPU"), resource.TestCheckResourceAttr(resourceName, "maximum_capacity.0.memory", "10 GB")), @@ -329,18 +327,18 @@ func TestAccEMRServerlessApplication_network(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_network(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "network_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "network_configuration.0.security_group_ids.#", "1"), resource.TestCheckResourceAttr(resourceName, "network_configuration.0.subnet_ids.#", "2"), @@ -359,18 +357,18 @@ func TestAccEMRServerlessApplication_disappears(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfemrserverless.ResourceApplication(), resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfemrserverless.ResourceApplication(), resourceName), ), @@ -384,18 +382,18 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { ctx := acctest.Context(t) var application types.Application resourceName := "aws_emrserverless_application.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.EMRServerlessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -408,7 +406,7 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { { Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -417,7 +415,7 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { { Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), ), @@ -426,14 +424,14 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { }) } -func testAccCheckApplicationExists(ctx context.Context, resourceName string, application *types.Application) resource.TestCheckFunc { +func testAccCheckApplicationExists(ctx context.Context, t *testing.T, resourceName string, application *types.Application) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[resourceName] if !ok { return fmt.Errorf("Not found: %s", resourceName) } - conn := acctest.Provider.Meta().(*conns.AWSClient).EMRServerlessClient(ctx) + conn := acctest.ProviderMeta(ctx, t).EMRServerlessClient(ctx) output, err := tfemrserverless.FindApplicationByID(ctx, conn, rs.Primary.ID) if err != nil { @@ -450,9 +448,9 @@ func testAccCheckApplicationExists(ctx context.Context, resourceName string, app } } -func testAccCheckApplicationDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckApplicationDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).EMRServerlessClient(ctx) + conn := acctest.ProviderMeta(ctx, t).EMRServerlessClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_emrserverless_application" { @@ -461,7 +459,7 @@ func testAccCheckApplicationDestroy(ctx context.Context) resource.TestCheckFunc _, err := tfemrserverless.FindApplicationByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } diff --git a/internal/service/internetmonitor/monitor.go b/internal/service/internetmonitor/monitor.go index d14b2663e4f3..7985de91c0c5 100644 --- a/internal/service/internetmonitor/monitor.go +++ b/internal/service/internetmonitor/monitor.go @@ -15,13 +15,13 @@ import ( "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" "github.com/hashicorp/terraform-provider-aws/internal/flex" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/internal/verify" @@ -215,7 +215,7 @@ func resourceMonitorRead(ctx context.Context, d *schema.ResourceData, meta any) monitor, err := findMonitorByName(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] Internet Monitor Monitor (%s) not found, removing from state", d.Id()) d.SetId("") return diags @@ -351,8 +351,7 @@ func findMonitorByName(ctx context.Context, conn *internetmonitor.Client, name s // if errs.IsA[*types.ResourceNotFoundException](err) { if tfawserr.ErrCodeEquals(err, errCodeResourceNotFoundException) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -367,8 +366,8 @@ func findMonitorByName(ctx context.Context, conn *internetmonitor.Client, name s return output, nil } -func statusMonitor(ctx context.Context, conn *internetmonitor.Client, name string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusMonitor(conn *internetmonitor.Client, name string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { monitor, err := findMonitorByName(ctx, conn, name) if tfresource.NotFound(err) { @@ -390,7 +389,7 @@ func waitMonitor(ctx context.Context, conn *internetmonitor.Client, name string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(types.MonitorConfigStatePending), Target: enum.Slice(targetState), - Refresh: statusMonitor(ctx, conn, name), + Refresh: statusMonitor(conn, name), Timeout: timeout, Delay: 10 * time.Second, } @@ -399,7 +398,7 @@ func waitMonitor(ctx context.Context, conn *internetmonitor.Client, name string, if output, ok := outputRaw.(*internetmonitor.GetMonitorOutput); ok { if status := output.Status; status == types.MonitorConfigStateError { - tfresource.SetLastError(err, errors.New(aws.ToString(output.ProcessingStatusInfo))) + retry.SetLastError(err, errors.New(aws.ToString(output.ProcessingStatusInfo))) } return err diff --git a/internal/service/internetmonitor/monitor_test.go b/internal/service/internetmonitor/monitor_test.go index e3c798a4ebeb..8269464352d5 100644 --- a/internal/service/internetmonitor/monitor_test.go +++ b/internal/service/internetmonitor/monitor_test.go @@ -9,31 +9,29 @@ import ( "testing" "github.com/YakDriver/regexache" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfinternetmonitor "github.com/hashicorp/terraform-provider-aws/internal/service/internetmonitor" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) func TestAccInternetMonitorMonitor_basic(t *testing.T) { ctx := acctest.Context(t) - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_internetmonitor_monitor.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.InternetMonitorServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckMonitorDestroy(ctx), + CheckDestroy: testAccCheckMonitorDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccMonitorConfig_basic(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "internetmonitor", regexache.MustCompile(`monitor/.+$`)), resource.TestCheckResourceAttr(resourceName, "health_events_config.#", "0"), resource.TestCheckResourceAttr(resourceName, "internet_measurements_log_delivery.#", "1"), @@ -53,7 +51,7 @@ func TestAccInternetMonitorMonitor_basic(t *testing.T) { { Config: testAccMonitorConfig_status(rName, "INACTIVE"), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, "INACTIVE"), ), }, @@ -63,19 +61,19 @@ func TestAccInternetMonitorMonitor_basic(t *testing.T) { func TestAccInternetMonitorMonitor_disappears(t *testing.T) { ctx := acctest.Context(t) - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_internetmonitor_monitor.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.InternetMonitorServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckMonitorDestroy(ctx), + CheckDestroy: testAccCheckMonitorDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccMonitorConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfinternetmonitor.ResourceMonitor(), resourceName), ), ExpectNonEmptyPlan: true, @@ -86,19 +84,19 @@ func TestAccInternetMonitorMonitor_disappears(t *testing.T) { func TestAccInternetMonitorMonitor_tags(t *testing.T) { ctx := acctest.Context(t) - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_internetmonitor_monitor.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.InternetMonitorServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckMonitorDestroy(ctx), + CheckDestroy: testAccCheckMonitorDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccMonitorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -111,7 +109,7 @@ func TestAccInternetMonitorMonitor_tags(t *testing.T) { { Config: testAccMonitorConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -120,7 +118,7 @@ func TestAccInternetMonitorMonitor_tags(t *testing.T) { { Config: testAccMonitorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), ), @@ -131,19 +129,19 @@ func TestAccInternetMonitorMonitor_tags(t *testing.T) { func TestAccInternetMonitorMonitor_healthEventsConfig(t *testing.T) { ctx := acctest.Context(t) - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_internetmonitor_monitor.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.InternetMonitorServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckMonitorDestroy(ctx), + CheckDestroy: testAccCheckMonitorDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccMonitorConfig_healthEventsConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, "health_events_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "health_events_config.0.availability_score_threshold", "50"), resource.TestCheckResourceAttr(resourceName, "health_events_config.0.performance_score_threshold", "95"), @@ -157,7 +155,7 @@ func TestAccInternetMonitorMonitor_healthEventsConfig(t *testing.T) { { Config: testAccMonitorConfig_healthEventsConfigUpdated(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, "health_events_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "health_events_config.0.availability_score_threshold", "75"), resource.TestCheckResourceAttr(resourceName, "health_events_config.0.performance_score_threshold", "85"), @@ -169,19 +167,19 @@ func TestAccInternetMonitorMonitor_healthEventsConfig(t *testing.T) { func TestAccInternetMonitorMonitor_log(t *testing.T) { ctx := acctest.Context(t) - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_internetmonitor_monitor.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.InternetMonitorServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckMonitorDestroy(ctx), + CheckDestroy: testAccCheckMonitorDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccMonitorConfig_log(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckMonitorExists(ctx, resourceName), + testAccCheckMonitorExists(ctx, t, resourceName), resource.TestCheckResourceAttr(resourceName, "internet_measurements_log_delivery.#", "1"), resource.TestCheckResourceAttr(resourceName, "internet_measurements_log_delivery.0.s3_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "internet_measurements_log_delivery.0.s3_config.0.bucket_name", rName), @@ -196,9 +194,9 @@ func TestAccInternetMonitorMonitor_log(t *testing.T) { }) } -func testAccCheckMonitorDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckMonitorDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).InternetMonitorClient(ctx) + conn := acctest.ProviderMeta(ctx, t).InternetMonitorClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_internetmonitor_monitor" { @@ -207,7 +205,7 @@ func testAccCheckMonitorDestroy(ctx context.Context) resource.TestCheckFunc { _, err := tfinternetmonitor.FindMonitorByName(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -222,14 +220,14 @@ func testAccCheckMonitorDestroy(ctx context.Context) resource.TestCheckFunc { } } -func testAccCheckMonitorExists(ctx context.Context, n string) resource.TestCheckFunc { +func testAccCheckMonitorExists(ctx context.Context, t *testing.T, n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).InternetMonitorClient(ctx) + conn := acctest.ProviderMeta(ctx, t).InternetMonitorClient(ctx) _, err := tfinternetmonitor.FindMonitorByName(ctx, conn, rs.Primary.ID) diff --git a/internal/service/lakeformation/exports_test.go b/internal/service/lakeformation/exports_test.go index dad67c3c4080..e01b29e25bf4 100644 --- a/internal/service/lakeformation/exports_test.go +++ b/internal/service/lakeformation/exports_test.go @@ -6,11 +6,12 @@ package lakeformation // exports used for testing only. var ( ResourceDataCellsFilter = newDataCellsFilterResource + ResourceLFTagExpression = newLFTagExpressionResource ResourceResourceLFTag = newResourceLFTagResource ResourceOptIn = newOptInResource FindDataCellsFilterByID = findDataCellsFilterByID - FindResourceLFTagByID = findResourceLFTagByID + FindLFTagExpression = findLFTagExpression LFTagParseResourceID = lfTagParseResourceID FindOptInByID = findOptInByID diff --git a/internal/service/lakeformation/lakeformation_test.go b/internal/service/lakeformation/lakeformation_test.go index 819c9efbe954..0dcc322a5d4b 100644 --- a/internal/service/lakeformation/lakeformation_test.go +++ b/internal/service/lakeformation/lakeformation_test.go @@ -84,6 +84,11 @@ func TestAccLakeFormation_serial(t *testing.T) { "values": testAccLFTag_Values, "valuesOverFifty": testAccLFTag_Values_overFifty, }, + "LFTagExpression": { + acctest.CtBasic: testAccLFTagExpression_basic, + acctest.CtDisappears: testAccLFTagExpression_disappears, + "update": testAccLFTagExpression_update, + }, "ResourceLFTag": { acctest.CtBasic: testAccResourceLFTag_basic, acctest.CtDisappears: testAccResourceLFTag_disappears, diff --git a/internal/service/lakeformation/lf_tag_expression.go b/internal/service/lakeformation/lf_tag_expression.go new file mode 100644 index 000000000000..1542edd4145d --- /dev/null +++ b/internal/service/lakeformation/lf_tag_expression.go @@ -0,0 +1,281 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lakeformation + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/lakeformation" + awstypes "github.com/aws/aws-sdk-go-v2/service/lakeformation/types" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + intflex "github.com/hashicorp/terraform-provider-aws/internal/flex" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/retry" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkResource("aws_lakeformation_lf_tag_expression", name="LF Tag Expression") +func newLFTagExpressionResource(_ context.Context) (resource.ResourceWithConfigure, error) { + return &lfTagExpressionResource{}, nil +} + +const ( + ResNameLFTagExpression = "LF Tag Expression" +) + +type lfTagExpressionResource struct { + framework.ResourceWithModel[lfTagExpressionResourceModel] +} + +func (r *lfTagExpressionResource) Schema(ctx context.Context, _ resource.SchemaRequest, response *resource.SchemaResponse) { + response.Schema = schema.Schema{ + Description: "Manages an AWS Lake Formation Tag Expression.", + Attributes: map[string]schema.Attribute{ + names.AttrCatalogID: schema.StringAttribute{ + Optional: true, + Computed: true, + Description: "The ID of the Data Catalog.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + }, + names.AttrName: schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + Description: "The name of the LF-Tag Expression.", + }, + names.AttrDescription: schema.StringAttribute{ + Optional: true, + Description: "A description of the LF-Tag Expression.", + }, + }, + Blocks: map[string]schema.Block{ + names.AttrExpression: schema.SetNestedBlock{ + CustomType: fwtypes.NewSetNestedObjectTypeOf[expressionLfTag](ctx), + Validators: []validator.Set{ + setvalidator.IsRequired(), + }, + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "tag_key": schema.StringAttribute{ + Required: true, + }, + "tag_values": schema.SetAttribute{ + ElementType: types.StringType, + Required: true, + }, + }, + }, + }, + }, + } +} + +func (r *lfTagExpressionResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { + conn := r.Meta().LakeFormationClient(ctx) + + var data lfTagExpressionResourceModel + response.Diagnostics.Append(request.Plan.Get(ctx, &data)...) + if response.Diagnostics.HasError() { + return + } + + if data.CatalogId.IsNull() || data.CatalogId.IsUnknown() { + data.CatalogId = fwflex.StringValueToFramework(ctx, r.Meta().AccountID(ctx)) + } + + input := lakeformation.CreateLFTagExpressionInput{} + response.Diagnostics.Append(fwflex.Expand(ctx, data, &input)...) + if response.Diagnostics.HasError() { + return + } + + _, err := conn.CreateLFTagExpression(ctx, &input) + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.LakeFormation, create.ErrActionCreating, ResNameLFTagExpression, data.Name.String(), err), + err.Error(), + ) + return + } + + response.Diagnostics.Append(response.State.Set(ctx, data)...) +} + +func (r *lfTagExpressionResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) { + conn := r.Meta().LakeFormationClient(ctx) + + var data lfTagExpressionResourceModel + response.Diagnostics.Append(request.State.Get(ctx, &data)...) + if response.Diagnostics.HasError() { + return + } + + output, err := findLFTagExpression(ctx, conn, data.Name.ValueString(), data.CatalogId.ValueString()) + + if retry.NotFound(err) { + response.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + response.State.RemoveResource(ctx) + return + } + + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.LakeFormation, create.ErrActionReading, ResNameLFTagExpression, data.Name.String(), err), + err.Error(), + ) + return + } + + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { + return + } + + response.Diagnostics.Append(response.State.Set(ctx, &data)...) +} + +func (r *lfTagExpressionResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) { + conn := r.Meta().LakeFormationClient(ctx) + + var plan, state lfTagExpressionResourceModel + response.Diagnostics.Append(request.Plan.Get(ctx, &plan)...) + response.Diagnostics.Append(request.State.Get(ctx, &state)...) + if response.Diagnostics.HasError() { + return + } + + diff, d := fwflex.Diff(ctx, plan, state) + response.Diagnostics.Append(d...) + if response.Diagnostics.HasError() { + return + } + + if diff.HasChanges() { + var input lakeformation.UpdateLFTagExpressionInput + response.Diagnostics.Append(fwflex.Expand(ctx, plan, &input)...) + if response.Diagnostics.HasError() { + return + } + + _, err := conn.UpdateLFTagExpression(ctx, &input) + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.LakeFormation, create.ErrActionUpdating, ResNameLFTagExpression, plan.Name.String(), err), + err.Error(), + ) + return + } + } + + response.Diagnostics.Append(response.State.Set(ctx, &plan)...) +} + +func (r *lfTagExpressionResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) { + conn := r.Meta().LakeFormationClient(ctx) + + var state lfTagExpressionResourceModel + response.Diagnostics.Append(request.State.Get(ctx, &state)...) + if response.Diagnostics.HasError() { + return + } + + input := lakeformation.DeleteLFTagExpressionInput{ + CatalogId: state.CatalogId.ValueStringPointer(), + Name: state.Name.ValueStringPointer(), + } + + _, err := conn.DeleteLFTagExpression(ctx, &input) + + if errs.IsA[*awstypes.EntityNotFoundException](err) { + return + } + + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.LakeFormation, create.ErrActionDeleting, ResNameLFTagExpression, state.Name.String(), err), + err.Error(), + ) + return + } +} + +const ( + lfTagExpressionIDPartCount = 2 +) + +func (r *lfTagExpressionResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) { + parts, err := intflex.ExpandResourceId(request.ID, lfTagExpressionIDPartCount, false) + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.LakeFormation, create.ErrActionImporting, ResNameLFTagExpression, request.ID, err), + err.Error(), + ) + return + } + + name := parts[0] + catalogId := parts[1] + // Set the parsed values in state + response.Diagnostics.Append(response.State.SetAttribute(ctx, path.Root(names.AttrName), name)...) + response.Diagnostics.Append(response.State.SetAttribute(ctx, path.Root(names.AttrCatalogID), catalogId)...) + if response.Diagnostics.HasError() { + return + } +} + +type lfTagExpressionResourceModel struct { + framework.WithRegionModel + CatalogId types.String `tfsdk:"catalog_id"` + Description types.String `tfsdk:"description"` + Name types.String `tfsdk:"name"` + Expression fwtypes.SetNestedObjectValueOf[expressionLfTag] `tfsdk:"expression"` +} + +type expressionLfTag struct { + TagKey types.String `tfsdk:"tag_key"` + TagValues fwtypes.SetOfString `tfsdk:"tag_values"` +} + +func findLFTagExpression(ctx context.Context, conn *lakeformation.Client, name, catalogId string) (*lakeformation.GetLFTagExpressionOutput, error) { + input := lakeformation.GetLFTagExpressionInput{ + CatalogId: aws.String(catalogId), + Name: aws.String(name), + } + + output, err := conn.GetLFTagExpression(ctx, &input) + + if errs.IsA[*awstypes.EntityNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + } + } + + if err != nil { + return nil, err + } + + if output == nil || output.Expression == nil { + return nil, tfresource.NewEmptyResultError(input) + } + + return output, nil +} diff --git a/internal/service/lakeformation/lf_tag_expression_test.go b/internal/service/lakeformation/lf_tag_expression_test.go new file mode 100644 index 000000000000..518ff23a2694 --- /dev/null +++ b/internal/service/lakeformation/lf_tag_expression_test.go @@ -0,0 +1,275 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lakeformation_test + +import ( + "context" + "errors" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/lakeformation" + awstypes "github.com/aws/aws-sdk-go-v2/service/lakeformation/types" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/retry" + tflakeformation "github.com/hashicorp/terraform-provider-aws/internal/service/lakeformation" + "github.com/hashicorp/terraform-provider-aws/names" +) + +const ( + ResNameLFTagExpression = "LF Tag Expression" +) + +func testAccLFTagExpression_basic(t *testing.T) { + ctx := acctest.Context(t) + + var lftagexpression lakeformation.GetLFTagExpressionOutput + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_lakeformation_lf_tag_expression.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.LakeFormation) + testAccLFTagExpressionPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.LakeFormationServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckLFTagExpressionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccLFTagExpressionConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckLFTagExpressionExists(ctx, resourceName, &lftagexpression), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttrSet(resourceName, names.AttrCatalogID), + resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "test description"), + resource.TestCheckResourceAttr(resourceName, "expression.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrsImportStateIdFunc(resourceName, ",", names.AttrName, names.AttrCatalogID), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrName, + }, + }, + }) +} + +func testAccLFTagExpression_update(t *testing.T) { + ctx := acctest.Context(t) + + var lftagexpression lakeformation.GetLFTagExpressionOutput + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_lakeformation_lf_tag_expression.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.LakeFormation) + testAccLFTagExpressionPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.LakeFormationServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckLFTagExpressionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccLFTagExpressionConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckLFTagExpressionExists(ctx, resourceName, &lftagexpression), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttrSet(resourceName, names.AttrCatalogID), + resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "test description"), + resource.TestCheckResourceAttr(resourceName, "expression.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrsImportStateIdFunc(resourceName, ",", names.AttrName, names.AttrCatalogID), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrName, + }, + { + Config: testAccLFTagExpressionConfig_update(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckLFTagExpressionExists(ctx, resourceName, &lftagexpression), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttrSet(resourceName, names.AttrCatalogID), + resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "test description two"), + resource.TestCheckResourceAttr(resourceName, "expression.#", "2"), + ), + }, + }, + }) +} + +func testAccLFTagExpression_disappears(t *testing.T) { + ctx := acctest.Context(t) + + var lftagexpression lakeformation.GetLFTagExpressionOutput + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_lakeformation_lf_tag_expression.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.LakeFormation) + testAccLFTagExpressionPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.LakeFormationServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckLFTagExpressionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccLFTagExpressionConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckLFTagExpressionExists(ctx, resourceName, &lftagexpression), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tflakeformation.ResourceLFTagExpression, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} +func testAccCheckLFTagExpressionDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).LakeFormationClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_lakeformation_lf_tag_expression" { + continue + } + + _, err := tflakeformation.FindLFTagExpression(ctx, conn, rs.Primary.Attributes[names.AttrName], rs.Primary.Attributes[names.AttrCatalogID]) + + if retry.NotFound(err) { + continue + } + + if errs.IsAErrorMessageContains[*awstypes.AccessDeniedException](err, "Insufficient Lake Formation permission(s)") { + continue + } + + if err != nil { + return create.Error(names.LakeFormation, create.ErrActionCheckingDestroyed, ResNameLFTagExpression, rs.Primary.ID, err) + } + + return create.Error(names.LakeFormation, create.ErrActionCheckingDestroyed, ResNameLFTagExpression, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func testAccCheckLFTagExpressionExists(ctx context.Context, name string, lftagexpression *lakeformation.GetLFTagExpressionOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.LakeFormation, create.ErrActionCheckingExistence, ResNameLFTagExpression, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.LakeFormation, create.ErrActionCheckingExistence, ResNameLFTagExpression, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).LakeFormationClient(ctx) + resp, err := tflakeformation.FindLFTagExpression(ctx, conn, rs.Primary.Attributes[names.AttrName], rs.Primary.Attributes[names.AttrCatalogID]) + + if err != nil { + return create.Error(names.LakeFormation, create.ErrActionCheckingExistence, ResNameLFTagExpression, rs.Primary.ID, err) + } + + *lftagexpression = *resp + + return nil + } +} + +func testAccLFTagExpressionPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).LakeFormationClient(ctx) + + input := lakeformation.ListLFTagExpressionsInput{} + _, err := conn.ListLFTagExpressions(ctx, &input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +const testAccLFTagExpression_baseConfig = ` +data "aws_caller_identity" "current" {} + +data "aws_iam_session_context" "current" { + arn = data.aws_caller_identity.current.arn +} + +resource "aws_lakeformation_data_lake_settings" "test" { + admins = [data.aws_iam_session_context.current.issuer_arn] +} + +resource "aws_lakeformation_lf_tag" "test" { + key = "key" + values = ["value"] + + depends_on = [aws_lakeformation_data_lake_settings.test] +} +` + +func testAccLFTagExpressionConfig_basic(rName string) string { + return acctest.ConfigCompose(testAccLFTagExpression_baseConfig, + fmt.Sprintf(` +resource "aws_lakeformation_lf_tag_expression" "test" { + name = %[1]q + description = "test description" + + expression { + tag_key = aws_lakeformation_lf_tag.test.key + tag_values = aws_lakeformation_lf_tag.test.values + } + + depends_on = [aws_lakeformation_data_lake_settings.test] +} +`, rName)) +} + +func testAccLFTagExpressionConfig_update(rName string) string { + return acctest.ConfigCompose(testAccLFTagExpression_baseConfig, + fmt.Sprintf(` +resource "aws_lakeformation_lf_tag" "test2" { + key = "key2" + values = ["value2"] + + depends_on = [aws_lakeformation_data_lake_settings.test] +} + +resource "aws_lakeformation_lf_tag_expression" "test" { + name = %[1]q + description = "test description two" + + expression { + tag_key = aws_lakeformation_lf_tag.test.key + tag_values = aws_lakeformation_lf_tag.test.values + } + + expression { + tag_key = aws_lakeformation_lf_tag.test2.key + tag_values = aws_lakeformation_lf_tag.test2.values + } + + depends_on = [aws_lakeformation_data_lake_settings.test] +} +`, rName)) +} diff --git a/internal/service/lakeformation/service_package_gen.go b/internal/service/lakeformation/service_package_gen.go index 0f4c58dcd1ca..4ec95fd636e0 100644 --- a/internal/service/lakeformation/service_package_gen.go +++ b/internal/service/lakeformation/service_package_gen.go @@ -29,6 +29,12 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser Name: "Data Cells Filter", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newLFTagExpressionResource, + TypeName: "aws_lakeformation_lf_tag_expression", + Name: "LF Tag Expression", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newOptInResource, TypeName: "aws_lakeformation_opt_in", diff --git a/internal/service/mwaa/environment.go b/internal/service/mwaa/environment.go index 2a5de18a6c17..fdab7f3fbaea 100644 --- a/internal/service/mwaa/environment.go +++ b/internal/service/mwaa/environment.go @@ -15,7 +15,6 @@ import ( gversion "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" "github.com/hashicorp/terraform-provider-aws/internal/flex" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/internal/verify" @@ -445,7 +445,7 @@ func resourceEnvironmentRead(ctx context.Context, d *schema.ResourceData, meta a environment, err := findEnvironmentByName(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] MWAA Environment %s not found, removing from state", d.Id()) d.SetId("") return diags @@ -683,8 +683,7 @@ func findEnvironment(ctx context.Context, conn *mwaa.Client, input *mwaa.GetEnvi if errs.IsA[*awstypes.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -699,8 +698,8 @@ func findEnvironment(ctx context.Context, conn *mwaa.Client, input *mwaa.GetEnvi return output.Environment, nil } -func statusEnvironment(ctx context.Context, conn *mwaa.Client, name string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusEnvironment(conn *mwaa.Client, name string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { environment, err := findEnvironmentByName(ctx, conn, name) if tfresource.NotFound(err) { @@ -719,7 +718,7 @@ func waitEnvironmentCreated(ctx context.Context, conn *mwaa.Client, name string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.EnvironmentStatusCreating), Target: enum.Slice(awstypes.EnvironmentStatusAvailable, awstypes.EnvironmentStatusPending), - Refresh: statusEnvironment(ctx, conn, name), + Refresh: statusEnvironment(conn, name), Timeout: timeout, } @@ -727,7 +726,7 @@ func waitEnvironmentCreated(ctx context.Context, conn *mwaa.Client, name string, if v, ok := outputRaw.(*awstypes.Environment); ok { if v.LastUpdate != nil && v.LastUpdate.Error != nil { - tfresource.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) + retry.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) } return v, err @@ -740,7 +739,7 @@ func waitEnvironmentUpdated(ctx context.Context, conn *mwaa.Client, name string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.EnvironmentStatusUpdating, awstypes.EnvironmentStatusCreatingSnapshot), Target: enum.Slice(awstypes.EnvironmentStatusAvailable), - Refresh: statusEnvironment(ctx, conn, name), + Refresh: statusEnvironment(conn, name), Timeout: timeout, } @@ -748,7 +747,7 @@ func waitEnvironmentUpdated(ctx context.Context, conn *mwaa.Client, name string, if v, ok := outputRaw.(*awstypes.Environment); ok { if v.LastUpdate != nil && v.LastUpdate.Error != nil { - tfresource.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) + retry.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) } return v, err @@ -761,7 +760,7 @@ func waitEnvironmentDeleted(ctx context.Context, conn *mwaa.Client, name string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.EnvironmentStatusDeleting), Target: []string{}, - Refresh: statusEnvironment(ctx, conn, name), + Refresh: statusEnvironment(conn, name), Timeout: timeout, } @@ -769,7 +768,7 @@ func waitEnvironmentDeleted(ctx context.Context, conn *mwaa.Client, name string, if v, ok := outputRaw.(*awstypes.Environment); ok { if v.LastUpdate != nil && v.LastUpdate.Error != nil { - tfresource.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) + retry.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(v.LastUpdate.Error.ErrorCode), aws.ToString(v.LastUpdate.Error.ErrorMessage))) } return v, err diff --git a/internal/service/mwaa/environment_test.go b/internal/service/mwaa/environment_test.go index 8cb496111ed9..8ca5e2698392 100644 --- a/internal/service/mwaa/environment_test.go +++ b/internal/service/mwaa/environment_test.go @@ -11,7 +11,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" awstypes "github.com/aws/aws-sdk-go-v2/service/mwaa/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/statecheck" @@ -19,28 +18,27 @@ import ( "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" "github.com/hashicorp/terraform-provider-aws/internal/acctest" tfknownvalue "github.com/hashicorp/terraform-provider-aws/internal/acctest/knownvalue" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfmwaa "github.com/hashicorp/terraform-provider-aws/internal/service/mwaa" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) func TestAccMWAAEnvironment_basic(t *testing.T) { ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttrSet(resourceName, "airflow_version"), acctest.CheckResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "airflow", "environment/"+rName), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreatedAt), @@ -95,19 +93,19 @@ func TestAccMWAAEnvironment_basic(t *testing.T) { func TestAccMWAAEnvironment_disappears(t *testing.T) { ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfmwaa.ResourceEnvironment(), resourceName), ), ExpectNonEmptyPlan: true, @@ -119,19 +117,19 @@ func TestAccMWAAEnvironment_disappears(t *testing.T) { func TestAccMWAAEnvironment_airflowOptions(t *testing.T) { ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_airflowOptions(rName, "1", "16"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.%", "2"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.default_task_retries", "1"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.parallelism", "16"), @@ -145,7 +143,7 @@ func TestAccMWAAEnvironment_airflowOptions(t *testing.T) { { Config: testAccEnvironmentConfig_airflowOptions(rName, "2", "32"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.%", "2"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.default_task_retries", "2"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.parallelism", "32"), @@ -154,7 +152,7 @@ func TestAccMWAAEnvironment_airflowOptions(t *testing.T) { { Config: testAccEnvironmentConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.%", "0"), ), }, @@ -165,19 +163,19 @@ func TestAccMWAAEnvironment_airflowOptions(t *testing.T) { func TestAccMWAAEnvironment_log(t *testing.T) { ctx := acctest.Context(t) var environment1, environment2 awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_logging(rName, acctest.CtTrue, string(awstypes.LoggingLevelCritical)), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment1), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment1), resource.TestCheckResourceAttr(resourceName, "logging_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "logging_configuration.0.dag_processing_logs.#", "1"), @@ -214,7 +212,7 @@ func TestAccMWAAEnvironment_log(t *testing.T) { { Config: testAccEnvironmentConfig_logging(rName, acctest.CtFalse, string(awstypes.LoggingLevelInfo)), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment2), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment2), testAccCheckEnvironmentNotRecreated(&environment2, &environment1), resource.TestCheckResourceAttr(resourceName, "logging_configuration.#", "1"), @@ -251,19 +249,19 @@ func TestAccMWAAEnvironment_log(t *testing.T) { func TestAccMWAAEnvironment_full(t *testing.T) { ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_full(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.%", "2"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.default_task_retries", "1"), resource.TestCheckResourceAttr(resourceName, "airflow_configuration_options.core.parallelism", "16"), @@ -329,20 +327,20 @@ func TestAccMWAAEnvironment_full(t *testing.T) { func TestAccMWAAEnvironment_pluginsS3ObjectVersion(t *testing.T) { ctx := acctest.Context(t) var environment1, environment2 awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" s3ObjectResourceName := "aws_s3_object.plugins" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_pluginsS3ObjectVersion(rName, "test"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment1), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment1), resource.TestCheckResourceAttrPair(resourceName, "plugins_s3_object_version", s3ObjectResourceName, "version_id"), ), }, @@ -354,7 +352,7 @@ func TestAccMWAAEnvironment_pluginsS3ObjectVersion(t *testing.T) { { Config: testAccEnvironmentConfig_pluginsS3ObjectVersion(rName, "test-updated"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment2), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment2), testAccCheckEnvironmentNotRecreated(&environment2, &environment1), resource.TestCheckResourceAttrPair(resourceName, "plugins_s3_object_version", s3ObjectResourceName, "version_id"), ), @@ -371,19 +369,19 @@ func TestAccMWAAEnvironment_pluginsS3ObjectVersion(t *testing.T) { func TestAccMWAAEnvironment_customerVPCE(t *testing.T) { ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_customerVPCE(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttrSet(resourceName, "airflow_version"), acctest.CheckResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "airflow", "environment/"+rName), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreatedAt), @@ -443,19 +441,19 @@ func TestAccMWAAEnvironment_updateAirflowVersionMinor(t *testing.T) { ctx := acctest.Context(t) var environment1, environment2 awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_airflowVersion(rName, "2.4.3"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment1), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment1), resource.TestCheckResourceAttr(resourceName, "airflow_version", "2.4.3"), ), }, @@ -467,7 +465,7 @@ func TestAccMWAAEnvironment_updateAirflowVersionMinor(t *testing.T) { { Config: testAccEnvironmentConfig_airflowVersion(rName, "2.5.1"), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment2), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment2), testAccCheckEnvironmentNotRecreated(&environment2, &environment1), resource.TestCheckResourceAttr(resourceName, "airflow_version", "2.5.1"), ), @@ -483,19 +481,19 @@ func TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy(t *testing.T) ctx := acctest.Context(t) var environment awstypes.Environment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_mwaa_environment.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.MWAAServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEnvironmentDestroy(ctx), + CheckDestroy: testAccCheckEnvironmentDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEnvironmentConfig_airflowWorkerReplacementStrategy(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, "worker_replacement_strategy", "FORCED"), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -519,7 +517,7 @@ func TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy(t *testing.T) { Config: testAccEnvironmentConfig_airflowWorkerReplacementStrategy(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckEnvironmentExists(ctx, resourceName, &environment), + testAccCheckEnvironmentExists(ctx, t, resourceName, &environment), ), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -537,7 +535,7 @@ func TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy(t *testing.T) }) } -func testAccCheckEnvironmentExists(ctx context.Context, n string, v *awstypes.Environment) resource.TestCheckFunc { +func testAccCheckEnvironmentExists(ctx context.Context, t *testing.T, n string, v *awstypes.Environment) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -548,7 +546,7 @@ func testAccCheckEnvironmentExists(ctx context.Context, n string, v *awstypes.En return fmt.Errorf("No MWAA Environment ID is set") } - conn := acctest.Provider.Meta().(*conns.AWSClient).MWAAClient(ctx) + conn := acctest.ProviderMeta(ctx, t).MWAAClient(ctx) output, err := tfmwaa.FindEnvironmentByName(ctx, conn, rs.Primary.ID) @@ -562,9 +560,9 @@ func testAccCheckEnvironmentExists(ctx context.Context, n string, v *awstypes.En } } -func testAccCheckEnvironmentDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckEnvironmentDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).MWAAClient(ctx) + conn := acctest.ProviderMeta(ctx, t).MWAAClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_mwaa_environment" { @@ -573,7 +571,7 @@ func testAccCheckEnvironmentDestroy(ctx context.Context) resource.TestCheckFunc _, err := tfmwaa.FindEnvironmentByName(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } diff --git a/internal/service/neptunegraph/graph.go b/internal/service/neptunegraph/graph.go index 713c9afca869..3e7cdd008b17 100644 --- a/internal/service/neptunegraph/graph.go +++ b/internal/service/neptunegraph/graph.go @@ -26,7 +26,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-provider-aws/internal/create" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" @@ -34,6 +33,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/framework" fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" @@ -243,7 +243,7 @@ func (r *graphResource) Read(ctx context.Context, request resource.ReadRequest, output, err := findGraphByID(ctx, conn, data.ID.ValueString()) - if tfresource.NotFound(err) { + if retry.NotFound(err) { response.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) response.State.RemoveResource(ctx) @@ -359,8 +359,7 @@ func findGraph(ctx context.Context, conn *neptunegraph.Client, input *neptunegra if errs.IsA[*awstypes.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -375,8 +374,8 @@ func findGraph(ctx context.Context, conn *neptunegraph.Client, input *neptunegra return output, nil } -func statusGraph(ctx context.Context, conn *neptunegraph.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusGraph(conn *neptunegraph.Client, id string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := findGraphByID(ctx, conn, id) if tfresource.NotFound(err) { @@ -395,7 +394,7 @@ func waitGraphCreated(ctx context.Context, conn *neptunegraph.Client, id string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.GraphStatusCreating), Target: enum.Slice(awstypes.GraphStatusAvailable), - Refresh: statusGraph(ctx, conn, id), + Refresh: statusGraph(conn, id), Timeout: timeout, ContinuousTargetOccurence: 2, } @@ -403,7 +402,7 @@ func waitGraphCreated(ctx context.Context, conn *neptunegraph.Client, id string, outputRaw, err := stateConf.WaitForStateContext(ctx) if output, ok := outputRaw.(*neptunegraph.GetGraphOutput); ok { - tfresource.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) + retry.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) return output, err } @@ -415,7 +414,7 @@ func waitGraphUpdated(ctx context.Context, conn *neptunegraph.Client, id string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.GraphStatusUpdating), Target: enum.Slice(awstypes.GraphStatusAvailable), - Refresh: statusGraph(ctx, conn, id), + Refresh: statusGraph(conn, id), Timeout: timeout, ContinuousTargetOccurence: 2, } @@ -423,7 +422,7 @@ func waitGraphUpdated(ctx context.Context, conn *neptunegraph.Client, id string, outputRaw, err := stateConf.WaitForStateContext(ctx) if output, ok := outputRaw.(*neptunegraph.GetGraphOutput); ok { - tfresource.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) + retry.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) return output, err } @@ -438,7 +437,7 @@ func waitGraphDeleted(ctx context.Context, conn *neptunegraph.Client, id string, stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.GraphStatusDeleting), Target: []string{}, - Refresh: statusGraph(ctx, conn, id), + Refresh: statusGraph(conn, id), Delay: delay, Timeout: timeout, } @@ -446,7 +445,7 @@ func waitGraphDeleted(ctx context.Context, conn *neptunegraph.Client, id string, outputRaw, err := stateConf.WaitForStateContext(ctx) if output, ok := outputRaw.(*neptunegraph.GetGraphOutput); ok { - tfresource.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) + retry.SetLastError(err, errors.New(aws.ToString(output.StatusReason))) return output, err } diff --git a/internal/service/neptunegraph/graph_test.go b/internal/service/neptunegraph/graph_test.go index a2f171f39aea..0be2570ff7bf 100644 --- a/internal/service/neptunegraph/graph_test.go +++ b/internal/service/neptunegraph/graph_test.go @@ -10,14 +10,12 @@ import ( "github.com/YakDriver/regexache" "github.com/aws/aws-sdk-go-v2/service/neptunegraph" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfneptunegraph "github.com/hashicorp/terraform-provider-aws/internal/service/neptunegraph" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -28,21 +26,21 @@ func TestAccNeptuneGraphGraph_basic(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.NeptuneGraphServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_basic(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, "graph_name", rName), resource.TestCheckResourceAttr(resourceName, "provisioned_memory", "16"), resource.TestCheckResourceAttr(resourceName, "public_connectivity", acctest.CtFalse), @@ -68,22 +66,22 @@ func TestAccNeptuneGraphGraph_disappears(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_basic(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfneptunegraph.ResourceGraph, resourceName), ), ExpectNonEmptyPlan: true, @@ -99,22 +97,22 @@ func TestAccNeptuneGraphGraph_vectorSearch(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_vectorSearch(rName, 128), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, "vector_search_configuration.0.vector_search_dimension", "128"), ), }, @@ -129,23 +127,23 @@ func TestAccNeptuneGraphGraph_kmsKey(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" keyResourceName := "aws_kms_key.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_kmsKey(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttrPair(resourceName, "kms_key_identifier", keyResourceName, names.AttrARN), ), }, @@ -160,22 +158,22 @@ func TestAccNeptuneGraphGraph_deletionProtection(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_deletionProtection(rName, true), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, acctest.CtTrue), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -187,7 +185,7 @@ func TestAccNeptuneGraphGraph_deletionProtection(t *testing.T) { { Config: testAccGraphConfig_deletionProtection(rName, false), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, acctest.CtFalse), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -209,19 +207,19 @@ func TestAccNeptuneGraphGraph_nameGenerated(t *testing.T) { var graph neptunegraph.GetGraphOutput resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_nameGenerated(), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttrSet(resourceName, "graph_name"), ), }, @@ -238,19 +236,19 @@ func TestAccNeptuneGraphGraph_namePrefix(t *testing.T) { var graph neptunegraph.GetGraphOutput resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_namePrefix("tf-acc-test-prefix-"), Check: resource.ComposeTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), acctest.CheckResourceAttrNameFromPrefix(resourceName, "graph_name", "tf-acc-test-prefix-"), resource.TestCheckResourceAttr(resourceName, "graph_name_prefix", "tf-acc-test-prefix-"), ), @@ -272,22 +270,22 @@ func TestAccNeptuneGraphGraph_tags(t *testing.T) { } var graph neptunegraph.GetGraphOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_neptunegraph_graph.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.AttrID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGraphDestroy(ctx), + CheckDestroy: testAccCheckGraphDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccGraphConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -301,7 +299,7 @@ func TestAccNeptuneGraphGraph_tags(t *testing.T) { { Config: testAccGraphConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -310,7 +308,7 @@ func TestAccNeptuneGraphGraph_tags(t *testing.T) { { Config: testAccGraphConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckGraphExists(ctx, resourceName, &graph), + testAccCheckGraphExists(ctx, t, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), ), @@ -319,9 +317,9 @@ func TestAccNeptuneGraphGraph_tags(t *testing.T) { }) } -func testAccCheckGraphDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckGraphDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).NeptuneGraphClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NeptuneGraphClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_neptunegraph_graph" { @@ -330,7 +328,7 @@ func testAccCheckGraphDestroy(ctx context.Context) resource.TestCheckFunc { _, err := tfneptunegraph.FindGraphByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -345,14 +343,14 @@ func testAccCheckGraphDestroy(ctx context.Context) resource.TestCheckFunc { } } -func testAccCheckGraphExists(ctx context.Context, n string, v *neptunegraph.GetGraphOutput) resource.TestCheckFunc { +func testAccCheckGraphExists(ctx context.Context, t *testing.T, n string, v *neptunegraph.GetGraphOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).NeptuneGraphClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NeptuneGraphClient(ctx) output, err := tfneptunegraph.FindGraphByID(ctx, conn, rs.Primary.ID) @@ -367,7 +365,7 @@ func testAccCheckGraphExists(ctx context.Context, n string, v *neptunegraph.GetG } func testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).NeptuneGraphClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NeptuneGraphClient(ctx) var input neptunegraph.ListGraphsInput _, err := conn.ListGraphs(ctx, &input) diff --git a/internal/service/notificationscontacts/email_contact.go b/internal/service/notificationscontacts/email_contact.go index 760140c4220b..d196161c5a96 100644 --- a/internal/service/notificationscontacts/email_contact.go +++ b/internal/service/notificationscontacts/email_contact.go @@ -19,11 +19,11 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" "github.com/hashicorp/terraform-provider-aws/internal/framework" fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" @@ -125,7 +125,7 @@ func (r *emailContactResource) Read(ctx context.Context, request resource.ReadRe arn := fwflex.StringValueFromFramework(ctx, data.ARN) output, err := findEmailContactByARN(ctx, conn, arn) - if tfresource.NotFound(err) { + if retry.NotFound(err) { response.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) response.State.RemoveResource(ctx) @@ -185,8 +185,7 @@ func findEmailContactByARN(ctx context.Context, conn *notificationscontacts.Clie if errs.IsA[*awstypes.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, + LastError: err, } } diff --git a/internal/service/notificationscontacts/email_contact_test.go b/internal/service/notificationscontacts/email_contact_test.go index 8d1159afb5b6..3408beb63473 100644 --- a/internal/service/notificationscontacts/email_contact_test.go +++ b/internal/service/notificationscontacts/email_contact_test.go @@ -11,7 +11,6 @@ import ( "github.com/YakDriver/regexache" "github.com/aws/aws-sdk-go-v2/service/notificationscontacts" awstypes "github.com/aws/aws-sdk-go-v2/service/notificationscontacts/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/knownvalue" "github.com/hashicorp/terraform-plugin-testing/plancheck" @@ -20,20 +19,19 @@ import ( "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" "github.com/hashicorp/terraform-provider-aws/internal/acctest" tfknownvalue "github.com/hashicorp/terraform-provider-aws/internal/acctest/knownvalue" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfnotificationscontacts "github.com/hashicorp/terraform-provider-aws/internal/service/notificationscontacts" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) func TestAccNotificationsContactsEmailContact_basic(t *testing.T) { ctx := acctest.Context(t) var emailcontact awstypes.EmailContact - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rEmailAddress := acctest.RandomEmailAddress(acctest.RandomDomainName()) resourceName := "aws_notificationscontacts_email_contact.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, names.NotificationsContactsEndpointID) @@ -41,12 +39,12 @@ func TestAccNotificationsContactsEmailContact_basic(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.NotificationsContactsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEmailContactDestroy(ctx), + CheckDestroy: testAccCheckEmailContactDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEmailContactConfig_basic(rName, rEmailAddress), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckEmailContactExists(ctx, resourceName, &emailcontact), + testAccCheckEmailContactExists(ctx, t, resourceName, &emailcontact), ), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -74,11 +72,11 @@ func TestAccNotificationsContactsEmailContact_basic(t *testing.T) { func TestAccNotificationsContactsEmailContact_disappears(t *testing.T) { ctx := acctest.Context(t) var emailcontact awstypes.EmailContact - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rEmailAddress := acctest.RandomEmailAddress(acctest.RandomDomainName()) resourceName := "aws_notificationscontacts_email_contact.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, names.NotificationsContactsEndpointID) @@ -86,12 +84,12 @@ func TestAccNotificationsContactsEmailContact_disappears(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.NotificationsContactsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEmailContactDestroy(ctx), + CheckDestroy: testAccCheckEmailContactDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEmailContactConfig_basic(rName, rEmailAddress), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckEmailContactExists(ctx, resourceName, &emailcontact), + testAccCheckEmailContactExists(ctx, t, resourceName, &emailcontact), acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfnotificationscontacts.ResourceEmailContact, resourceName), ), ExpectNonEmptyPlan: true, @@ -108,11 +106,11 @@ func TestAccNotificationsContactsEmailContact_disappears(t *testing.T) { func TestAccNotificationsContactsEmailContact_tags(t *testing.T) { ctx := acctest.Context(t) var v awstypes.EmailContact - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rEmailAddress := acctest.RandomEmailAddress(acctest.RandomDomainName()) resourceName := "aws_notificationscontacts_email_contact.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, names.NotificationsContactsEndpointID) @@ -120,12 +118,12 @@ func TestAccNotificationsContactsEmailContact_tags(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.NotificationsContactsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEmailContactDestroy(ctx), + CheckDestroy: testAccCheckEmailContactDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEmailContactConfig_tags1(rName, rEmailAddress, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckEmailContactExists(ctx, resourceName, &v), + testAccCheckEmailContactExists(ctx, t, resourceName, &v), ), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -148,7 +146,7 @@ func TestAccNotificationsContactsEmailContact_tags(t *testing.T) { { Config: testAccEmailContactConfig_tags2(rName, rEmailAddress, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckEmailContactExists(ctx, resourceName, &v), + testAccCheckEmailContactExists(ctx, t, resourceName, &v), ), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -165,7 +163,7 @@ func TestAccNotificationsContactsEmailContact_tags(t *testing.T) { { Config: testAccEmailContactConfig_tags1(rName, rEmailAddress, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckEmailContactExists(ctx, resourceName, &v), + testAccCheckEmailContactExists(ctx, t, resourceName, &v), ), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -182,9 +180,9 @@ func TestAccNotificationsContactsEmailContact_tags(t *testing.T) { }) } -func testAccCheckEmailContactDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckEmailContactDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).NotificationsContactsClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NotificationsContactsClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_notificationscontacts_email_contact" { @@ -193,7 +191,7 @@ func testAccCheckEmailContactDestroy(ctx context.Context) resource.TestCheckFunc _, err := tfnotificationscontacts.FindEmailContactByARN(ctx, conn, rs.Primary.Attributes[names.AttrARN]) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -208,14 +206,14 @@ func testAccCheckEmailContactDestroy(ctx context.Context) resource.TestCheckFunc } } -func testAccCheckEmailContactExists(ctx context.Context, n string, v *awstypes.EmailContact) resource.TestCheckFunc { +func testAccCheckEmailContactExists(ctx context.Context, t *testing.T, n string, v *awstypes.EmailContact) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).NotificationsContactsClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NotificationsContactsClient(ctx) output, err := tfnotificationscontacts.FindEmailContactByARN(ctx, conn, rs.Primary.Attributes[names.AttrARN]) @@ -230,7 +228,7 @@ func testAccCheckEmailContactExists(ctx context.Context, n string, v *awstypes.E } func testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).NotificationsContactsClient(ctx) + conn := acctest.ProviderMeta(ctx, t).NotificationsContactsClient(ctx) var input notificationscontacts.ListEmailContactsInput diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go index 172ffd5f3831..7e33f69285d0 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go @@ -109,7 +109,7 @@ func (autonomousVMClusterDSTest) avmcBasic() string { %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -122,7 +122,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { total_container_databases = 1 cpu_core_count_per_node = 40 license_model = "LICENSE_INCLUDED" - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window { diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go index b9ef4784286e..31e3202f4272 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_test.go @@ -279,7 +279,7 @@ func (autonomousVMClusterResourceTest) avmcBasic() string { %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -292,7 +292,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { total_container_databases = 1 cpu_core_count_per_node = 40 license_model = "LICENSE_INCLUDED" - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window { @@ -322,7 +322,7 @@ func (autonomousVMClusterResourceTest) avmcNoTagWithTag() (string, string) { %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -335,7 +335,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { total_container_databases = 1 cpu_core_count_per_node = 40 license_model = "LICENSE_INCLUDED" - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window { @@ -353,7 +353,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -366,7 +366,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { total_container_databases = 1 cpu_core_count_per_node = 40 license_model = "LICENSE_INCLUDED" - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window { @@ -399,7 +399,7 @@ func (autonomousVMClusterResourceTest) avmcAllParamsConfig() string { %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -414,7 +414,7 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { total_container_databases = 1 cpu_core_count_per_node = 40 license_model = "LICENSE_INCLUDED" - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window { diff --git a/internal/service/odb/cloud_vm_cluster_data_source_test.go b/internal/service/odb/cloud_vm_cluster_data_source_test.go index dcd72b9d8d5c..10f9988ca0cb 100644 --- a/internal/service/odb/cloud_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_vm_cluster_data_source_test.go @@ -150,7 +150,7 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" { } } -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -166,7 +166,7 @@ resource "aws_odb_cloud_vm_cluster" "test" { is_sparse_diskgroup_enabled = true license_model = "LICENSE_INCLUDED" data_storage_size_in_tbs = 20.0 - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] db_node_storage_size_in_gbs = 120.0 memory_size_in_gbs = 60 data_collection_options { diff --git a/internal/service/odb/cloud_vm_cluster_test.go b/internal/service/odb/cloud_vm_cluster_test.go index 118f1e298f59..6f8d5ec35f2f 100644 --- a/internal/service/odb/cloud_vm_cluster_test.go +++ b/internal/service/odb/cloud_vm_cluster_test.go @@ -267,7 +267,7 @@ func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigBasic(vmClusterDisp %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -283,7 +283,7 @@ resource "aws_odb_cloud_vm_cluster" "test" { is_sparse_diskgroup_enabled = true license_model = "LICENSE_INCLUDED" data_storage_size_in_tbs = 20.0 - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] db_node_storage_size_in_gbs = 120.0 memory_size_in_gbs = 60 data_collection_options { @@ -309,7 +309,7 @@ func (cloudVmClusterResourceTest) cloudVmClusterWithAllParameters(vmClusterDispl %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -325,7 +325,7 @@ resource "aws_odb_cloud_vm_cluster" "test" { is_sparse_diskgroup_enabled = true license_model = "LICENSE_INCLUDED" data_storage_size_in_tbs = 20.0 - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] db_node_storage_size_in_gbs = 120.0 memory_size_in_gbs = 60 cluster_name = "julia-13" @@ -354,7 +354,7 @@ func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigUpdatedTags(vmClust %s -data "aws_odb_db_servers_list" "test" { +data "aws_odb_db_servers" "test" { cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id } @@ -370,7 +370,7 @@ resource "aws_odb_cloud_vm_cluster" "test" { is_sparse_diskgroup_enabled = true license_model = "LICENSE_INCLUDED" data_storage_size_in_tbs = 20.0 - db_servers = [for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] db_node_storage_size_in_gbs = 120.0 memory_size_in_gbs = 60 data_collection_options { diff --git a/internal/service/odb/db_node_data_source.go b/internal/service/odb/db_node_data_source.go new file mode 100644 index 000000000000..a5c81ebca947 --- /dev/null +++ b/internal/service/odb/db_node_data_source.go @@ -0,0 +1,213 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkDataSource("aws_odb_db_node", name="Db Node") +func newDataSourceDBNode(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbNode{}, nil +} + +const ( + DSNameDBNode = "DB Node Data Source" +) + +type dataSourceDbNode struct { + framework.DataSourceWithModel[dbNodeDataSourceModel] +} + +func (d *dataSourceDbNode) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: schema.StringAttribute{ + Required: true, + }, + "cloud_vm_cluster_id": schema.StringAttribute{ + Required: true, + }, + names.AttrStatus: schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Description: "The current status of the DB node.", + }, + names.AttrStatusReason: schema.StringAttribute{ + Computed: true, + Description: "Additional information about the status of the DB node.", + }, + "additional_details": schema.StringAttribute{ + Computed: true, + Description: "Additional information about the planned maintenance.", + }, + "backup_ip_id": schema.StringAttribute{ + Computed: true, + Description: "The Oracle Cloud ID (OCID) of the backup IP address that's associated with the DB node.", + }, + "backup_vnic2_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the second backup VNIC.", + }, + "backup_vnic_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the backup VNIC.", + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + Description: "Number of CPU cores enabled on the DB node.", + }, + "db_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The amount of local node storage, in gigabytes (GBs), allocated on the DB node.", + }, + "db_server_id": schema.StringAttribute{ + Computed: true, + Description: "The unique identifier of the DB server that is associated with the DB node.", + }, + "db_system_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the DB system.", + }, + "fault_domain": schema.StringAttribute{ + Computed: true, + Description: "The name of the fault domain the instance is contained in.", + }, + "host_ip_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the host IP address that's associated with the DB node.", + }, + "hostname": schema.StringAttribute{ + Computed: true, + Description: "The host name for the DB node.", + }, + "ocid": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the DB node.", + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + Description: "The name of the OCI resource anchor for the DB node.", + }, + "maintenance_type": schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.DbNodeMaintenanceType](), + Description: "The type of database node maintenance. Either VMDB_REBOOT_MIGRATION or EXADBXS_REBOOT_MIGRATION.", + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The allocated memory in GBs on the DB node.", + }, + "software_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The size (in GB) of the block storage volume allocation for the DB system.", + }, + names.AttrCreatedAt: schema.StringAttribute{ + CustomType: timetypes.RFC3339Type{}, + Computed: true, + Description: "The date and time when the DB node was created.", + }, + "time_maintenance_window_end": schema.StringAttribute{ + Computed: true, + Description: "End date and time of maintenance window.", + }, + "time_maintenance_window_start": schema.StringAttribute{ + Computed: true, + Description: "Start date and time of maintenance window.", + }, + "total_cpu_core_count": schema.Int32Attribute{ + Computed: true, + Description: "The total number of CPU cores reserved on the DB node.", + }, + "vnic2_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the second VNIC.", + }, + "vnic_id": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the VNIC.", + }, + "private_ip_address": schema.StringAttribute{ + Computed: true, + Description: "The private IP address assigned to the DB node.", + }, + "floating_ip_address": schema.StringAttribute{ + Computed: true, + Description: "The floating IP address assigned to the DB node.", + }, + }, + } +} + +func (d *dataSourceDbNode) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + var data dbNodeDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.GetDbNodeInput{ + DbNodeId: data.DbNodeId.ValueStringPointer(), + CloudVmClusterId: data.CloudVmClusterId.ValueStringPointer(), + } + out, err := conn.GetDbNode(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDBNode, data.DbNodeId.ValueString(), err), + err.Error(), + ) + return + } + resp.Diagnostics.Append(flex.Flatten(ctx, out.DbNode, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbNodeDataSourceModel struct { + framework.WithRegionModel + CloudVmClusterId types.String `tfsdk:"cloud_vm_cluster_id"` + DbNodeId types.String `tfsdk:"id"` + DbNodeArn types.String `tfsdk:"arn"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + AdditionalDetails types.String `tfsdk:"additional_details"` + BackupIpId types.String `tfsdk:"backup_ip_id"` + BackupVnic2Id types.String `tfsdk:"backup_vnic2_id"` + BackupVnicId types.String `tfsdk:"backup_vnic_id"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_storage_size_in_gbs"` + DbServerId types.String `tfsdk:"db_server_id"` + DbSystemId types.String `tfsdk:"db_system_id"` + FaultDomain types.String `tfsdk:"fault_domain"` + HostIpId types.String `tfsdk:"host_ip_id"` + Hostname types.String `tfsdk:"hostname"` + Ocid types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + MaintenanceType fwtypes.StringEnum[odbtypes.DbNodeMaintenanceType] `tfsdk:"maintenance_type"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + SoftwareStorageSizeInGB types.Int32 `tfsdk:"software_storage_size_in_gbs"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` + TimeMaintenanceWindowEnd types.String `tfsdk:"time_maintenance_window_end"` + TimeMaintenanceWindowStart types.String `tfsdk:"time_maintenance_window_start"` + TotalCpuCoreCount types.Int32 `tfsdk:"total_cpu_core_count"` + Vnic2Id types.String `tfsdk:"vnic2_id"` + VnicId types.String `tfsdk:"vnic_id"` + PrivateIpAddress types.String `tfsdk:"private_ip_address"` + FloatingIpAddress types.String `tfsdk:"floating_ip_address"` +} diff --git a/internal/service/odb/db_node_data_source_test.go b/internal/service/odb/db_node_data_source_test.go new file mode 100644 index 000000000000..ca90b6016b3b --- /dev/null +++ b/internal/service/odb/db_node_data_source_test.go @@ -0,0 +1,214 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type testDbNodeDataSourceTest struct { + exaDisplayNamePrefix string + oracleDBNetworkDisplayNamePrefix string + vmClusterDisplayNamePrefix string +} + +var dbNodeDataSourceTestEntity = testDbNodeDataSourceTest{ + exaDisplayNamePrefix: "Ofake-exa", + oracleDBNetworkDisplayNamePrefix: "odb-net", + vmClusterDisplayNamePrefix: "Ofake-vmc", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDBNodeDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + var dbNode odb.GetDbNodeOutput + dataSourceName := "data.aws_odb_db_node.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbNodeDataSourceTestEntity.testAccCheckDBNodeDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbNodeDataSourceTestEntity.dbNodeDataSourceBasicConfig(publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + dbNodeDataSourceTestEntity.testAccCheckDBNodeExists(ctx, dataSourceName, &dbNode), + ), + }, + }, + }) +} + +func (testDbNodeDataSourceTest) testAccCheckDBNodeExists(ctx context.Context, name string, output *odb.GetDbNodeOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBServer, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var dbNodeId = rs.Primary.ID + var attributes = rs.Primary.Attributes + cloudVmClusterId := attributes["cloud_vm_cluster_id"] + input := odb.GetDbNodeInput{ + CloudVmClusterId: &cloudVmClusterId, + DbNodeId: &dbNodeId, + } + resp, err := conn.GetDbNode(ctx, &input) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBNode, rs.Primary.ID, err) + } + *output = *resp + return nil + } +} + +func (testDbNodeDataSourceTest) testAccCheckDBNodeDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_vm_cluster" { + continue + } + err := dbNodeDataSourceTestEntity.findVmCluster(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServer, rs.Primary.ID, err) + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServer, rs.Primary.ID, errors.New("not destroyed")) + } + return nil + } +} + +func (testDbNodeDataSourceTest) findVmCluster(ctx context.Context, conn *odb.Client, id string) error { + input := odb.GetCloudVmClusterInput{ + CloudVmClusterId: aws.String(id), + } + output, err := conn.GetCloudVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return err + } + if output == nil || output.CloudVmCluster == nil { + return tfresource.NewEmptyResultError(&input) + } + return nil +} + +func (testDbNodeDataSourceTest) dbNodeDataSourceBasicConfig(publicKey string) string { + vmClusterConfig := dbNodeDataSourceTestEntity.vmClusterBasicConfig(publicKey) + + return fmt.Sprintf(` +%s + +data "aws_odb_db_nodes" "test" { + cloud_vm_cluster_id = aws_odb_cloud_vm_cluster.test.id +} + +data "aws_odb_db_node" "test" { + id = data.aws_odb_db_nodes.test.db_nodes[0].id + cloud_vm_cluster_id = aws_odb_cloud_vm_cluster.test.id +} + +`, vmClusterConfig) +} + +func (testDbNodeDataSourceTest) vmClusterBasicConfig(publicKey string) string { + exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.exaDisplayNamePrefix) + oracleDBNetDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.oracleDBNetworkDisplayNamePrefix) + vmcDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.vmClusterDisplayNamePrefix) + dsTfCodeVmCluster := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[2]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window { + custom_action_timeout_in_mins = 16 + is_custom_action_timeout_enabled = true + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + } +} + +data "aws_odb_db_servers" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = ["%[4]s"] + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + data_collection_options { + is_diagnostics_events_enabled = false + is_health_monitoring_enabled = false + is_incident_logs_enabled = false + } + tags = { + "env" = "dev" + } + +} + +`, oracleDBNetDisplayName, exaInfraDisplayName, vmcDisplayName, publicKey) + return dsTfCodeVmCluster +} diff --git a/internal/service/odb/db_nodes_data_source.go b/internal/service/odb/db_nodes_data_source.go new file mode 100644 index 000000000000..50ce75ac6c29 --- /dev/null +++ b/internal/service/odb/db_nodes_data_source.go @@ -0,0 +1,114 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkDataSource("aws_odb_db_nodes", name="Db Nodes") +func newDataSourceDBNodes(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbNodesList{}, nil +} + +const ( + DSNameDBNodesList = "DB Nodes List Data Source" +) + +type dataSourceDbNodesList struct { + framework.DataSourceWithModel[dbNodesListDataSourceModel] +} + +func (d *dataSourceDbNodesList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_vm_cluster_id": schema.StringAttribute{ + Required: true, + Description: "Id of the cloud VM cluster. The unique identifier of the VM cluster.", + }, + "db_nodes": schema.ListAttribute{ + CustomType: fwtypes.NewListNestedObjectTypeOf[dbNodeForDbNodesListDataSourceModel](ctx), + Computed: true, + Description: "The list of DB nodes along with their properties.", + }, + }, + } +} + +func (d *dataSourceDbNodesList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + var data dbNodesListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.ListDbNodesInput{ + CloudVmClusterId: data.CloudVmClusterId.ValueStringPointer(), + } + var out odb.ListDbNodesOutput + paginator := odb.NewListDbNodesPaginator(conn, &input) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDBNodesList, data.CloudVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + out.DbNodes = append(out.DbNodes, page.DbNodes...) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbNodesListDataSourceModel struct { + framework.WithRegionModel + CloudVmClusterId types.String `tfsdk:"cloud_vm_cluster_id"` + DbNodes fwtypes.ListNestedObjectValueOf[dbNodeForDbNodesListDataSourceModel] `tfsdk:"db_nodes"` +} + +type dbNodeForDbNodesListDataSourceModel struct { + AdditionalDetails types.String `tfsdk:"additional_details"` + BackupIpId types.String `tfsdk:"backup_ip_id"` + BackupVnic2Id types.String `tfsdk:"backup_vnic2_id"` + BackupVnicId types.String `tfsdk:"backup_vnic_id"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` + DbNodeArn types.String `tfsdk:"arn"` + DbNodeId types.String `tfsdk:"id"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size"` + DbServerId types.String `tfsdk:"db_server_id"` + DbSystemId types.String `tfsdk:"db_system_id"` + FaultDomain types.String `tfsdk:"fault_domain"` + HostIpId types.String `tfsdk:"host_ip_id"` + Hostname types.String `tfsdk:"hostname"` + MaintenanceType fwtypes.StringEnum[odbtypes.DbNodeMaintenanceType] `tfsdk:"maintenance_type"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + Ocid types.String `tfsdk:"ocid"` + SoftwareStorageSizeInGB types.Int32 `tfsdk:"software_storage_size"` + Status fwtypes.StringEnum[odbtypes.DbNodeResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + TimeMaintenanceWindowEnd types.String `tfsdk:"time_maintenance_window_end"` + TimeMaintenanceWindowStart types.String `tfsdk:"time_maintenance_window_start"` + TotalCpuCoreCount types.Int32 `tfsdk:"total_cpu_core_count"` + Vnic2Id types.String `tfsdk:"vnic2_id"` + VnicId types.String `tfsdk:"vnic_id"` +} diff --git a/internal/service/odb/db_nodes_data_source_test.go b/internal/service/odb/db_nodes_data_source_test.go new file mode 100644 index 000000000000..eda223f69cb9 --- /dev/null +++ b/internal/service/odb/db_nodes_data_source_test.go @@ -0,0 +1,211 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type dbNodesListDataSourceTest struct { + exadataInfraDisplayNamePrefix string + oracleDBNetworkDisplayNamePrefix string + vmClusterDisplayNamePrefix string +} + +var dbNodesListDataSourceTestEntity = dbNodesListDataSourceTest{ + exadataInfraDisplayNamePrefix: "Ofake-exa", + oracleDBNetworkDisplayNamePrefix: "odbn", + vmClusterDisplayNamePrefix: "Ofake-vmc", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDBNodesListDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + var dbNodesList odb.ListDbNodesOutput + dbNodesListsDataSourceName := "data.aws_odb_db_nodes.test" + vmClusterListsResourceName := "aws_odb_cloud_vm_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbNodesListDataSourceTestEntity.testAccCheckDBNodesDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbNodesListDataSourceTestEntity.basicDBNodesListDataSource(publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + dbNodesListDataSourceTestEntity.testAccCheckDBNodesListExists(ctx, vmClusterListsResourceName, &dbNodesList), + resource.TestCheckResourceAttr(dbNodesListsDataSourceName, "aws_odb_db_nodes.db_nodes.#", strconv.Itoa(len(dbNodesList.DbNodes))), + ), + }, + }, + }) +} + +func (dbNodesListDataSourceTest) testAccCheckDBNodesListExists(ctx context.Context, name string, output *odb.ListDbNodesOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBNodesList, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var vmClusterId = &rs.Primary.ID + input := odb.ListDbNodesInput{ + CloudVmClusterId: vmClusterId, + } + lisOfDbNodes := odb.ListDbNodesOutput{} + paginator := odb.NewListDbNodesPaginator(conn, &input) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return err + } + lisOfDbNodes.DbNodes = append(lisOfDbNodes.DbNodes, page.DbNodes...) + } + *output = lisOfDbNodes + return nil + } +} + +func (dbNodesListDataSourceTest) testAccCheckDBNodesDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_vm_cluster" { + continue + } + _, err := dbNodesListDataSourceTestEntity.findVmCluster(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServersList, rs.Primary.ID, err) + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServersList, rs.Primary.ID, errors.New("not destroyed")) + } + return nil + } +} + +func (dbNodesListDataSourceTest) findVmCluster(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudVmCluster, error) { + input := odb.GetCloudVmClusterInput{ + CloudVmClusterId: aws.String(id), + } + output, err := conn.GetCloudVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + if output == nil || output.CloudVmCluster == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + return output.CloudVmCluster, nil +} + +func (dbNodesListDataSourceTest) basicDBNodesListDataSource(publicKey string) string { + vmCluster := dbNodesListDataSourceTestEntity.vmClusterBasic(publicKey) + return fmt.Sprintf(` + + %s + +data "aws_odb_db_nodes" "test" { + cloud_vm_cluster_id = aws_odb_cloud_vm_cluster.test.id +} +`, vmCluster) +} + +func (dbNodesListDataSourceTest) vmClusterBasic(publicKey string) string { + odbNetRName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.oracleDBNetworkDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.exadataInfraDisplayNamePrefix) + vmcDisplayName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.vmClusterDisplayNamePrefix) + return fmt.Sprintf(` + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[2]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window { + custom_action_timeout_in_mins = 16 + is_custom_action_timeout_enabled = true + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + } +} + +data "aws_odb_db_servers" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = ["%[4]s"] + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [for db_server in data.aws_odb_db_servers.test.db_servers : db_server.id] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + data_collection_options { + is_diagnostics_events_enabled = false + is_health_monitoring_enabled = false + is_incident_logs_enabled = false + } + tags = { + "env" = "dev" + } + +} +`, odbNetRName, exaInfraRName, vmcDisplayName, publicKey) +} diff --git a/internal/service/odb/db_server_data_source.go b/internal/service/odb/db_server_data_source.go new file mode 100644 index 000000000000..3d8d2f19db78 --- /dev/null +++ b/internal/service/odb/db_server_data_source.go @@ -0,0 +1,194 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkDataSource("aws_odb_db_server", name="Db Server") +func newDataSourceDBServer(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbServer{}, nil +} + +const ( + DSNameDBServer = "DB Server Data Source" +) + +type dataSourceDbServer struct { + framework.DataSourceWithModel[dbServerDataSourceModel] +} + +func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrID: schema.StringAttribute{ + Description: "The identifier of the the database server.", + Required: true, + }, + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Description: "The identifier of the database server to retrieve information about.", + Required: true, + }, + "autonomous_virtual_machine_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + Description: "The list of unique identifiers for the Autonomous VMs associated with this database server.", + }, + "autonomous_vm_cluster_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + Description: "The OCID of the autonomous VM clusters that are associated with the database server.", + }, + "compute_model": schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ComputeModel](), + Description: " The compute model of the database server.", + }, + names.AttrStatus: schema.StringAttribute{ + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + Description: "The status of the database server.", + }, + names.AttrStatusReason: schema.StringAttribute{ + Computed: true, + Description: "Additional information about the current status of the database server.", + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + Description: "The number of CPU cores enabled on the database server.", + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The allocated local node storage in GBs on the database server.", + }, + "db_server_patching_details": schema.ListAttribute{ + CustomType: fwtypes.NewListNestedObjectTypeOf[dbNodePatchingDetailsDbServerDataSourceModel](ctx), + Computed: true, + Description: "The scheduling details for the quarterly maintenance window. Patching and\n" + + "system updates take place during the maintenance window.", + }, + names.AttrDisplayName: schema.StringAttribute{ + Computed: true, + Description: "The display name of the database server.", + }, + "exadata_infrastructure_id": schema.StringAttribute{ + Computed: true, + Description: "The exadata infrastructure ID of the database server.", + }, + "ocid": schema.StringAttribute{ + Computed: true, + Description: "The OCID of the database server to retrieve information about.", + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + Description: "The name of the OCI resource anchor.", + }, + "max_cpu_count": schema.Int32Attribute{ + Computed: true, + Description: "The total number of CPU cores available.", + }, + "max_db_node_storage_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The total local node storage available in GBs.", + }, + "max_memory_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The total memory available in GBs.", + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The allocated memory in GBs on the database server.", + }, + "shape": schema.StringAttribute{ + Computed: true, + Description: "The shape of the database server. The shape determines the amount of CPU, " + + "storage, and memory resources available.", + }, + names.AttrCreatedAt: schema.StringAttribute{ + Computed: true, + CustomType: timetypes.RFC3339Type{}, + Description: "The date and time when the database server was created.", + }, + "vm_cluster_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + Description: "The OCID of the VM clusters that are associated with the database server.", + }, + }, + } +} + +func (d *dataSourceDbServer) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + var data dbServerDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.GetDbServerInput{ + DbServerId: data.DbServerID.ValueStringPointer(), + CloudExadataInfrastructureId: data.CloudExadataInfrastructureID.ValueStringPointer(), + } + out, err := conn.GetDbServer(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDBServer, data.DbServerID.ValueString(), err), + err.Error(), + ) + return + } + resp.Diagnostics.Append(flex.Flatten(ctx, out.DbServer, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbServerDataSourceModel struct { + framework.WithRegionModel + DbServerID types.String `tfsdk:"id"` + CloudExadataInfrastructureID types.String `tfsdk:"cloud_exadata_infrastructure_id"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerPatchingDetails fwtypes.ListNestedObjectValueOf[dbNodePatchingDetailsDbServerDataSourceModel] `tfsdk:"db_server_patching_details"` + DisplayName types.String `tfsdk:"display_name"` + ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` + OCID types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + Shape types.String `tfsdk:"shape"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at" ` + VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` + AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` +} + +type dbNodePatchingDetailsDbServerDataSourceModel struct { + EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` + PatchingStatus types.String `tfsdk:"patching_status"` + TimePatchingEnded types.String `tfsdk:"time_patching_ended"` + TimePatchingStarted types.String `tfsdk:"time_patching_started"` +} diff --git a/internal/service/odb/db_server_data_source_test.go b/internal/service/odb/db_server_data_source_test.go new file mode 100644 index 000000000000..329eed1c692b --- /dev/null +++ b/internal/service/odb/db_server_data_source_test.go @@ -0,0 +1,169 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type testDbServerDataSourceTest struct { + exaDisplayNamePrefix string +} + +var dbServerDataSourceTestEntity = testDbServerDataSourceTest{ + exaDisplayNamePrefix: "Ofake-exa", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDBServerDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + var dbServer odb.GetDbServerOutput + + dataSourceName := "data.aws_odb_db_server.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbServerDataSourceTestEntity.testAccCheckDBServersDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbServerDataSourceTestEntity.basicDBServerDataSourceConfig(), + Check: resource.ComposeAggregateTestCheckFunc( + dbServerDataSourceTestEntity.testAccCheckDBServerExists(ctx, dataSourceName, &dbServer), + ), + }, + }, + }) +} + +func (testDbServerDataSourceTest) testAccCheckDBServerExists(ctx context.Context, name string, output *odb.GetDbServerOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBServer, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var dbServerId = rs.Primary.ID + var attributes = rs.Primary.Attributes + exaId := attributes["exadata_infrastructure_id"] + resp, err := dbServerDataSourceTestEntity.findDBServer(ctx, conn, &dbServerId, &exaId) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBServer, rs.Primary.ID, err) + } + *output = *resp + return nil + } +} + +func (testDbServerDataSourceTest) testAccCheckDBServersDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + err := dbServerDataSourceTestEntity.findExaInfra(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServer, rs.Primary.ID, err) + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServer, rs.Primary.ID, errors.New("not destroyed")) + } + return nil + } +} + +func (testDbServerDataSourceTest) findExaInfra(ctx context.Context, conn *odb.Client, id string) error { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return err + } + if out == nil || out.CloudExadataInfrastructure == nil { + return tfresource.NewEmptyResultError(&input) + } + return nil +} + +func (testDbServerDataSourceTest) findDBServer(ctx context.Context, conn *odb.Client, dbServerId *string, exaInfraId *string) (*odb.GetDbServerOutput, error) { + inputWithExaId := odb.GetDbServerInput{ + DbServerId: dbServerId, + CloudExadataInfrastructureId: exaInfraId, + } + output, err := conn.GetDbServer(ctx, &inputWithExaId) + if err != nil { + return nil, err + } + return output, nil +} + +func (testDbServerDataSourceTest) basicDBServerDataSourceConfig() string { + exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTestEntity.displayNamePrefix) + exaInfra := dbServerDataSourceTestEntity.exaInfra(exaInfraDisplayName) + + return fmt.Sprintf(` +%s + +data "aws_odb_db_servers" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +data "aws_odb_db_server" "test" { + id = data.aws_odb_db_servers.test.db_servers[0].id + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} +`, exaInfra) +} + +func (testDbServerDataSourceTest) exaInfra(rName string) string { + exaRes := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window { + custom_action_timeout_in_mins = 16 + is_custom_action_timeout_enabled = true + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + } +} +`, rName) + return exaRes +} diff --git a/internal/service/odb/db_servers_data_source.go b/internal/service/odb/db_servers_data_source.go new file mode 100644 index 000000000000..ab71f19f74cc --- /dev/null +++ b/internal/service/odb/db_servers_data_source.go @@ -0,0 +1,116 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkDataSource("aws_odb_db_servers", name="Db Servers") +func newDataSourceDBServers(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbServersList{}, nil +} + +const ( + DSNameDBServersList = "DB Servers List Data Source" +) + +type dataSourceDbServersList struct { + framework.DataSourceWithModel[dbServersListDataSourceModel] +} + +func (d *dataSourceDbServersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Required: true, + Description: "The cloud exadata infrastructure ID. Mandatory field.", + }, + "db_servers": schema.ListAttribute{ + CustomType: fwtypes.NewListNestedObjectTypeOf[dbServerForDbServersListDataSourceModel](ctx), + Computed: true, + Description: "List of database servers associated with cloud_exadata_infrastructure_id.", + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceDbServersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + var data dbServersListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.ListDbServersInput{} + if !data.CloudExadataInfrastructureId.IsNull() && !data.CloudExadataInfrastructureId.IsUnknown() { + input.CloudExadataInfrastructureId = data.CloudExadataInfrastructureId.ValueStringPointer() + } + paginator := odb.NewListDbServersPaginator(conn, &input) + var out odb.ListDbServersOutput + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDBServersList, "", err), + err.Error(), + ) + } + out.DbServers = append(out.DbServers, page.DbServers...) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbServersListDataSourceModel struct { + framework.WithRegionModel + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + DbServers fwtypes.ListNestedObjectValueOf[dbServerForDbServersListDataSourceModel] `tfsdk:"db_servers"` +} + +type dbServerForDbServersListDataSourceModel struct { + AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` + AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerId types.String `tfsdk:"id"` + DbServerPatchingDetails fwtypes.ListNestedObjectValueOf[dbNodePatchingDetailsForDbServersListDataSourceModel] `tfsdk:"db_server_patching_details"` + DisplayName types.String `tfsdk:"display_name"` + ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + OCID types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + Shape types.String `tfsdk:"shape"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` +} + +type dbNodePatchingDetailsForDbServersListDataSourceModel struct { + EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` + PatchingStatus fwtypes.StringEnum[odbtypes.DbServerPatchingStatus] `tfsdk:"patching_status"` + TimePatchingEnded types.String `tfsdk:"time_patching_ended"` + TimePatchingStarted types.String `tfsdk:"time_patching_started"` +} diff --git a/internal/service/odb/db_servers_data_source_test.go b/internal/service/odb/db_servers_data_source_test.go new file mode 100644 index 000000000000..721dbd046642 --- /dev/null +++ b/internal/service/odb/db_servers_data_source_test.go @@ -0,0 +1,163 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type testDbServersListDataSource struct { + displayNamePrefix string +} + +var dbServersListDataSourceTestEntity = testDbServersListDataSource{ + displayNamePrefix: "Ofake-exa", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDBServersListDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + var dbServersList odb.ListDbServersOutput + dataSourceName := "data.aws_odb_db_servers.test" + exaInfraResourceName := "aws_odb_cloud_exadata_infrastructure.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbServersListDataSourceTestEntity.testAccCheckDBServersDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbServersListDataSourceTestEntity.testAccDBServersListDataSourceConfigBasic(), + Check: resource.ComposeAggregateTestCheckFunc( + dbServersListDataSourceTestEntity.testAccCheckDBServersListExists(ctx, exaInfraResourceName, &dbServersList), + resource.TestCheckResourceAttr(dataSourceName, "aws_odb_db_servers.db_servers.#", strconv.Itoa(len(dbServersList.DbServers))), + ), + }, + }, + }) +} + +func (testDbServersListDataSource) testAccCheckDBServersListExists(ctx context.Context, name string, output *odb.ListDbServersOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBServersList, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var exaInfraId = &rs.Primary.ID + + resp, err := dbServersListDataSourceTestEntity.findDBServersList(ctx, conn, exaInfraId) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDBServersList, rs.Primary.ID, err) + } + *output = *resp + return nil + } +} + +func (testDbServersListDataSource) testAccCheckDBServersDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + _, err := dbServersListDataSourceTestEntity.findExaInfra(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServersList, rs.Primary.ID, err) + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDBServersList, rs.Primary.ID, errors.New("not destroyed")) + } + return nil + } +} + +func (testDbServersListDataSource) findExaInfra(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + if out == nil || out.CloudExadataInfrastructure == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + return out.CloudExadataInfrastructure, nil +} + +func (testDbServersListDataSource) findDBServersList(ctx context.Context, conn *odb.Client, exaInfraId *string) (*odb.ListDbServersOutput, error) { + inputWithExaId := odb.ListDbServersInput{ + CloudExadataInfrastructureId: exaInfraId, + } + output, err := conn.ListDbServers(ctx, &inputWithExaId) + if err != nil { + return nil, err + } + return output, nil +} + +func (testDbServersListDataSource) testAccDBServersListDataSourceConfigBasic() string { + exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTestEntity.displayNamePrefix) + exaInfra := dbServersListDataSourceTestEntity.exaInfra(exaInfraDisplayName) + return fmt.Sprintf(` +%s + +data "aws_odb_db_servers" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} +`, exaInfra) +} + +func (testDbServersListDataSource) exaInfra(rName string) string { + exaRes := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window { + custom_action_timeout_in_mins = 16 + is_custom_action_timeout_enabled = true + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + } +} +`, rName) + return exaRes +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 8495fcc150e5..f842f63a38d1 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -46,6 +46,30 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S }), Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceDBNode, + TypeName: "aws_odb_db_node", + Name: "Db Node", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceDBNodes, + TypeName: "aws_odb_db_nodes", + Name: "Db Nodes", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceDBServer, + TypeName: "aws_odb_db_server", + Name: "Db Server", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceDBServers, + TypeName: "aws_odb_db_servers", + Name: "Db Servers", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceNetwork, TypeName: "aws_odb_network", diff --git a/internal/service/pricing/product_data_source_test.go b/internal/service/pricing/product_data_source_test.go index 5ae6a314f3cd..a650ee3058c8 100644 --- a/internal/service/pricing/product_data_source_test.go +++ b/internal/service/pricing/product_data_source_test.go @@ -16,7 +16,7 @@ func TestAccPricingProductDataSource_ec2(t *testing.T) { ctx := acctest.Context(t) dataSourceName := "data.aws_pricing_product.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckRegion(t, endpoints.UsEast1RegionID, endpoints.ApSouth1RegionID) @@ -38,7 +38,7 @@ func TestAccPricingProductDataSource_redshift(t *testing.T) { ctx := acctest.Context(t) dataSourceName := "data.aws_pricing_product.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckRegion(t, endpoints.UsEast1RegionID, endpoints.ApSouth1RegionID) diff --git a/internal/service/qbusiness/application.go b/internal/service/qbusiness/application.go index cf20a47577f6..4ce32101450a 100644 --- a/internal/service/qbusiness/application.go +++ b/internal/service/qbusiness/application.go @@ -21,7 +21,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-provider-aws/internal/create" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" @@ -29,6 +28,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/framework" fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" @@ -201,7 +201,7 @@ func (r *applicationResource) Read(ctx context.Context, req resource.ReadRequest conn := r.Meta().QBusinessClient(ctx) out, err := findApplicationByID(ctx, conn, data.ApplicationId.ValueString()) - if tfresource.NotFound(err) { + if retry.NotFound(err) { resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) resp.State.RemoveResource(ctx) return @@ -323,8 +323,7 @@ func findApplicationByID(ctx context.Context, conn *qbusiness.Client, id string) output, err := conn.GetApplication(ctx, input) if errs.IsA[*awstypes.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -339,8 +338,8 @@ func findApplicationByID(ctx context.Context, conn *qbusiness.Client, id string) return output, nil } -func statusApplication(ctx context.Context, conn *qbusiness.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusApplication(conn *qbusiness.Client, id string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := findApplicationByID(ctx, conn, id) if tfresource.NotFound(err) { @@ -359,7 +358,7 @@ func waitApplicationActive(ctx context.Context, conn *qbusiness.Client, id strin stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.ApplicationStatusCreating, awstypes.ApplicationStatusUpdating), Target: enum.Slice(awstypes.ApplicationStatusActive), - Refresh: statusApplication(ctx, conn, id), + Refresh: statusApplication(conn, id), Timeout: timeout, MinTimeout: 10 * time.Second, } @@ -367,7 +366,7 @@ func waitApplicationActive(ctx context.Context, conn *qbusiness.Client, id strin outputRaw, err := stateConf.WaitForStateContext(ctx) if output, ok := outputRaw.(*qbusiness.GetApplicationOutput); ok { - tfresource.SetLastError(err, errors.New(string(output.Status))) + retry.SetLastError(err, errors.New(string(output.Status))) return output, err } @@ -378,7 +377,7 @@ func waitApplicationDeleted(ctx context.Context, conn *qbusiness.Client, id stri stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.ApplicationStatusActive, awstypes.ApplicationStatusDeleting), Target: []string{}, - Refresh: statusApplication(ctx, conn, id), + Refresh: statusApplication(conn, id), Timeout: timeout, MinTimeout: 10 * time.Second, } @@ -386,7 +385,7 @@ func waitApplicationDeleted(ctx context.Context, conn *qbusiness.Client, id stri outputRaw, err := stateConf.WaitForStateContext(ctx) if output, ok := outputRaw.(*qbusiness.GetApplicationOutput); ok { - tfresource.SetLastError(err, errors.New(string(output.Status))) + retry.SetLastError(err, errors.New(string(output.Status))) return output, err } diff --git a/internal/service/qbusiness/application_test.go b/internal/service/qbusiness/application_test.go index 7a91e7b5d3a1..9d69f6826c60 100644 --- a/internal/service/qbusiness/application_test.go +++ b/internal/service/qbusiness/application_test.go @@ -10,23 +10,21 @@ import ( "github.com/aws/aws-sdk-go-v2/service/qbusiness" "github.com/aws/aws-sdk-go-v2/service/qbusiness/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfqbusiness "github.com/hashicorp/terraform-provider-aws/internal/service/qbusiness" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) func TestAccQBusinessApplication_basic(t *testing.T) { ctx := acctest.Context(t) var application qbusiness.GetApplicationOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_qbusiness_application.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheckApplication(ctx, t) @@ -34,12 +32,12 @@ func TestAccQBusinessApplication_basic(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.QBusinessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_basic(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), resource.TestCheckResourceAttr(resourceName, names.AttrDisplayName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, rName), @@ -59,10 +57,10 @@ func TestAccQBusinessApplication_basic(t *testing.T) { func TestAccQBusinessApplication_disappears(t *testing.T) { ctx := acctest.Context(t) var application qbusiness.GetApplicationOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_qbusiness_application.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheckApplication(ctx, t) @@ -70,12 +68,12 @@ func TestAccQBusinessApplication_disappears(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.QBusinessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_basic(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfqbusiness.ResourceApplication, resourceName), ), ExpectNonEmptyPlan: true, @@ -87,12 +85,12 @@ func TestAccQBusinessApplication_disappears(t *testing.T) { func TestAccQBusinessApplication_update(t *testing.T) { ctx := acctest.Context(t) var application qbusiness.GetApplicationOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) description := names.AttrDescription descriptionUpdated := "description updated" resourceName := "aws_qbusiness_application.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheckApplication(ctx, t) @@ -100,12 +98,12 @@ func TestAccQBusinessApplication_update(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.QBusinessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_update(rName, description), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), resource.TestCheckResourceAttr(resourceName, names.AttrDisplayName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), @@ -120,7 +118,7 @@ func TestAccQBusinessApplication_update(t *testing.T) { { Config: testAccApplicationConfig_update(rName, descriptionUpdated), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), resource.TestCheckResourceAttr(resourceName, names.AttrDisplayName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, descriptionUpdated), @@ -133,10 +131,10 @@ func TestAccQBusinessApplication_update(t *testing.T) { func TestAccQBusinessApplication_tags(t *testing.T) { ctx := acctest.Context(t) var application qbusiness.GetApplicationOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_qbusiness_application.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheckApplication(ctx, t) @@ -144,12 +142,12 @@ func TestAccQBusinessApplication_tags(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.QBusinessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -163,7 +161,7 @@ func TestAccQBusinessApplication_tags(t *testing.T) { { Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -172,7 +170,7 @@ func TestAccQBusinessApplication_tags(t *testing.T) { { Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, "value2updated"), Check: resource.ComposeTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, "value2updated"), ), @@ -184,10 +182,10 @@ func TestAccQBusinessApplication_tags(t *testing.T) { func TestAccQBusinessApplication_attachmentsConfiguration(t *testing.T) { ctx := acctest.Context(t) var application qbusiness.GetApplicationOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) resourceName := "aws_qbusiness_application.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) testAccPreCheckApplication(ctx, t) @@ -195,12 +193,12 @@ func TestAccQBusinessApplication_attachmentsConfiguration(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.QBusinessServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckApplicationDestroy(ctx), + CheckDestroy: testAccCheckApplicationDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccApplicationConfig_attachmentsConfiguration(rName, string(types.AttachmentsControlModeEnabled)), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "attachments_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "attachments_configuration.0.attachments_control_mode", string(types.AttachmentsControlModeEnabled)), ), @@ -208,7 +206,7 @@ func TestAccQBusinessApplication_attachmentsConfiguration(t *testing.T) { { Config: testAccApplicationConfig_attachmentsConfiguration(rName, string(types.AttachmentsControlModeDisabled)), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckApplicationExists(ctx, resourceName, &application), + testAccCheckApplicationExists(ctx, t, resourceName, &application), resource.TestCheckResourceAttr(resourceName, "attachments_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "attachments_configuration.0.attachments_control_mode", string(types.AttachmentsControlModeDisabled)), ), @@ -218,7 +216,7 @@ func TestAccQBusinessApplication_attachmentsConfiguration(t *testing.T) { } func testAccPreCheckApplication(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).QBusinessClient(ctx) + conn := acctest.ProviderMeta(ctx, t).QBusinessClient(ctx) input := &qbusiness.ListApplicationsInput{} @@ -233,9 +231,9 @@ func testAccPreCheckApplication(ctx context.Context, t *testing.T) { } } -func testAccCheckApplicationDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckApplicationDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).QBusinessClient(ctx) + conn := acctest.ProviderMeta(ctx, t).QBusinessClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_qbusiness_application" { @@ -244,7 +242,7 @@ func testAccCheckApplicationDestroy(ctx context.Context) resource.TestCheckFunc _, err := tfqbusiness.FindApplicationByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -259,14 +257,14 @@ func testAccCheckApplicationDestroy(ctx context.Context) resource.TestCheckFunc } } -func testAccCheckApplicationExists(ctx context.Context, n string, v *qbusiness.GetApplicationOutput) resource.TestCheckFunc { +func testAccCheckApplicationExists(ctx context.Context, t *testing.T, n string, v *qbusiness.GetApplicationOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).QBusinessClient(ctx) + conn := acctest.ProviderMeta(ctx, t).QBusinessClient(ctx) output, err := tfqbusiness.FindApplicationByID(ctx, conn, rs.Primary.ID) diff --git a/internal/service/rbin/rule.go b/internal/service/rbin/rule.go index 1ee7a642f1f5..3c586c1d5aeb 100644 --- a/internal/service/rbin/rule.go +++ b/internal/service/rbin/rule.go @@ -12,13 +12,13 @@ import ( "github.com/aws/aws-sdk-go-v2/service/rbin" "github.com/aws/aws-sdk-go-v2/service/rbin/types" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" @@ -213,7 +213,7 @@ func resourceRuleRead(ctx context.Context, d *schema.ResourceData, meta any) dia output, err := findRuleByID(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] RBin Rule (%s) not found, removing from state", d.Id()) d.SetId("") return diags @@ -322,8 +322,7 @@ func findRuleByID(ctx context.Context, conn *rbin.Client, id string) (*rbin.GetR if errs.IsA[*types.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -338,8 +337,8 @@ func findRuleByID(ctx context.Context, conn *rbin.Client, id string) (*rbin.GetR return output, nil } -func statusRule(ctx context.Context, conn *rbin.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusRule(conn *rbin.Client, id string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := findRuleByID(ctx, conn, id) if tfresource.NotFound(err) { @@ -358,7 +357,7 @@ func waitRuleCreated(ctx context.Context, conn *rbin.Client, id string, timeout stateConf := &retry.StateChangeConf{ Pending: enum.Slice(types.RuleStatusPending), Target: enum.Slice(types.RuleStatusAvailable), - Refresh: statusRule(ctx, conn, id), + Refresh: statusRule(conn, id), Timeout: timeout, ContinuousTargetOccurence: 2, } @@ -376,7 +375,7 @@ func waitRuleUpdated(ctx context.Context, conn *rbin.Client, id string, timeout stateConf := &retry.StateChangeConf{ Pending: enum.Slice(types.RuleStatusPending), Target: enum.Slice(types.RuleStatusAvailable), - Refresh: statusRule(ctx, conn, id), + Refresh: statusRule(conn, id), Timeout: timeout, ContinuousTargetOccurence: 2, } @@ -394,7 +393,7 @@ func waitRuleDeleted(ctx context.Context, conn *rbin.Client, id string, timeout stateConf := &retry.StateChangeConf{ Pending: enum.Slice(types.RuleStatusPending, types.RuleStatusAvailable), Target: []string{}, - Refresh: statusRule(ctx, conn, id), + Refresh: statusRule(conn, id), Timeout: timeout, } diff --git a/internal/service/rbin/rule_test.go b/internal/service/rbin/rule_test.go index 1ecb10c54782..23aedf7d7eec 100644 --- a/internal/service/rbin/rule_test.go +++ b/internal/service/rbin/rule_test.go @@ -12,9 +12,8 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfrbin "github.com/hashicorp/terraform-provider-aws/internal/service/rbin" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -25,19 +24,19 @@ func TestAccRBinRule_basic(t *testing.T) { resourceType := "EBS_SNAPSHOT" resourceName := "aws_rbin_rule.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, rbin.ServiceID) }, ErrorCheck: acctest.ErrorCheck(t, rbin.ServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckRuleDestroy(ctx), + CheckDestroy: testAccCheckRuleDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccRuleConfig_basic1(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), resource.TestCheckResourceAttr(resourceName, "exclude_resource_tags.#", "0"), resource.TestCheckResourceAttr(resourceName, names.AttrResourceType, resourceType), @@ -59,7 +58,7 @@ func TestAccRBinRule_basic(t *testing.T) { { Config: testAccRuleConfig_basic2(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), resource.TestCheckResourceAttr(resourceName, "exclude_resource_tags.#", "0"), resource.TestCheckResourceAttr(resourceName, names.AttrResourceType, resourceType), @@ -93,19 +92,19 @@ func TestAccRBinRule_disappears(t *testing.T) { resourceType := "EBS_SNAPSHOT" resourceName := "aws_rbin_rule.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, rbin.ServiceID) }, ErrorCheck: acctest.ErrorCheck(t, rbin.ServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckRuleDestroy(ctx), + CheckDestroy: testAccCheckRuleDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccRuleConfig_basic1(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rbinrule), + testAccCheckRuleExists(ctx, t, resourceName, &rbinrule), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfrbin.ResourceRule(), resourceName), ), ExpectNonEmptyPlan: true, @@ -121,19 +120,19 @@ func TestAccRBinRule_excludeResourceTags(t *testing.T) { resourceType := "EBS_SNAPSHOT" resourceName := "aws_rbin_rule.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, rbin.ServiceID) }, ErrorCheck: acctest.ErrorCheck(t, rbin.ServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckRuleDestroy(ctx), + CheckDestroy: testAccCheckRuleDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccRuleConfig_excludeResourceTags1(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), resource.TestCheckResourceAttr(resourceName, names.AttrResourceType, resourceType), @@ -157,7 +156,7 @@ func TestAccRBinRule_excludeResourceTags(t *testing.T) { { Config: testAccRuleConfig_excludeResourceTags2(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), resource.TestCheckResourceAttr(resourceName, names.AttrResourceType, resourceType), resource.TestCheckResourceAttr(resourceName, "exclude_resource_tags.#", "2"), @@ -184,7 +183,7 @@ func TestAccRBinRule_excludeResourceTags(t *testing.T) { { Config: testAccRuleConfig_basic1(description, resourceType), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, description), resource.TestCheckResourceAttr(resourceName, "exclude_resource_tags.#", "0"), resource.TestCheckResourceAttr(resourceName, names.AttrResourceType, resourceType), @@ -208,19 +207,19 @@ func TestAccRBinRule_lockConfig(t *testing.T) { resourceType := "EBS_SNAPSHOT" resourceName := "aws_rbin_rule.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, rbin.ServiceID) }, ErrorCheck: acctest.ErrorCheck(t, rbin.ServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckRuleDestroy(ctx), + CheckDestroy: testAccCheckRuleDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccRuleConfig_lockConfig(resourceType, "DAYS", "7"), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, "lock_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "lock_configuration.0.unlock_delay.#", "1"), resource.TestCheckResourceAttr(resourceName, "lock_configuration.0.unlock_delay.0.unlock_delay_unit", "DAYS"), @@ -237,19 +236,19 @@ func TestAccRBinRule_tags(t *testing.T) { resourceType := "EBS_SNAPSHOT" resourceName := "aws_rbin_rule.test" - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) acctest.PreCheckPartitionHasService(t, names.RBin) }, ErrorCheck: acctest.ErrorCheck(t, names.RBin), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckRuleDestroy(ctx), + CheckDestroy: testAccCheckRuleDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccRuleConfig_tags1(resourceType, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -262,7 +261,7 @@ func TestAccRBinRule_tags(t *testing.T) { { Config: testAccRuleConfig_tags2(resourceType, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -271,7 +270,7 @@ func TestAccRBinRule_tags(t *testing.T) { { Config: testAccRuleConfig_tags1(resourceType, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( - testAccCheckRuleExists(ctx, resourceName, &rule), + testAccCheckRuleExists(ctx, t, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), ), @@ -280,9 +279,9 @@ func TestAccRBinRule_tags(t *testing.T) { }) } -func testAccCheckRuleDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckRuleDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).RBinClient(ctx) + conn := acctest.ProviderMeta(ctx, t).RBinClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_rbin_rule" { @@ -291,7 +290,7 @@ func testAccCheckRuleDestroy(ctx context.Context) resource.TestCheckFunc { _, err := tfrbin.FindRuleByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -306,14 +305,14 @@ func testAccCheckRuleDestroy(ctx context.Context) resource.TestCheckFunc { } } -func testAccCheckRuleExists(ctx context.Context, n string, v *rbin.GetRuleOutput) resource.TestCheckFunc { +func testAccCheckRuleExists(ctx context.Context, t *testing.T, n string, v *rbin.GetRuleOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).RBinClient(ctx) + conn := acctest.ProviderMeta(ctx, t).RBinClient(ctx) output, err := tfrbin.FindRuleByID(ctx, conn, rs.Primary.ID) diff --git a/internal/service/redshiftdata/statement.go b/internal/service/redshiftdata/statement.go index 5201f90fcba3..a59de67eef5f 100644 --- a/internal/service/redshiftdata/statement.go +++ b/internal/service/redshiftdata/statement.go @@ -13,12 +13,12 @@ import ( "github.com/aws/aws-sdk-go-v2/service/redshiftdata" "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + "github.com/hashicorp/terraform-provider-aws/internal/retry" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/internal/verify" "github.com/hashicorp/terraform-provider-aws/names" @@ -160,7 +160,7 @@ func resourceStatementRead(ctx context.Context, d *schema.ResourceData, meta any sub, err := FindStatementByID(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] Redshift Data Statement (%s) not found, removing from state", d.Id()) d.SetId("") return diags @@ -194,8 +194,7 @@ func FindStatementByID(ctx context.Context, conn *redshiftdata.Client, id string if errs.IsA[*types.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -217,8 +216,8 @@ func FindStatementByID(ctx context.Context, conn *redshiftdata.Client, id string return output, nil } -func statusStatement(ctx context.Context, conn *redshiftdata.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusStatement(conn *redshiftdata.Client, id string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := FindStatementByID(ctx, conn, id) if tfresource.NotFound(err) { @@ -241,7 +240,7 @@ func waitStatementFinished(ctx context.Context, conn *redshiftdata.Client, id st types.StatusStringSubmitted, ), Target: enum.Slice(types.StatusStringFinished), - Refresh: statusStatement(ctx, conn, id), + Refresh: statusStatement(conn, id), Timeout: timeout, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, @@ -251,7 +250,7 @@ func waitStatementFinished(ctx context.Context, conn *redshiftdata.Client, id st if output, ok := outputRaw.(*redshiftdata.DescribeStatementOutput); ok { if status := output.Status; status == types.StatusStringFailed { - tfresource.SetLastError(err, errors.New(aws.ToString(output.Error))) + retry.SetLastError(err, errors.New(aws.ToString(output.Error))) } return output, err diff --git a/internal/service/redshiftdata/statement_test.go b/internal/service/redshiftdata/statement_test.go index f9c4e9f5060c..b2355b228652 100644 --- a/internal/service/redshiftdata/statement_test.go +++ b/internal/service/redshiftdata/statement_test.go @@ -9,11 +9,9 @@ import ( "testing" "github.com/aws/aws-sdk-go-v2/service/redshiftdata" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" tfredshiftdata "github.com/hashicorp/terraform-provider-aws/internal/service/redshiftdata" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -22,9 +20,9 @@ func TestAccRedshiftDataStatement_basic(t *testing.T) { ctx := acctest.Context(t) var v redshiftdata.DescribeStatementOutput resourceName := "aws_redshiftdata_statement.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.RedshiftDataServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -33,7 +31,7 @@ func TestAccRedshiftDataStatement_basic(t *testing.T) { { Config: testAccStatementConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckStatementExists(ctx, resourceName, &v), + testAccCheckStatementExists(ctx, t, resourceName, &v), resource.TestCheckResourceAttrPair(resourceName, names.AttrClusterIdentifier, "aws_redshift_cluster.test", names.AttrClusterIdentifier), resource.TestCheckResourceAttr(resourceName, "parameters.#", "0"), resource.TestCheckResourceAttr(resourceName, "sql", "CREATE GROUP group_name;"), @@ -54,9 +52,9 @@ func TestAccRedshiftDataStatement_workgroup(t *testing.T) { ctx := acctest.Context(t) var v redshiftdata.DescribeStatementOutput resourceName := "aws_redshiftdata_statement.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.RedshiftDataServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -65,7 +63,7 @@ func TestAccRedshiftDataStatement_workgroup(t *testing.T) { { Config: testAccStatementConfig_workgroup(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckStatementExists(ctx, resourceName, &v), + testAccCheckStatementExists(ctx, t, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrClusterIdentifier, ""), resource.TestCheckResourceAttr(resourceName, "parameters.#", "0"), resource.TestCheckResourceAttr(resourceName, "sql", "CREATE GROUP group_name;"), @@ -82,14 +80,14 @@ func TestAccRedshiftDataStatement_workgroup(t *testing.T) { }) } -func testAccCheckStatementExists(ctx context.Context, n string, v *redshiftdata.DescribeStatementOutput) resource.TestCheckFunc { +func testAccCheckStatementExists(ctx context.Context, t *testing.T, n string, v *redshiftdata.DescribeStatementOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) } - conn := acctest.Provider.Meta().(*conns.AWSClient).RedshiftDataClient(ctx) + conn := acctest.ProviderMeta(ctx, t).RedshiftDataClient(ctx) output, err := tfredshiftdata.FindStatementByID(ctx, conn, rs.Primary.ID) diff --git a/internal/service/resourcegroupstaggingapi/resources_data_source_test.go b/internal/service/resourcegroupstaggingapi/resources_data_source_test.go index 9255843a3ad1..039046c1ad56 100644 --- a/internal/service/resourcegroupstaggingapi/resources_data_source_test.go +++ b/internal/service/resourcegroupstaggingapi/resources_data_source_test.go @@ -7,7 +7,6 @@ import ( "fmt" "testing" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-provider-aws/internal/acctest" "github.com/hashicorp/terraform-provider-aws/names" @@ -17,9 +16,9 @@ func TestAccResourceGroupsTaggingAPIResourcesDataSource_tagFilter(t *testing.T) ctx := acctest.Context(t) dataSourceName := "data.aws_resourcegroupstaggingapi_resources.test" resourceName := "aws_vpc.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ResourceGroupsTaggingAPIServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -40,9 +39,9 @@ func TestAccResourceGroupsTaggingAPIResourcesDataSource_tagFilter(t *testing.T) func TestAccResourceGroupsTaggingAPIResourcesDataSource_includeComplianceDetails(t *testing.T) { ctx := acctest.Context(t) dataSourceName := "data.aws_resourcegroupstaggingapi_resources.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ResourceGroupsTaggingAPIServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -62,9 +61,9 @@ func TestAccResourceGroupsTaggingAPIResourcesDataSource_resourceTypeFilters(t *t ctx := acctest.Context(t) dataSourceName := "data.aws_resourcegroupstaggingapi_resources.test" resourceName := "aws_vpc.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ResourceGroupsTaggingAPIServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -86,9 +85,9 @@ func TestAccResourceGroupsTaggingAPIResourcesDataSource_resourceARNList(t *testi ctx := acctest.Context(t) dataSourceName := "data.aws_resourcegroupstaggingapi_resources.test" resourceName := "aws_vpc.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ResourceGroupsTaggingAPIServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, diff --git a/internal/service/route53/health_check.go b/internal/service/route53/health_check.go index 308fcd16d639..552ff1d04bf8 100644 --- a/internal/service/route53/health_check.go +++ b/internal/service/route53/health_check.go @@ -217,6 +217,7 @@ func resourceHealthCheckCreate(ctx context.Context, d *schema.ResourceData, meta if v, ok := d.GetOk(names.AttrIPAddress); ok { healthCheckConfig.IPAddress = aws.String(v.(string)) } + if v, ok := d.GetOk(names.AttrPort); ok { healthCheckConfig.Port = aws.Int32(int32(v.(int))) } @@ -235,8 +236,9 @@ func resourceHealthCheckCreate(ctx context.Context, d *schema.ResourceData, meta switch healthCheckType { case awstypes.HealthCheckTypeCalculated: - if v, ok := d.GetOk("child_health_threshold"); ok { - healthCheckConfig.HealthThreshold = aws.Int32(int32(v.(int))) + if v := d.GetRawPlan().GetAttr("child_health_threshold"); !v.IsNull() { + v, _ := v.AsBigFloat().Int64() + healthCheckConfig.HealthThreshold = aws.Int32(int32(v)) } if v, ok := d.GetOk("child_healthchecks"); ok { diff --git a/internal/service/route53/health_check_test.go b/internal/service/route53/health_check_test.go index 648373d8029b..cf5635b16c69 100644 --- a/internal/service/route53/health_check_test.go +++ b/internal/service/route53/health_check_test.go @@ -159,9 +159,47 @@ func TestAccRoute53HealthCheck_withChildHealthChecks(t *testing.T) { CheckDestroy: testAccCheckHealthCheckDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHealthCheckConfig_childs, + Config: testAccHealthCheckConfig_childs(1), Check: resource.ComposeTestCheckFunc( testAccCheckHealthCheckExists(ctx, resourceName, &check), + resource.TestCheckResourceAttr(resourceName, names.AttrType, string(awstypes.HealthCheckTypeCalculated)), + resource.TestCheckResourceAttr(resourceName, "child_health_threshold", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccHealthCheckConfig_childs(0), + Check: resource.ComposeTestCheckFunc( + testAccCheckHealthCheckExists(ctx, resourceName, &check), + resource.TestCheckResourceAttr(resourceName, names.AttrType, string(awstypes.HealthCheckTypeCalculated)), + resource.TestCheckResourceAttr(resourceName, "child_health_threshold", "0"), + ), + }, + }, + }) +} + +func TestAccRoute53HealthCheck_withChildHealthChecksThresholdZero(t *testing.T) { + ctx := acctest.Context(t) + var check awstypes.HealthCheck + resourceName := "aws_route53_health_check.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.Route53ServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckHealthCheckDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccHealthCheckConfig_childs(0), + Check: resource.ComposeTestCheckFunc( + testAccCheckHealthCheckExists(ctx, resourceName, &check), + resource.TestCheckResourceAttr(resourceName, names.AttrType, string(awstypes.HealthCheckTypeCalculated)), + resource.TestCheckResourceAttr(resourceName, "child_health_threshold", "0"), ), }, { @@ -600,7 +638,8 @@ resource "aws_route53_health_check" "test" { `, ip) } -const testAccHealthCheckConfig_childs = ` +func testAccHealthCheckConfig_childs(threshold int) string { + return fmt.Sprintf(` resource "aws_route53_health_check" "child1" { fqdn = "child1.example.com" port = 80 @@ -612,14 +651,15 @@ resource "aws_route53_health_check" "child1" { resource "aws_route53_health_check" "test" { type = "CALCULATED" - child_health_threshold = 1 + child_health_threshold = %[1]d child_healthchecks = [aws_route53_health_check.child1.id] tags = { Name = "tf-test-calculated-health-check" } } -` +`, threshold) +} func testAccHealthCheckConfig_regions(regions ...string) string { return fmt.Sprintf(` diff --git a/internal/service/route53recoverycontrolconfig/cluster.go b/internal/service/route53recoverycontrolconfig/cluster.go index b7350dad3da0..ca885bd83dac 100644 --- a/internal/service/route53recoverycontrolconfig/cluster.go +++ b/internal/service/route53recoverycontrolconfig/cluster.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" @@ -26,6 +27,7 @@ func resourceCluster() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceClusterCreate, ReadWithoutTimeout: resourceClusterRead, + UpdateWithoutTimeout: resourceClusterUpdate, DeleteWithoutTimeout: resourceClusterDelete, Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, @@ -57,6 +59,12 @@ func resourceCluster() *schema.Resource { Required: true, ForceNew: true, }, + "network_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateDiagFunc: enum.Validate[awstypes.NetworkType](), + }, names.AttrStatus: { Type: schema.TypeString, Computed: true, @@ -74,6 +82,10 @@ func resourceClusterCreate(ctx context.Context, d *schema.ResourceData, meta any ClusterName: aws.String(d.Get(names.AttrName).(string)), } + if v, ok := d.GetOk("network_type"); ok { + input.NetworkType = awstypes.NetworkType(v.(string)) + } + output, err := conn.CreateCluster(ctx, input) if err != nil { @@ -112,6 +124,7 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta any) d.Set(names.AttrARN, output.ClusterArn) d.Set(names.AttrName, output.Name) + d.Set("network_type", output.NetworkType) d.Set(names.AttrStatus, output.Status) if err := d.Set("cluster_endpoints", flattenClusterEndpoints(output.ClusterEndpoints)); err != nil { @@ -121,6 +134,35 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta any) return diags } +func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { + var diags diag.Diagnostics + conn := meta.(*conns.AWSClient).Route53RecoveryControlConfigClient(ctx) + + input := &r53rcc.UpdateClusterInput{ + ClusterArn: aws.String(d.Id()), + } + + if d.HasChanges("network_type") { + input.NetworkType = awstypes.NetworkType(d.Get("network_type").(string)) + } + + output, err := conn.UpdateCluster(ctx, input) + + if err != nil { + return sdkdiag.AppendErrorf(diags, "updating Route53 Recovery Control Config Cluster: %s", err) + } + + if output == nil || output.Cluster == nil { + return sdkdiag.AppendErrorf(diags, "updating Route53 Recovery Control Config Cluster: empty response") + } + + if _, err := waitClusterUpdated(ctx, conn, d.Id()); err != nil { + return sdkdiag.AppendErrorf(diags, "waiting for Route53 Recovery Control Config Cluster (%s) to be Updated: %s", d.Id(), err) + } + + return append(diags, resourceClusterRead(ctx, d, meta)...) +} + func resourceClusterDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { var diags diag.Diagnostics conn := meta.(*conns.AWSClient).Route53RecoveryControlConfigClient(ctx) diff --git a/internal/service/route53recoverycontrolconfig/cluster_test.go b/internal/service/route53recoverycontrolconfig/cluster_test.go index 81a2444a42aa..aa049df6e925 100644 --- a/internal/service/route53recoverycontrolconfig/cluster_test.go +++ b/internal/service/route53recoverycontrolconfig/cluster_test.go @@ -8,8 +8,10 @@ import ( "fmt" "testing" + awstypes "github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig/types" sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" "github.com/hashicorp/terraform-provider-aws/internal/conns" @@ -39,6 +41,67 @@ func testAccCluster_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, "DEPLOYED"), resource.TestCheckResourceAttr(resourceName, "cluster_endpoints.#", "5"), + resource.TestCheckResourceAttr(resourceName, "network_type", string(awstypes.NetworkTypeIpv4)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster_endpoints"}, + }, + }, + }) +} + +func testAccCluster_networkType(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_route53recoverycontrolconfig_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.Route53RecoveryControlConfigEndpointID) + }, + ErrorCheck: acctest.ErrorCheck(t, names.Route53RecoveryControlConfigServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccClusterConfig_networkType(rName, string(awstypes.NetworkTypeDualstack)), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + }, + }, + Check: resource.ComposeTestCheckFunc( + testAccCheckClusterExists(ctx, resourceName), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttr(resourceName, names.AttrStatus, "DEPLOYED"), + resource.TestCheckResourceAttr(resourceName, "cluster_endpoints.#", "5"), + resource.TestCheckResourceAttr(resourceName, "network_type", string(awstypes.NetworkTypeDualstack)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster_endpoints"}, + }, + { + Config: testAccClusterConfig_networkType(rName, string(awstypes.NetworkTypeIpv4)), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + }, + }, + Check: resource.ComposeTestCheckFunc( + testAccCheckClusterExists(ctx, resourceName), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttr(resourceName, names.AttrStatus, "DEPLOYED"), + resource.TestCheckResourceAttr(resourceName, "cluster_endpoints.#", "5"), + resource.TestCheckResourceAttr(resourceName, "network_type", string(awstypes.NetworkTypeIpv4)), ), }, { @@ -125,3 +188,12 @@ resource "aws_route53recoverycontrolconfig_cluster" "test" { } `, rName) } + +func testAccClusterConfig_networkType(rName, networkType string) string { + return fmt.Sprintf(` +resource "aws_route53recoverycontrolconfig_cluster" "test" { + name = %[1]q + network_type = %[2]q +} +`, rName, networkType) +} diff --git a/internal/service/route53recoverycontrolconfig/route53recoverycontrolconfig_test.go b/internal/service/route53recoverycontrolconfig/route53recoverycontrolconfig_test.go index fd4d762a5158..961b61d0e0d6 100644 --- a/internal/service/route53recoverycontrolconfig/route53recoverycontrolconfig_test.go +++ b/internal/service/route53recoverycontrolconfig/route53recoverycontrolconfig_test.go @@ -18,6 +18,7 @@ func TestAccRoute53RecoveryControlConfig_serial(t *testing.T) { "Cluster": { acctest.CtBasic: testAccCluster_basic, acctest.CtDisappears: testAccCluster_disappears, + "networkType": testAccCluster_networkType, }, "ControlPanel": { acctest.CtBasic: testAccControlPanel_basic, diff --git a/internal/service/route53recoverycontrolconfig/wait.go b/internal/service/route53recoverycontrolconfig/wait.go index 10ecdcf3a136..7b1c02bef8bc 100644 --- a/internal/service/route53recoverycontrolconfig/wait.go +++ b/internal/service/route53recoverycontrolconfig/wait.go @@ -14,7 +14,7 @@ import ( ) const ( - timeout = 60 * time.Second + timeout = 1800 * time.Second minTimeout = 5 * time.Second ) @@ -36,6 +36,24 @@ func waitClusterCreated(ctx context.Context, conn *r53rcc.Client, clusterArn str return nil, err } +func waitClusterUpdated(ctx context.Context, conn *r53rcc.Client, clusterArn string) (*awstypes.Cluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(awstypes.StatusPending), + Target: enum.Slice(awstypes.StatusDeployed), + Refresh: statusCluster(ctx, conn, clusterArn), + Timeout: timeout, + MinTimeout: minTimeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + + if output, ok := outputRaw.(*awstypes.Cluster); ok { + return output, err + } + + return nil, err +} + func waitClusterDeleted(ctx context.Context, conn *r53rcc.Client, clusterArn string) (*awstypes.Cluster, error) { stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.StatusPendingDeletion), diff --git a/internal/service/s3control/bucket.go b/internal/service/s3control/bucket.go index f827cec6c134..15c1739b76b8 100644 --- a/internal/service/s3control/bucket.go +++ b/internal/service/s3control/bucket.go @@ -32,6 +32,9 @@ const ( // @SDKResource("aws_s3control_bucket", name="Bucket") // @Tags +// @ArnIdentity +// @Testing(preIdentityVersion="v6.14.1") +// @Testing(preCheck="acctest.PreCheckOutpostsOutposts") func resourceBucket() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceBucketCreate, @@ -39,10 +42,6 @@ func resourceBucket() *schema.Resource { UpdateWithoutTimeout: resourceBucketUpdate, DeleteWithoutTimeout: resourceBucketDelete, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - Schema: map[string]*schema.Schema{ names.AttrARN: { Type: schema.TypeString, diff --git a/internal/service/s3control/bucket_identity_gen_test.go b/internal/service/s3control/bucket_identity_gen_test.go new file mode 100644 index 000000000000..204b902541e7 --- /dev/null +++ b/internal/service/s3control/bucket_identity_gen_test.go @@ -0,0 +1,349 @@ +// Code generated by internal/generate/identitytests/main.go; DO NOT EDIT. + +package s3control_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/compare" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccS3ControlBucket_Identity_Basic(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_s3control_bucket.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckOutpostsOutposts(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.S3ControlServiceID), + CheckDestroy: testAccCheckBucketDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckBucketExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + }, + }) +} + +func TestAccS3ControlBucket_Identity_RegionOverride(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_s3control_bucket.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckOutpostsOutposts(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.S3ControlServiceID), + CheckDestroy: acctest.CheckDestroyNoop, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command with appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import command without appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 4: Import block with Import ID and appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 5: Import block with Import ID and no appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 6: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccS3ControlBucket_Identity_ExistingResource(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_s3control_bucket.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckOutpostsOutposts(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.S3ControlServiceID), + CheckDestroy: testAccCheckBucketDestroy(ctx), + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckBucketExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccS3ControlBucket_Identity_ExistingResource_NoRefresh_NoChange(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_s3control_bucket.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckOutpostsOutposts(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.S3ControlServiceID), + CheckDestroy: testAccCheckBucketDestroy(ctx), + AdditionalCLIOptions: &resource.AdditionalCLIOptions{ + Plan: resource.PlanOptions{ + NoRefresh: true, + }, + }, + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckBucketExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Bucket/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + }, + }) +} diff --git a/internal/service/s3control/service_package_gen.go b/internal/service/s3control/service_package_gen.go index c705cf91dad5..afef12c76f43 100644 --- a/internal/service/s3control/service_package_gen.go +++ b/internal/service/s3control/service_package_gen.go @@ -127,6 +127,12 @@ func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePa Name: "Bucket", Tags: unique.Make(inttypes.ServicePackageResourceTags{}), Region: unique.Make(inttypes.ResourceRegionDefault()), + Identity: inttypes.RegionalARNIdentity( + inttypes.WithIdentityDuplicateAttrs(names.AttrID), + ), + Import: inttypes.SDKv2Import{ + WrappedImport: true, + }, }, { Factory: resourceBucketLifecycleConfiguration, diff --git a/internal/service/s3control/testdata/Bucket/basic/main_gen.tf b/internal/service/s3control/testdata/Bucket/basic/main_gen.tf new file mode 100644 index 000000000000..77ac4cfbab81 --- /dev/null +++ b/internal/service/s3control/testdata/Bucket/basic/main_gen.tf @@ -0,0 +1,18 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_s3control_bucket" "test" { + bucket = var.rName + outpost_id = data.aws_outposts_outpost.test.id +} + +data "aws_outposts_outposts" "test" {} + +data "aws_outposts_outpost" "test" { + id = tolist(data.aws_outposts_outposts.test.ids)[0] +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} diff --git a/internal/service/s3control/testdata/Bucket/basic_v6.14.1/main_gen.tf b/internal/service/s3control/testdata/Bucket/basic_v6.14.1/main_gen.tf new file mode 100644 index 000000000000..06ddeff98ffa --- /dev/null +++ b/internal/service/s3control/testdata/Bucket/basic_v6.14.1/main_gen.tf @@ -0,0 +1,28 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_s3control_bucket" "test" { + bucket = var.rName + outpost_id = data.aws_outposts_outpost.test.id +} + +data "aws_outposts_outposts" "test" {} + +data "aws_outposts_outpost" "test" { + id = tolist(data.aws_outposts_outposts.test.ids)[0] +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "6.14.1" + } + } +} + +provider "aws" {} diff --git a/internal/service/s3control/testdata/Bucket/region_override/main_gen.tf b/internal/service/s3control/testdata/Bucket/region_override/main_gen.tf new file mode 100644 index 000000000000..f0459ad6c1a1 --- /dev/null +++ b/internal/service/s3control/testdata/Bucket/region_override/main_gen.tf @@ -0,0 +1,26 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_s3control_bucket" "test" { + region = var.region + + bucket = var.rName + outpost_id = data.aws_outposts_outpost.test.id +} + +data "aws_outposts_outposts" "test" {} + +data "aws_outposts_outpost" "test" { + id = tolist(data.aws_outposts_outposts.test.ids)[0] +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "region" { + description = "Region to deploy resource in" + type = string + nullable = false +} diff --git a/internal/service/s3control/testdata/tmpl/bucket_tags.gtpl b/internal/service/s3control/testdata/tmpl/bucket_tags.gtpl new file mode 100644 index 000000000000..f7a2d400688c --- /dev/null +++ b/internal/service/s3control/testdata/tmpl/bucket_tags.gtpl @@ -0,0 +1,12 @@ +resource "aws_s3control_bucket" "test" { +{{- template "region" }} + bucket = var.rName + outpost_id = data.aws_outposts_outpost.test.id +{{- template "tags" }} +} + +data "aws_outposts_outposts" "test" {} + +data "aws_outposts_outpost" "test" { + id = tolist(data.aws_outposts_outposts.test.ids)[0] +} \ No newline at end of file diff --git a/internal/service/s3outposts/endpoint.go b/internal/service/s3outposts/endpoint.go index 0d2d8837a507..4635ac2a78ec 100644 --- a/internal/service/s3outposts/endpoint.go +++ b/internal/service/s3outposts/endpoint.go @@ -15,13 +15,13 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3outposts" awstypes "github.com/aws/aws-sdk-go-v2/service/s3outposts/types" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + "github.com/hashicorp/terraform-provider-aws/internal/retry" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -136,7 +136,7 @@ func resourceEndpointRead(ctx context.Context, d *schema.ResourceData, meta any) endpoint, err := findEndpointByARN(ctx, conn, d.Id()) - if !d.IsNewResource() && tfresource.NotFound(err) { + if !d.IsNewResource() && retry.NotFound(err) { log.Printf("[WARN] S3 Outposts Endpoint %s not found, removing from state", d.Id()) d.SetId("") return diags @@ -236,8 +236,7 @@ func findEndpoints(ctx context.Context, conn *s3outposts.Client, input *s3outpos if errs.IsA[*awstypes.ResourceNotFoundException](err) { return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: input, + LastError: err, } } @@ -251,8 +250,8 @@ func findEndpoints(ctx context.Context, conn *s3outposts.Client, input *s3outpos return output, nil } -func statusEndpoint(ctx context.Context, conn *s3outposts.Client, arn string) retry.StateRefreshFunc { - return func() (any, string, error) { +func statusEndpoint(conn *s3outposts.Client, arn string) retry.StateRefreshFunc { + return func(ctx context.Context) (any, string, error) { output, err := findEndpointByARN(ctx, conn, arn) if tfresource.NotFound(err) { @@ -274,7 +273,7 @@ func waitEndpointStatusCreated(ctx context.Context, conn *s3outposts.Client, arn stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.EndpointStatusPending), Target: enum.Slice(awstypes.EndpointStatusAvailable), - Refresh: statusEndpoint(ctx, conn, arn), + Refresh: statusEndpoint(conn, arn), Timeout: timeout, } @@ -282,7 +281,7 @@ func waitEndpointStatusCreated(ctx context.Context, conn *s3outposts.Client, arn if output, ok := outputRaw.(*awstypes.Endpoint); ok { if failedReason := output.FailedReason; failedReason != nil { - tfresource.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(failedReason.ErrorCode), aws.ToString(failedReason.Message))) + retry.SetLastError(err, fmt.Errorf("%s: %s", aws.ToString(failedReason.ErrorCode), aws.ToString(failedReason.Message))) } return output, err diff --git a/internal/service/s3outposts/endpoint_test.go b/internal/service/s3outposts/endpoint_test.go index 9f47d083eefa..9e71eb78d97d 100644 --- a/internal/service/s3outposts/endpoint_test.go +++ b/internal/service/s3outposts/endpoint_test.go @@ -13,28 +13,27 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/retry" tfs3outposts "github.com/hashicorp/terraform-provider-aws/internal/service/s3outposts" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) func TestAccS3OutpostsEndpoint_basic(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_s3outposts_endpoint.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rInt := sdkacctest.RandIntRange(0, 255) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckOutpostsOutposts(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.S3OutpostsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEndpointDestroy(ctx), + CheckDestroy: testAccCheckEndpointDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEndpointConfig_basic(rName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckEndpointExists(ctx, resourceName), + testAccCheckEndpointExists(ctx, t, resourceName), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "s3-outposts", regexache.MustCompile(`outpost/[^/]+/endpoint/[0-9a-z]+`)), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreationTime), resource.TestCheckResourceAttrPair(resourceName, names.AttrCIDRBlock, "aws_vpc.test", names.AttrCIDRBlock), @@ -58,19 +57,19 @@ func TestAccS3OutpostsEndpoint_basic(t *testing.T) { func TestAccS3OutpostsEndpoint_private(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_s3outposts_endpoint.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rInt := sdkacctest.RandIntRange(0, 255) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckOutpostsOutposts(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.S3OutpostsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEndpointDestroy(ctx), + CheckDestroy: testAccCheckEndpointDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEndpointConfig_private(rName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckEndpointExists(ctx, resourceName), + testAccCheckEndpointExists(ctx, t, resourceName), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "s3-outposts", regexache.MustCompile(`outpost/[^/]+/endpoint/[0-9a-z]+`)), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreationTime), resource.TestCheckResourceAttrPair(resourceName, names.AttrCIDRBlock, "aws_vpc.test", names.AttrCIDRBlock), @@ -94,19 +93,19 @@ func TestAccS3OutpostsEndpoint_private(t *testing.T) { func TestAccS3OutpostsEndpoint_customerOwnedIPv4Pool(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_s3outposts_endpoint.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rInt := sdkacctest.RandIntRange(0, 255) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckOutpostsOutposts(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.S3OutpostsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEndpointDestroy(ctx), + CheckDestroy: testAccCheckEndpointDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEndpointConfig_customerOwnedIPv4Pool(rName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckEndpointExists(ctx, resourceName), + testAccCheckEndpointExists(ctx, t, resourceName), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "s3-outposts", regexache.MustCompile(`outpost/[^/]+/endpoint/[0-9a-z]+`)), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreationTime), resource.TestCheckResourceAttrPair(resourceName, names.AttrCIDRBlock, "aws_vpc.test", names.AttrCIDRBlock), @@ -131,19 +130,19 @@ func TestAccS3OutpostsEndpoint_customerOwnedIPv4Pool(t *testing.T) { func TestAccS3OutpostsEndpoint_disappears(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_s3outposts_endpoint.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rInt := sdkacctest.RandIntRange(0, 255) - resource.ParallelTest(t, resource.TestCase{ + acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckOutpostsOutposts(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.S3OutpostsServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckEndpointDestroy(ctx), + CheckDestroy: testAccCheckEndpointDestroy(ctx, t), Steps: []resource.TestStep{ { Config: testAccEndpointConfig_basic(rName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckEndpointExists(ctx, resourceName), + testAccCheckEndpointExists(ctx, t, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfs3outposts.ResourceEndpoint(), resourceName), ), ExpectNonEmptyPlan: true, @@ -152,9 +151,9 @@ func TestAccS3OutpostsEndpoint_disappears(t *testing.T) { }) } -func testAccCheckEndpointDestroy(ctx context.Context) resource.TestCheckFunc { +func testAccCheckEndpointDestroy(ctx context.Context, t *testing.T) resource.TestCheckFunc { return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).S3OutpostsClient(ctx) + conn := acctest.ProviderMeta(ctx, t).S3OutpostsClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_s3outposts_endpoint" { @@ -163,7 +162,7 @@ func testAccCheckEndpointDestroy(ctx context.Context) resource.TestCheckFunc { _, err := tfs3outposts.FindEndpointByARN(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { + if retry.NotFound(err) { continue } @@ -178,7 +177,7 @@ func testAccCheckEndpointDestroy(ctx context.Context) resource.TestCheckFunc { } } -func testAccCheckEndpointExists(ctx context.Context, n string) resource.TestCheckFunc { +func testAccCheckEndpointExists(ctx context.Context, t *testing.T, n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -188,7 +187,7 @@ func testAccCheckEndpointExists(ctx context.Context, n string) resource.TestChec return fmt.Errorf("No S3 Outposts Endpoint ID is set") } - conn := acctest.Provider.Meta().(*conns.AWSClient).S3OutpostsClient(ctx) + conn := acctest.ProviderMeta(ctx, t).S3OutpostsClient(ctx) _, err := tfs3outposts.FindEndpointByARN(ctx, conn, rs.Primary.ID) diff --git a/internal/service/sfn/activity.go b/internal/service/sfn/activity.go index 83843031adb8..72263c3d533b 100644 --- a/internal/service/sfn/activity.go +++ b/internal/service/sfn/activity.go @@ -27,6 +27,8 @@ import ( // @SDKResource("aws_sfn_activity", name="Activity") // @Tags(identifierAttribute="id") +// @ArnIdentity +// @Testing(preIdentityVersion="v6.14.1") func resourceActivity() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceActivityCreate, @@ -34,11 +36,11 @@ func resourceActivity() *schema.Resource { UpdateWithoutTimeout: resourceActivityUpdate, DeleteWithoutTimeout: resourceActivityDelete, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - Schema: map[string]*schema.Schema{ + names.AttrARN: { + Type: schema.TypeString, + Computed: true, + }, names.AttrCreationDate: { Type: schema.TypeString, Computed: true, @@ -129,6 +131,7 @@ func resourceActivityRead(ctx context.Context, d *schema.ResourceData, meta any) } else { d.Set(names.AttrEncryptionConfiguration, nil) } + d.Set(names.AttrARN, output.ActivityArn) d.Set(names.AttrName, output.Name) return diags diff --git a/internal/service/sfn/activity_identity_gen_test.go b/internal/service/sfn/activity_identity_gen_test.go new file mode 100644 index 000000000000..1f6f83989d19 --- /dev/null +++ b/internal/service/sfn/activity_identity_gen_test.go @@ -0,0 +1,337 @@ +// Code generated by internal/generate/identitytests/main.go; DO NOT EDIT. + +package sfn_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/compare" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccSFNActivity_Identity_Basic(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_sfn_activity.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckActivityDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckActivityExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + }, + }) +} + +func TestAccSFNActivity_Identity_RegionOverride(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_sfn_activity.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: acctest.CheckDestroyNoop, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command with appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import command without appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 4: Import block with Import ID and appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 5: Import block with Import ID and no appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 6: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccSFNActivity_Identity_ExistingResource(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_sfn_activity.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckActivityDestroy(ctx), + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckActivityExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccSFNActivity_Identity_ExistingResource_NoRefresh_NoChange(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_sfn_activity.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckActivityDestroy(ctx), + AdditionalCLIOptions: &resource.AdditionalCLIOptions{ + Plan: resource.PlanOptions{ + NoRefresh: true, + }, + }, + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckActivityExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Activity/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + }, + }) +} diff --git a/internal/service/sfn/activity_test.go b/internal/service/sfn/activity_test.go index c7ad83496646..aea11b5ab1a6 100644 --- a/internal/service/sfn/activity_test.go +++ b/internal/service/sfn/activity_test.go @@ -34,7 +34,7 @@ func TestAccSFNActivity_basic(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccActivityConfig_basic(rName), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttrSet(resourceName, names.AttrCreationDate), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), @@ -63,7 +63,7 @@ func TestAccSFNActivity_disappears(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccActivityConfig_basic(rName), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfsfn.ResourceActivity(), resourceName), ), @@ -86,7 +86,7 @@ func TestAccSFNActivity_tags(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccActivityConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), @@ -99,7 +99,7 @@ func TestAccSFNActivity_tags(t *testing.T) { }, { Config: testAccActivityConfig_basicTags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), @@ -108,7 +108,7 @@ func TestAccSFNActivity_tags(t *testing.T) { }, { Config: testAccActivityConfig_basicTags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), @@ -125,7 +125,7 @@ func TestAccSFNActivity_encryptionConfigurationCustomerManagedKMSKey(t *testing. reusePeriodSeconds := 900 kmsKeyResource := "aws_kms_key.kms_key_for_sfn" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -133,7 +133,7 @@ func TestAccSFNActivity_encryptionConfigurationCustomerManagedKMSKey(t *testing. Steps: []resource.TestStep{ { Config: testAccActivityConfig_encryptionConfigurationCustomerManagedKMSKey(rName, string(awstypes.EncryptionTypeCustomerManagedKmsKey), reusePeriodSeconds), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "encryption_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "encryption_configuration.0.type", string(awstypes.EncryptionTypeCustomerManagedKmsKey)), @@ -156,7 +156,7 @@ func TestAccSFNActivity_encryptionConfigurationServiceOwnedKey(t *testing.T) { rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) resourceName := "aws_sfn_activity.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, @@ -164,7 +164,7 @@ func TestAccSFNActivity_encryptionConfigurationServiceOwnedKey(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccActivityConfig_encryptionConfigurationServiceOwnedKey(rName, string(awstypes.EncryptionTypeAwsOwnedKey)), - Check: resource.ComposeTestCheckFunc( + Check: resource.ComposeAggregateTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "encryption_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "encryption_configuration.0.type", string(awstypes.EncryptionTypeAwsOwnedKey)), diff --git a/internal/service/sfn/alias.go b/internal/service/sfn/alias.go index 27b1c0525520..0c4201a7f4d7 100644 --- a/internal/service/sfn/alias.go +++ b/internal/service/sfn/alias.go @@ -23,6 +23,9 @@ import ( ) // @SDKResource("aws_sfn_alias", name="Alias") +// @ArnIdentity +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/sfn;sfn.DescribeStateMachineAliasOutput") +// @Testing(preIdentityVersion="v6.14.1") func resourceAlias() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceAliasCreate, @@ -30,10 +33,6 @@ func resourceAlias() *schema.Resource { UpdateWithoutTimeout: resourceAliasUpdate, DeleteWithoutTimeout: resourceAliasDelete, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(30 * time.Minute), Update: schema.DefaultTimeout(30 * time.Minute), diff --git a/internal/service/sfn/alias_identity_gen_test.go b/internal/service/sfn/alias_identity_gen_test.go new file mode 100644 index 000000000000..55ab0b14342c --- /dev/null +++ b/internal/service/sfn/alias_identity_gen_test.go @@ -0,0 +1,341 @@ +// Code generated by internal/generate/identitytests/main.go; DO NOT EDIT. + +package sfn_test + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/sfn" + "github.com/hashicorp/terraform-plugin-testing/compare" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccSFNAlias_Identity_Basic(t *testing.T) { + ctx := acctest.Context(t) + + var v sfn.DescribeStateMachineAliasOutput + resourceName := "aws_sfn_alias.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckAliasDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAliasExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import block with Import ID + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + + // Step 4: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.Region())), + }, + }, + }, + }, + }) +} + +func TestAccSFNAlias_Identity_RegionOverride(t *testing.T) { + ctx := acctest.Context(t) + + resourceName := "aws_sfn_alias.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: acctest.CheckDestroyNoop, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + // Step 1: Setup + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.CompareValuePairs(resourceName, tfjsonpath.New(names.AttrID), resourceName, tfjsonpath.New(names.AttrARN), compare.ValuesSame()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + + // Step 2: Import command with appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 3: Import command without appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ImportStateKind: resource.ImportCommandWithID, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + + // Step 4: Import block with Import ID and appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportStateIdFunc: acctest.CrossRegionImportStateIdFunc(resourceName), + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 5: Import block with Import ID and no appended "@" + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithID, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + + // Step 6: Import block with Resource Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/region_override/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "region": config.StringVariable(acctest.AlternateRegion()), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + ImportPlanChecks: resource.ImportPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrARN), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrID), knownvalue.NotNull()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrRegion), knownvalue.StringExact(acctest.AlternateRegion())), + }, + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccSFNAlias_Identity_ExistingResource(t *testing.T) { + ctx := acctest.Context(t) + + var v sfn.DescribeStateMachineAliasOutput + resourceName := "aws_sfn_alias.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckAliasDestroy(ctx), + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAliasExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectIdentity(resourceName, map[string]knownvalue.Check{ + names.AttrARN: knownvalue.NotNull(), + }), + statecheck.ExpectIdentityValueMatchesState(resourceName, tfjsonpath.New(names.AttrARN)), + }, + }, + }, + }) +} + +// Resource Identity was added after v6.14.1 +func TestAccSFNAlias_Identity_ExistingResource_NoRefresh_NoChange(t *testing.T) { + ctx := acctest.Context(t) + + var v sfn.DescribeStateMachineAliasOutput + resourceName := "aws_sfn_alias.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_12_0), + }, + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SFNServiceID), + CheckDestroy: testAccCheckAliasDestroy(ctx), + AdditionalCLIOptions: &resource.AdditionalCLIOptions{ + Plan: resource.PlanOptions{ + NoRefresh: true, + }, + }, + Steps: []resource.TestStep{ + // Step 1: Create pre-Identity + { + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic_v6.14.1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAliasExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + + // Step 2: Current version + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Alias/basic/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + tfstatecheck.ExpectNoIdentity(resourceName), + }, + }, + }, + }) +} diff --git a/internal/service/sfn/service_package_gen.go b/internal/service/sfn/service_package_gen.go index d99a1cc1d9cc..5f038957da03 100644 --- a/internal/service/sfn/service_package_gen.go +++ b/internal/service/sfn/service_package_gen.go @@ -64,12 +64,24 @@ func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePa IdentifierAttribute: names.AttrID, }), Region: unique.Make(inttypes.ResourceRegionDefault()), + Identity: inttypes.RegionalARNIdentity( + inttypes.WithIdentityDuplicateAttrs(names.AttrID), + ), + Import: inttypes.SDKv2Import{ + WrappedImport: true, + }, }, { Factory: resourceAlias, TypeName: "aws_sfn_alias", Name: "Alias", Region: unique.Make(inttypes.ResourceRegionDefault()), + Identity: inttypes.RegionalARNIdentity( + inttypes.WithIdentityDuplicateAttrs(names.AttrID), + ), + Import: inttypes.SDKv2Import{ + WrappedImport: true, + }, }, { Factory: resourceStateMachine, diff --git a/internal/service/sfn/testdata/Activity/basic/main_gen.tf b/internal/service/sfn/testdata/Activity/basic/main_gen.tf new file mode 100644 index 000000000000..ba0fa7d0576d --- /dev/null +++ b/internal/service/sfn/testdata/Activity/basic/main_gen.tf @@ -0,0 +1,11 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_sfn_activity" "test" { + name = var.rName +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} diff --git a/internal/service/sfn/testdata/Activity/basic_v6.14.1/main_gen.tf b/internal/service/sfn/testdata/Activity/basic_v6.14.1/main_gen.tf new file mode 100644 index 000000000000..771095df68ad --- /dev/null +++ b/internal/service/sfn/testdata/Activity/basic_v6.14.1/main_gen.tf @@ -0,0 +1,21 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_sfn_activity" "test" { + name = var.rName +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "6.14.1" + } + } +} + +provider "aws" {} diff --git a/internal/service/sfn/testdata/Activity/region_override/main_gen.tf b/internal/service/sfn/testdata/Activity/region_override/main_gen.tf new file mode 100644 index 000000000000..75aadfb1b3a3 --- /dev/null +++ b/internal/service/sfn/testdata/Activity/region_override/main_gen.tf @@ -0,0 +1,19 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_sfn_activity" "test" { + region = var.region + + name = var.rName +} +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "region" { + description = "Region to deploy resource in" + type = string + nullable = false +} diff --git a/internal/service/sfn/testdata/Alias/basic/main_gen.tf b/internal/service/sfn/testdata/Alias/basic/main_gen.tf new file mode 100644 index 000000000000..259ad7490d7b --- /dev/null +++ b/internal/service/sfn/testdata/Alias/basic/main_gen.tf @@ -0,0 +1,145 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_sfn_alias" "test" { + name = var.rName + + routing_configuration { + state_machine_version_arn = aws_sfn_state_machine.test.state_machine_version_arn + weight = 100 + } +} + +resource "aws_sfn_state_machine" "test" { + name = var.rName + role_arn = aws_iam_role.for_sfn.arn + publish = true + + definition = < **NOTE:** Private zones require at least one VPC association at all times. ```terraform +resource "aws_vpc" "primary" { + cidr_block = "10.6.0.0/16" + enable_dns_hostnames = true + enable_dns_support = true +} + +resource "aws_vpc" "secondary" { + cidr_block = "10.7.0.0/16" + enable_dns_hostnames = true + enable_dns_support = true +} + resource "aws_route53_zone" "private" { name = "example.com" vpc { - vpc_id = aws_vpc.example.id + vpc_id = aws_vpc.primary.id + } + + # Add multiple `vpc` blocks to associate additional VPCs + vpc { + vpc_id = aws_vpc.secondary.id } } ``` diff --git a/website/docs/r/route53recoverycontrolconfig_cluster.html.markdown b/website/docs/r/route53recoverycontrolconfig_cluster.html.markdown index 6890776010c1..265169b07226 100644 --- a/website/docs/r/route53recoverycontrolconfig_cluster.html.markdown +++ b/website/docs/r/route53recoverycontrolconfig_cluster.html.markdown @@ -20,9 +20,10 @@ resource "aws_route53recoverycontrolconfig_cluster" "example" { ## Argument Reference -The following arguments are required: +This resource supports the following arguments: * `name` - (Required) Unique name describing the cluster. +* `network_type` - (Optional) Network type of cluster. Valid values are `IPV4` and `DUALSTACK`. Defaults to `IPV4`. ## Attribute Reference diff --git a/website/docs/r/s3control_bucket.html.markdown b/website/docs/r/s3control_bucket.html.markdown index 7f0f00dfee68..0b4d0928cb0e 100644 --- a/website/docs/r/s3control_bucket.html.markdown +++ b/website/docs/r/s3control_bucket.html.markdown @@ -42,6 +42,27 @@ This resource exports the following attributes in addition to the arguments abov ## Import +In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example: + +```terraform +import { + to = aws_s3control_bucket.example + identity = { + "arn" = "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-12345678/bucket/example" + } +} + +resource "aws_s3control_bucket" "example" { + ### Configuration omitted for brevity ### +} +``` + +### Identity Schema + +#### Required + +- `arn` (String) ARN of the bucket. + In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import S3 Control Buckets using Amazon Resource Name (ARN). For example: ```terraform diff --git a/website/docs/r/sfn_activity.html.markdown b/website/docs/r/sfn_activity.html.markdown index 89c3424300e2..78fa05ccc7c7 100644 --- a/website/docs/r/sfn_activity.html.markdown +++ b/website/docs/r/sfn_activity.html.markdown @@ -55,18 +55,34 @@ This resource supports the following arguments: This resource exports the following attributes in addition to the arguments above: -* `id` - The Amazon Resource Name (ARN) that identifies the created activity. -* `name` - The name of the activity. -* `creation_date` - The date the activity was created. +* `id` - Amazon Resource Name (ARN) of the activity. +* `arn` - Amazon Resource Name (ARN) of the activity. +* `name` - Name of the activity. +* `creation_date` - Date the activity was created. * `tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block). ## Import +In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example: + +```terraform +import { + to = aws_sfn_activity.example + identity = { + "arn" = "arn:aws:states:eu-west-1:123456789098:activity:bar" + } +} + +resource "aws_sfn_activity" "example" { + ### Configuration omitted for brevity ### +} +``` + In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import activities using the `arn`. For example: ```terraform import { - to = aws_sfn_activity.foo + to = aws_sfn_activity.example id = "arn:aws:states:eu-west-1:123456789098:activity:bar" } ``` @@ -74,5 +90,5 @@ import { Using `terraform import`, import activities using the `arn`. For example: ```console -% terraform import aws_sfn_activity.foo arn:aws:states:eu-west-1:123456789098:activity:bar +% terraform import aws_sfn_activity.example arn:aws:states:eu-west-1:123456789098:activity:bar ``` diff --git a/website/docs/r/sfn_alias.html.markdown b/website/docs/r/sfn_alias.html.markdown index 1e351776d3d1..f874f720df0d 100644 --- a/website/docs/r/sfn_alias.html.markdown +++ b/website/docs/r/sfn_alias.html.markdown @@ -62,6 +62,21 @@ This resource exports the following attributes in addition to the arguments abov ## Import +In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example: + +```terraform +import { + to = aws_sfn_alias.example + identity = { + "arn" = "arn:aws:states:us-east-1:123456789098:stateMachine:myStateMachine:foo" + } +} + +resource "aws_sfn_alias" "example" { + ### Configuration omitted for brevity ### +} +``` + In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import SFN (Step Functions) Alias using the `arn`. For example: ```terraform