Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech debt: Reduce tags boilerplate code - Plugin SDK resources k* (Phase 3c) #30516

Merged
merged 8 commits into from
Apr 7, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 6, 2023

Description

Extends the work done in Phase 2 to the remaining resources implemented using Terraform Plugin SDK.

Relations

Relates #30280.
Relates #29747.
Relates #30417.
Relates #30421.
Relates #30430.
Relates #30449.
Relates #30454.
Relates #30461.
Relates #30463.
Relates #30476.
Relates #30477.
Relates #30478.
Relates #30483.
Relates #30484.
Relates #30491.
Relates #30509.
Relates #30510.
Relates #30512.

Output from Acceptance Testing

% make testacc TESTARGS='-run=_basic$$\|_tags$$' PKG=k... ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/k.../... -v -count 1 -parallel 3  -run=_basic$\|_tags$ -timeout 180m
=== RUN   TestAccKafkaBrokerNodesDataSource_basic
=== PAUSE TestAccKafkaBrokerNodesDataSource_basic
=== RUN   TestAccKafkaClusterDataSource_basic
=== PAUSE TestAccKafkaClusterDataSource_basic
=== RUN   TestAccKafkaCluster_basic
=== PAUSE TestAccKafkaCluster_basic
=== RUN   TestAccKafkaCluster_tags
=== PAUSE TestAccKafkaCluster_tags
=== RUN   TestAccKafkaConfiguration_basic
=== PAUSE TestAccKafkaConfiguration_basic
=== RUN   TestAccKafkaKafkaVersionDataSource_basic
=== PAUSE TestAccKafkaKafkaVersionDataSource_basic
=== RUN   TestAccKafkaScramSecretAssociation_basic
=== PAUSE TestAccKafkaScramSecretAssociation_basic
=== RUN   TestAccKafkaServerlessCluster_basic
=== PAUSE TestAccKafkaServerlessCluster_basic
=== RUN   TestAccKafkaServerlessCluster_tags
=== PAUSE TestAccKafkaServerlessCluster_tags
=== CONT  TestAccKafkaBrokerNodesDataSource_basic
=== CONT  TestAccKafkaKafkaVersionDataSource_basic
=== CONT  TestAccKafkaServerlessCluster_tags
--- PASS: TestAccKafkaKafkaVersionDataSource_basic (81.76s)
=== CONT  TestAccKafkaServerlessCluster_basic
=== CONT  TestAccKafkaServerlessCluster_tags
    serverless_cluster_test.go:86: Step 1/4 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
        -/+ destroy and then create replacement
        
        Terraform will perform the following actions:
        
          # aws_msk_serverless_cluster.test must be replaced
        -/+ resource "aws_msk_serverless_cluster" "test" {
              ~ arn          = "arn:aws:kafka:us-west-2:123456789012:cluster/tf-acc-test-735421940149360127/08eba591-72e8-4c65-855f-540d41caceac-s2" -> (known after apply)
              ~ id           = "arn:aws:kafka:us-west-2:123456789012:cluster/tf-acc-test-735421940149360127/08eba591-72e8-4c65-855f-540d41caceac-s2" -> (known after apply)
                tags         = {
                    "key1" = "value1"
                }
                # (2 unchanged attributes hidden)
        
        
              ~ vpc_config {
                  - security_group_ids = [
                      - "sg-0685fa6b41dca9ea2",
                    ] -> null # forces replacement
                    # (1 unchanged attribute hidden)
                }
                # (1 unchanged block hidden)
            }
        
        Plan: 1 to add, 0 to change, 1 to destroy.
=== CONT  TestAccKafkaServerlessCluster_basic
    serverless_cluster_test.go:25: Step 1/2 error: Check failed: 1 error occurred:
        	* Check 10/11 error: aws_msk_serverless_cluster.test: Attribute 'vpc_config.0.security_group_ids.#' expected "0", got "1"
        
--- FAIL: TestAccKafkaServerlessCluster_tags (330.43s)
=== CONT  TestAccKafkaScramSecretAssociation_basic
--- FAIL: TestAccKafkaServerlessCluster_basic (327.16s)
=== CONT  TestAccKafkaCluster_tags
--- PASS: TestAccKafkaCluster_tags (1526.37s)
=== CONT  TestAccKafkaConfiguration_basic
--- PASS: TestAccKafkaScramSecretAssociation_basic (1606.09s)
=== CONT  TestAccKafkaCluster_basic
--- PASS: TestAccKafkaBrokerNodesDataSource_basic (1938.39s)
=== CONT  TestAccKafkaClusterDataSource_basic
--- PASS: TestAccKafkaConfiguration_basic (60.58s)
--- PASS: TestAccKafkaCluster_basic (1779.69s)
--- PASS: TestAccKafkaClusterDataSource_basic (1779.86s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/kafka	3780.388s
=== RUN   TestAccKafkaConnectConnectorDataSource_basic
=== PAUSE TestAccKafkaConnectConnectorDataSource_basic
=== RUN   TestAccKafkaConnectConnector_basic
=== PAUSE TestAccKafkaConnectConnector_basic
=== RUN   TestAccKafkaConnectCustomPluginDataSource_basic
=== PAUSE TestAccKafkaConnectCustomPluginDataSource_basic
=== RUN   TestAccKafkaConnectCustomPlugin_basic
=== PAUSE TestAccKafkaConnectCustomPlugin_basic
=== RUN   TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== PAUSE TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== RUN   TestAccKafkaConnectWorkerConfiguration_basic
=== PAUSE TestAccKafkaConnectWorkerConfiguration_basic
=== CONT  TestAccKafkaConnectConnectorDataSource_basic
=== CONT  TestAccKafkaConnectCustomPlugin_basic
=== CONT  TestAccKafkaConnectWorkerConfiguration_basic
--- PASS: TestAccKafkaConnectWorkerConfiguration_basic (115.03s)
=== CONT  TestAccKafkaConnectCustomPluginDataSource_basic
--- PASS: TestAccKafkaConnectCustomPlugin_basic (147.26s)
=== CONT  TestAccKafkaConnectWorkerConfigurationDataSource_basic
--- PASS: TestAccKafkaConnectCustomPluginDataSource_basic (77.35s)
=== CONT  TestAccKafkaConnectConnector_basic
--- PASS: TestAccKafkaConnectWorkerConfigurationDataSource_basic (54.99s)
--- PASS: TestAccKafkaConnectConnectorDataSource_basic (2392.07s)
--- PASS: TestAccKafkaConnectConnector_basic (2217.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect	2457.724s
=== RUN   TestAccKendraDataSource_basic
=== PAUSE TestAccKendraDataSource_basic
=== RUN   TestAccKendraDataSource_tags
=== PAUSE TestAccKendraDataSource_tags
=== RUN   TestAccKendraExperienceDataSource_basic
=== PAUSE TestAccKendraExperienceDataSource_basic
=== RUN   TestAccKendraExperience_basic
=== PAUSE TestAccKendraExperience_basic
=== RUN   TestAccKendraFaqDataSource_basic
=== PAUSE TestAccKendraFaqDataSource_basic
=== RUN   TestAccKendraFaq_basic
=== PAUSE TestAccKendraFaq_basic
=== RUN   TestAccKendraFaq_tags
=== PAUSE TestAccKendraFaq_tags
=== RUN   TestAccKendraIndexDataSource_basic
=== PAUSE TestAccKendraIndexDataSource_basic
=== RUN   TestAccKendraIndex_basic
=== PAUSE TestAccKendraIndex_basic
=== RUN   TestAccKendraQuerySuggestionsBlockListDataSource_basic
=== PAUSE TestAccKendraQuerySuggestionsBlockListDataSource_basic
=== RUN   TestAccKendraQuerySuggestionsBlockList_basic
=== PAUSE TestAccKendraQuerySuggestionsBlockList_basic
=== RUN   TestAccKendraQuerySuggestionsBlockList_tags
=== PAUSE TestAccKendraQuerySuggestionsBlockList_tags
=== RUN   TestAccKendraThesaurusDataSource_basic
=== PAUSE TestAccKendraThesaurusDataSource_basic
=== RUN   TestAccKendraThesaurus_basic
=== PAUSE TestAccKendraThesaurus_basic
=== RUN   TestAccKendraThesaurus_tags
=== PAUSE TestAccKendraThesaurus_tags
=== CONT  TestAccKendraDataSource_basic
=== CONT  TestAccKendraIndex_basic
=== CONT  TestAccKendraThesaurusDataSource_basic
--- PASS: TestAccKendraIndex_basic (948.02s)
=== CONT  TestAccKendraThesaurus_tags
--- PASS: TestAccKendraThesaurusDataSource_basic (988.62s)
=== CONT  TestAccKendraThesaurus_basic
--- PASS: TestAccKendraDataSource_basic (1855.52s)
=== CONT  TestAccKendraFaqDataSource_basic
--- PASS: TestAccKendraThesaurus_basic (1394.20s)
=== CONT  TestAccKendraFaq_tags
--- PASS: TestAccKendraThesaurus_tags (1503.89s)
=== CONT  TestAccKendraIndexDataSource_basic
--- PASS: TestAccKendraFaqDataSource_basic (1298.42s)
=== CONT  TestAccKendraExperienceDataSource_basic
    acctest.go:912: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccKendraExperienceDataSource_basic (0.39s)
=== CONT  TestAccKendraFaq_basic
--- PASS: TestAccKendraFaq_tags (1209.80s)
=== CONT  TestAccKendraExperience_basic
    acctest.go:912: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccKendraExperience_basic (0.33s)
=== CONT  TestAccKendraDataSource_tags
--- PASS: TestAccKendraFaq_basic (899.32s)
=== CONT  TestAccKendraQuerySuggestionsBlockList_basic
--- PASS: TestAccKendraIndexDataSource_basic (2108.10s)
=== CONT  TestAccKendraQuerySuggestionsBlockList_tags
--- PASS: TestAccKendraDataSource_tags (1957.91s)
=== CONT  TestAccKendraQuerySuggestionsBlockListDataSource_basic
--- PASS: TestAccKendraQuerySuggestionsBlockList_basic (1684.94s)
--- PASS: TestAccKendraQuerySuggestionsBlockList_tags (1624.51s)
--- PASS: TestAccKendraQuerySuggestionsBlockListDataSource_basic (1292.55s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kendra	6920.608s
=== RUN   TestAccKeyspacesKeyspace_basic
=== PAUSE TestAccKeyspacesKeyspace_basic
=== RUN   TestAccKeyspacesKeyspace_tags
=== PAUSE TestAccKeyspacesKeyspace_tags
=== RUN   TestAccKeyspacesTable_basic
=== PAUSE TestAccKeyspacesTable_basic
=== RUN   TestAccKeyspacesTable_tags
=== PAUSE TestAccKeyspacesTable_tags
=== CONT  TestAccKeyspacesKeyspace_basic
=== CONT  TestAccKeyspacesTable_basic
=== CONT  TestAccKeyspacesKeyspace_tags
--- PASS: TestAccKeyspacesKeyspace_basic (166.86s)
=== CONT  TestAccKeyspacesTable_tags
--- PASS: TestAccKeyspacesTable_basic (188.33s)
--- PASS: TestAccKeyspacesKeyspace_tags (243.17s)
--- PASS: TestAccKeyspacesTable_tags (191.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/keyspaces	393.820s
=== RUN   TestAccKinesisStreamConsumerDataSource_basic
=== PAUSE TestAccKinesisStreamConsumerDataSource_basic
=== RUN   TestAccKinesisStreamConsumer_basic
=== PAUSE TestAccKinesisStreamConsumer_basic
=== RUN   TestAccKinesisStreamDataSource_basic
=== PAUSE TestAccKinesisStreamDataSource_basic
=== RUN   TestAccKinesisStream_basic
=== PAUSE TestAccKinesisStream_basic
=== RUN   TestAccKinesisStream_tags
=== PAUSE TestAccKinesisStream_tags
=== CONT  TestAccKinesisStreamConsumerDataSource_basic
=== CONT  TestAccKinesisStream_basic
=== CONT  TestAccKinesisStream_tags
--- PASS: TestAccKinesisStream_basic (107.92s)
=== CONT  TestAccKinesisStreamDataSource_basic
--- PASS: TestAccKinesisStreamConsumerDataSource_basic (113.68s)
=== CONT  TestAccKinesisStreamConsumer_basic
--- PASS: TestAccKinesisStream_tags (183.12s)
--- PASS: TestAccKinesisStreamConsumer_basic (107.31s)
--- PASS: TestAccKinesisStreamDataSource_basic (147.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kinesis	349.489s
=== RUN   TestAccKinesisAnalyticsApplication_basic
=== PAUSE TestAccKinesisAnalyticsApplication_basic
=== RUN   TestAccKinesisAnalyticsApplication_tags
=== PAUSE TestAccKinesisAnalyticsApplication_tags
=== CONT  TestAccKinesisAnalyticsApplication_basic
=== CONT  TestAccKinesisAnalyticsApplication_tags
--- PASS: TestAccKinesisAnalyticsApplication_basic (107.88s)
--- PASS: TestAccKinesisAnalyticsApplication_tags (191.21s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kinesisanalytics	213.118s
=== RUN   TestAccKinesisAnalyticsV2ApplicationSnapshot_basic
=== PAUSE TestAccKinesisAnalyticsV2ApplicationSnapshot_basic
=== RUN   TestAccKinesisAnalyticsV2Application_tags
=== PAUSE TestAccKinesisAnalyticsV2Application_tags
=== CONT  TestAccKinesisAnalyticsV2ApplicationSnapshot_basic
=== CONT  TestAccKinesisAnalyticsV2Application_tags
--- PASS: TestAccKinesisAnalyticsV2Application_tags (167.52s)
--- PASS: TestAccKinesisAnalyticsV2ApplicationSnapshot_basic (280.24s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kinesisanalyticsv2	371.175s
=== RUN   TestAccKinesisVideoStream_basic
=== PAUSE TestAccKinesisVideoStream_basic
=== RUN   TestAccKinesisVideoStream_tags
=== PAUSE TestAccKinesisVideoStream_tags
=== CONT  TestAccKinesisVideoStream_basic
=== CONT  TestAccKinesisVideoStream_tags
--- PASS: TestAccKinesisVideoStream_tags (241.01s)
--- PASS: TestAccKinesisVideoStream_basic (256.39s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kinesisvideo	342.781s
=== RUN   TestAccKMSAlias_basic
=== PAUSE TestAccKMSAlias_basic
=== RUN   TestAccKMSCiphertextDataSource_basic
=== PAUSE TestAccKMSCiphertextDataSource_basic
=== RUN   TestAccKMSCiphertext_Resource_basic
=== PAUSE TestAccKMSCiphertext_Resource_basic
=== RUN   TestAccKMSCustomKeyStoreDataSource_basic
    custom_key_store_data_source_test.go:17: CLOUD_HSM_CLUSTER_ID environment variable not set
--- SKIP: TestAccKMSCustomKeyStoreDataSource_basic (0.00s)
=== RUN   TestAccKMSExternalKey_basic
=== PAUSE TestAccKMSExternalKey_basic
=== RUN   TestAccKMSExternalKey_tags
=== PAUSE TestAccKMSExternalKey_tags
=== RUN   TestAccKMSGrant_basic
=== PAUSE TestAccKMSGrant_basic
=== RUN   TestAccKMSKeyPolicy_basic
=== PAUSE TestAccKMSKeyPolicy_basic
=== RUN   TestAccKMSKey_basic
=== PAUSE TestAccKMSKey_basic
=== RUN   TestAccKMSKey_Policy_basic
=== PAUSE TestAccKMSKey_Policy_basic
=== RUN   TestAccKMSKey_tags
=== PAUSE TestAccKMSKey_tags
=== RUN   TestAccKMSPublicKeyDataSource_basic
=== PAUSE TestAccKMSPublicKeyDataSource_basic
=== RUN   TestAccKMSReplicaExternalKey_basic
=== PAUSE TestAccKMSReplicaExternalKey_basic
=== RUN   TestAccKMSReplicaExternalKey_tags
=== PAUSE TestAccKMSReplicaExternalKey_tags
=== RUN   TestAccKMSReplicaKey_basic
=== PAUSE TestAccKMSReplicaKey_basic
=== RUN   TestAccKMSReplicaKey_tags
=== PAUSE TestAccKMSReplicaKey_tags
=== RUN   TestAccKMSSecretsDataSource_basic
=== PAUSE TestAccKMSSecretsDataSource_basic
=== CONT  TestAccKMSAlias_basic
=== CONT  TestAccKMSKey_Policy_basic
=== CONT  TestAccKMSReplicaExternalKey_tags
--- PASS: TestAccKMSAlias_basic (38.56s)
=== CONT  TestAccKMSExternalKey_tags
--- PASS: TestAccKMSKey_Policy_basic (61.13s)
=== CONT  TestAccKMSKey_basic
--- PASS: TestAccKMSKey_basic (37.74s)
=== CONT  TestAccKMSKeyPolicy_basic
--- PASS: TestAccKMSExternalKey_tags (105.19s)
=== CONT  TestAccKMSGrant_basic
--- PASS: TestAccKMSKeyPolicy_basic (81.96s)
=== CONT  TestAccKMSReplicaKey_tags
--- PASS: TestAccKMSGrant_basic (51.50s)
=== CONT  TestAccKMSSecretsDataSource_basic
--- PASS: TestAccKMSReplicaExternalKey_tags (205.81s)
=== CONT  TestAccKMSReplicaKey_basic
--- PASS: TestAccKMSSecretsDataSource_basic (51.97s)
=== CONT  TestAccKMSPublicKeyDataSource_basic
--- PASS: TestAccKMSReplicaKey_basic (65.50s)
=== CONT  TestAccKMSReplicaExternalKey_basic
--- PASS: TestAccKMSPublicKeyDataSource_basic (26.86s)
=== CONT  TestAccKMSCiphertext_Resource_basic
--- PASS: TestAccKMSCiphertext_Resource_basic (25.94s)
=== CONT  TestAccKMSExternalKey_basic
--- PASS: TestAccKMSExternalKey_basic (26.23s)
=== CONT  TestAccKMSCiphertextDataSource_basic
--- PASS: TestAccKMSReplicaKey_tags (153.76s)
=== CONT  TestAccKMSKey_tags
--- PASS: TestAccKMSReplicaExternalKey_basic (76.64s)
--- PASS: TestAccKMSCiphertextDataSource_basic (28.12s)
--- PASS: TestAccKMSKey_tags (81.91s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kms	433.646s
FAIL
make: *** [testacc] Error 1

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added generators Relates to code generators. service/kafka Issues and PRs that pertain to the kafka service. service/kendra Issues and PRs that pertain to the kendra service. service/keyspaces Issues and PRs that pertain to the keyspaces service. service/kinesis Issues and PRs that pertain to the kinesis service. service/kinesisvideo Issues and PRs that pertain to the kinesisvideo service. service/kinesisanalytics Issues and PRs that pertain to the kinesisanalytics service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. size/XL Managed by automation to categorize the size of a PR. and removed service/kinesis Issues and PRs that pertain to the kinesis service. service/kinesisvideo Issues and PRs that pertain to the kinesisvideo service. service/kinesisanalytics Issues and PRs that pertain to the kinesisanalytics service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. service/kafka Issues and PRs that pertain to the kafka service. service/kendra Issues and PRs that pertain to the kendra service. generators Relates to code generators. service/keyspaces Issues and PRs that pertain to the keyspaces service. labels Apr 6, 2023
@github-actions github-actions bot added generators Relates to code generators. service/kafka Issues and PRs that pertain to the kafka service. service/kendra Issues and PRs that pertain to the kendra service. service/keyspaces Issues and PRs that pertain to the keyspaces service. labels Apr 6, 2023
@github-actions github-actions bot added service/kinesis Issues and PRs that pertain to the kinesis service. service/kinesisvideo Issues and PRs that pertain to the kinesisvideo service. service/kinesisanalytics Issues and PRs that pertain to the kinesisanalytics service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. labels Apr 6, 2023
@ewbankkit ewbankkit merged commit 8e11a9d into main Apr 7, 2023
@ewbankkit ewbankkit deleted the td-transparent-tagging-phase3c-k branch April 7, 2023 15:40
@github-actions github-actions bot added this to the v4.63.0 milestone Apr 7, 2023
@github-actions
Copy link

This functionality has been released in v4.63.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generators Relates to code generators. service/kafka Issues and PRs that pertain to the kafka service. service/kendra Issues and PRs that pertain to the kendra service. service/keyspaces Issues and PRs that pertain to the keyspaces service. service/kinesis Issues and PRs that pertain to the kinesis service. service/kinesisanalytics Issues and PRs that pertain to the kinesisanalytics service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. service/kinesisvideo Issues and PRs that pertain to the kinesisvideo service. size/XL Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant