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 g* (Phase 3c) #30476

Merged
merged 7 commits into from
Apr 5, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 5, 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.

Output from Acceptance Testing

=== RUN   TestAccGrafana_serial
=== PAUSE TestAccGrafana_serial
=== CONT  TestAccGrafana_serial
=== RUN   TestAccGrafana_serial/Workspace
=== RUN   TestAccGrafana_serial/Workspace/tags
--- PASS: TestAccGrafana_serial (435.80s)
    --- PASS: TestAccGrafana_serial/Workspace (435.80s)
        --- PASS: TestAccGrafana_serial/Workspace/tags (435.80s)
PASS
=== RUN   TestAccGuardDuty_serial
=== PAUSE TestAccGuardDuty_serial
=== CONT  TestAccGuardDuty_serial
=== RUN   TestAccGuardDuty_serial/Detector
=== RUN   TestAccGuardDuty_serial/Detector/datasources_kubernetes_audit_logs
=== RUN   TestAccGuardDuty_serial/Detector/datasources_malware_protection
=== RUN   TestAccGuardDuty_serial/Detector/datasources_all
=== RUN   TestAccGuardDuty_serial/Detector/tags
=== RUN   TestAccGuardDuty_serial/Detector/datasource_basic
=== RUN   TestAccGuardDuty_serial/Detector/datasource_id
=== RUN   TestAccGuardDuty_serial/Detector/basic
=== RUN   TestAccGuardDuty_serial/Detector/datasources_s3logs
=== RUN   TestAccGuardDuty_serial/Filter
=== RUN   TestAccGuardDuty_serial/Filter/disappears
=== RUN   TestAccGuardDuty_serial/Filter/basic
=== RUN   TestAccGuardDuty_serial/Filter/update
=== RUN   TestAccGuardDuty_serial/Filter/tags
=== RUN   TestAccGuardDuty_serial/IPSet
=== RUN   TestAccGuardDuty_serial/IPSet/basic
=== RUN   TestAccGuardDuty_serial/IPSet/tags
=== RUN   TestAccGuardDuty_serial/ThreatIntelSet
=== RUN   TestAccGuardDuty_serial/ThreatIntelSet/basic
=== RUN   TestAccGuardDuty_serial/ThreatIntelSet/tags
--- PASS: TestAccGuardDuty_serial (807.44s)
    --- PASS: TestAccGuardDuty_serial/Detector (293.25s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasources_kubernetes_audit_logs (34.22s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasources_malware_protection (29.86s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasources_all (52.03s)
        --- PASS: TestAccGuardDuty_serial/Detector/tags (41.13s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasource_basic (25.32s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasource_id (16.47s)
        --- PASS: TestAccGuardDuty_serial/Detector/basic (55.69s)
        --- PASS: TestAccGuardDuty_serial/Detector/datasources_s3logs (38.52s)
    --- PASS: TestAccGuardDuty_serial/Filter (221.46s)
        --- PASS: TestAccGuardDuty_serial/Filter/disappears (38.66s)
        --- PASS: TestAccGuardDuty_serial/Filter/basic (71.56s)
        --- PASS: TestAccGuardDuty_serial/Filter/update (42.48s)
        --- PASS: TestAccGuardDuty_serial/Filter/tags (68.76s)
    --- PASS: TestAccGuardDuty_serial/IPSet (147.32s)
        --- PASS: TestAccGuardDuty_serial/IPSet/basic (64.92s)
        --- PASS: TestAccGuardDuty_serial/IPSet/tags (82.40s)
    --- PASS: TestAccGuardDuty_serial/ThreatIntelSet (145.41s)
        --- PASS: TestAccGuardDuty_serial/ThreatIntelSet/basic (62.62s)
        --- PASS: TestAccGuardDuty_serial/ThreatIntelSet/tags (82.80s)
PASS
% make testacc TESTARGS='-run=_basic$$\|_tags$$' PKG=g... ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/g.../... -v -count 1 -parallel 2  -run=_basic$\|_tags$ -timeout 180m
=== RUN   TestAccGameLiftAlias_basic
=== PAUSE TestAccGameLiftAlias_basic
=== RUN   TestAccGameLiftAlias_tags
=== PAUSE TestAccGameLiftAlias_tags
=== RUN   TestAccGameLiftBuild_basic
=== PAUSE TestAccGameLiftBuild_basic
=== RUN   TestAccGameLiftBuild_tags
=== PAUSE TestAccGameLiftBuild_tags
=== RUN   TestAccGameLiftFleet_basic
=== PAUSE TestAccGameLiftFleet_basic
=== RUN   TestAccGameLiftFleet_tags
=== PAUSE TestAccGameLiftFleet_tags
=== RUN   TestAccGameLiftGameServerGroup_basic
=== PAUSE TestAccGameLiftGameServerGroup_basic
=== RUN   TestAccGameLiftGameSessionQueue_basic
--- PASS: TestAccGameLiftGameSessionQueue_basic (66.96s)
=== RUN   TestAccGameLiftGameSessionQueue_tags
--- PASS: TestAccGameLiftGameSessionQueue_tags (69.20s)
=== RUN   TestAccGameLiftScript_basic
=== PAUSE TestAccGameLiftScript_basic
=== RUN   TestAccGameLiftScript_tags
=== PAUSE TestAccGameLiftScript_tags
=== CONT  TestAccGameLiftAlias_basic
=== CONT  TestAccGameLiftFleet_tags
--- PASS: TestAccGameLiftAlias_basic (41.49s)
=== CONT  TestAccGameLiftScript_basic
--- PASS: TestAccGameLiftScript_basic (48.09s)
=== CONT  TestAccGameLiftScript_tags
--- PASS: TestAccGameLiftScript_tags (55.27s)
=== CONT  TestAccGameLiftBuild_tags
--- PASS: TestAccGameLiftBuild_tags (71.91s)
=== CONT  TestAccGameLiftFleet_basic
--- PASS: TestAccGameLiftFleet_tags (2037.97s)
=== CONT  TestAccGameLiftAlias_tags
--- PASS: TestAccGameLiftAlias_tags (38.12s)
=== CONT  TestAccGameLiftBuild_basic
--- PASS: TestAccGameLiftBuild_basic (27.69s)
=== CONT  TestAccGameLiftGameServerGroup_basic
--- PASS: TestAccGameLiftGameServerGroup_basic (155.76s)
--- PASS: TestAccGameLiftFleet_basic (2077.80s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/gamelift	2454.076s
=== RUN   TestAccGlacierVaultLock_basic
=== PAUSE TestAccGlacierVaultLock_basic
=== RUN   TestAccGlacierVault_basic
=== PAUSE TestAccGlacierVault_basic
=== RUN   TestAccGlacierVault_tags
=== PAUSE TestAccGlacierVault_tags
=== CONT  TestAccGlacierVaultLock_basic
=== CONT  TestAccGlacierVault_tags
--- PASS: TestAccGlacierVaultLock_basic (40.06s)
=== CONT  TestAccGlacierVault_basic
--- PASS: TestAccGlacierVault_basic (41.60s)
--- PASS: TestAccGlacierVault_tags (90.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/glacier	124.920s
=== RUN   TestAccGlobalAcceleratorAcceleratorDataSource_basic
=== PAUSE TestAccGlobalAcceleratorAcceleratorDataSource_basic
=== RUN   TestAccGlobalAcceleratorAccelerator_basic
=== PAUSE TestAccGlobalAcceleratorAccelerator_basic
=== RUN   TestAccGlobalAcceleratorAccelerator_tags
=== PAUSE TestAccGlobalAcceleratorAccelerator_tags
=== RUN   TestAccGlobalAcceleratorCustomRoutingAcceleratorDataSource_basic
=== PAUSE TestAccGlobalAcceleratorCustomRoutingAcceleratorDataSource_basic
=== RUN   TestAccGlobalAcceleratorCustomRoutingAccelerator_basic
=== PAUSE TestAccGlobalAcceleratorCustomRoutingAccelerator_basic
=== RUN   TestAccGlobalAcceleratorCustomRoutingAccelerator_tags
=== PAUSE TestAccGlobalAcceleratorCustomRoutingAccelerator_tags
=== RUN   TestAccGlobalAcceleratorCustomRoutingEndpointGroup_basic
=== PAUSE TestAccGlobalAcceleratorCustomRoutingEndpointGroup_basic
=== RUN   TestAccGlobalAcceleratorCustomRoutingListener_basic
=== PAUSE TestAccGlobalAcceleratorCustomRoutingListener_basic
=== RUN   TestAccGlobalAcceleratorEndpointGroup_basic
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_basic
=== RUN   TestAccGlobalAcceleratorListener_basic
=== PAUSE TestAccGlobalAcceleratorListener_basic
=== CONT  TestAccGlobalAcceleratorAcceleratorDataSource_basic
=== CONT  TestAccGlobalAcceleratorCustomRoutingAccelerator_tags
--- PASS: TestAccGlobalAcceleratorAcceleratorDataSource_basic (125.12s)
=== CONT  TestAccGlobalAcceleratorEndpointGroup_basic
--- PASS: TestAccGlobalAcceleratorCustomRoutingAccelerator_tags (147.46s)
=== CONT  TestAccGlobalAcceleratorListener_basic
--- PASS: TestAccGlobalAcceleratorListener_basic (128.02s)
=== CONT  TestAccGlobalAcceleratorCustomRoutingAcceleratorDataSource_basic
=== CONT  TestAccGlobalAcceleratorCustomRoutingAccelerator_basic
--- PASS: TestAccGlobalAcceleratorEndpointGroup_basic (208.09s)
--- PASS: TestAccGlobalAcceleratorCustomRoutingAcceleratorDataSource_basic (100.60s)
=== CONT  TestAccGlobalAcceleratorCustomRoutingListener_basic
--- PASS: TestAccGlobalAcceleratorCustomRoutingAccelerator_basic (105.16s)
=== CONT  TestAccGlobalAcceleratorAccelerator_tags
--- PASS: TestAccGlobalAcceleratorCustomRoutingListener_basic (157.05s)
=== CONT  TestAccGlobalAcceleratorAccelerator_basic
--- PASS: TestAccGlobalAcceleratorAccelerator_tags (134.79s)
=== CONT  TestAccGlobalAcceleratorCustomRoutingEndpointGroup_basic
--- PASS: TestAccGlobalAcceleratorAccelerator_basic (95.78s)
--- PASS: TestAccGlobalAcceleratorCustomRoutingEndpointGroup_basic (188.26s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/globalaccelerator	775.995s
=== RUN   TestAccGlueCatalogTableDataSource_basic
=== PAUSE TestAccGlueCatalogTableDataSource_basic
=== RUN   TestAccGlueCatalogTable_basic
=== PAUSE TestAccGlueCatalogTable_basic
=== RUN   TestAccGlueConnectionDataSource_basic
=== PAUSE TestAccGlueConnectionDataSource_basic
=== RUN   TestAccGlueConnection_basic
=== PAUSE TestAccGlueConnection_basic
=== RUN   TestAccGlueConnection_tags
=== PAUSE TestAccGlueConnection_tags
=== RUN   TestAccGlueCrawler_tags
=== PAUSE TestAccGlueCrawler_tags
=== RUN   TestAccGlueDevEndpoint_basic
=== PAUSE TestAccGlueDevEndpoint_basic
=== RUN   TestAccGlueDevEndpoint_tags
=== PAUSE TestAccGlueDevEndpoint_tags
=== RUN   TestAccGlueJob_basic
=== PAUSE TestAccGlueJob_basic
=== RUN   TestAccGlueJob_tags
=== PAUSE TestAccGlueJob_tags
=== RUN   TestAccGlueMlTransform_basic
=== PAUSE TestAccGlueMlTransform_basic
=== RUN   TestAccGlueMlTransform_tags
=== PAUSE TestAccGlueMlTransform_tags
=== RUN   TestAccGluePartitionIndex_basic
=== PAUSE TestAccGluePartitionIndex_basic
=== RUN   TestAccGluePartition_basic
=== PAUSE TestAccGluePartition_basic
=== RUN   TestAccGlueRegistry_basic
=== PAUSE TestAccGlueRegistry_basic
=== RUN   TestAccGlueRegistry_tags
=== PAUSE TestAccGlueRegistry_tags
=== RUN   TestAccGlueSchema_basic
=== PAUSE TestAccGlueSchema_basic
=== RUN   TestAccGlueSchema_tags
=== PAUSE TestAccGlueSchema_tags
=== RUN   TestAccGlueSecurityConfiguration_basic
=== PAUSE TestAccGlueSecurityConfiguration_basic
=== RUN   TestAccGlueTrigger_basic
=== PAUSE TestAccGlueTrigger_basic
=== RUN   TestAccGlueTrigger_tags
=== PAUSE TestAccGlueTrigger_tags
=== RUN   TestAccGlueUserDefinedFunction_basic
=== PAUSE TestAccGlueUserDefinedFunction_basic
=== RUN   TestAccGlueWorkflow_basic
=== PAUSE TestAccGlueWorkflow_basic
=== RUN   TestAccGlueWorkflow_tags
=== PAUSE TestAccGlueWorkflow_tags
=== CONT  TestAccGlueCatalogTableDataSource_basic
=== CONT  TestAccGluePartitionIndex_basic
--- PASS: TestAccGlueCatalogTableDataSource_basic (31.53s)
=== CONT  TestAccGlueDevEndpoint_basic
--- PASS: TestAccGluePartitionIndex_basic (90.71s)
=== CONT  TestAccGlueMlTransform_tags
    ml_transform_test.go:251: Step 1/4 error: Error running apply: exit status 1
        
        Error: creating Glue ML Transform: InvalidInputException: Unable to assume role for arn: arn:aws:iam::123456789012:role/tf-acc-test-3307840531974893715
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "2755fcfc-e751-436a-b489-f5996516c862"
          },
          Message_: "Unable to assume role for arn: arn:aws:iam::123456789012:role/tf-acc-test-3307840531974893715"
        }
        
          with aws_glue_ml_transform.test,
          on terraform_plugin_test.tf line 118, in resource "aws_glue_ml_transform" "test":
         118: resource "aws_glue_ml_transform" "test" {
        
--- FAIL: TestAccGlueMlTransform_tags (15.23s)
=== CONT  TestAccGlueMlTransform_basic
    ml_transform_test.go:29: Step 1/2 error: Error running apply: exit status 1
        
        Error: creating Glue ML Transform: InvalidInputException: Unable to assume role for arn: arn:aws:iam::123456789012:role/tf-acc-test-8101290504737677874
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "c0192223-5804-4de2-81a3-376362004555"
          },
          Message_: "Unable to assume role for arn: arn:aws:iam::123456789012:role/tf-acc-test-8101290504737677874"
        }
        
          with aws_glue_ml_transform.test,
          on terraform_plugin_test.tf line 118, in resource "aws_glue_ml_transform" "test":
         118: resource "aws_glue_ml_transform" "test" {
        
--- FAIL: TestAccGlueMlTransform_basic (13.83s)
=== CONT  TestAccGlueJob_tags
--- PASS: TestAccGlueJob_tags (69.33s)
=== CONT  TestAccGlueJob_basic
--- PASS: TestAccGlueJob_basic (25.76s)
=== CONT  TestAccGlueDevEndpoint_tags
--- PASS: TestAccGlueDevEndpoint_basic (508.54s)
=== CONT  TestAccGlueConnection_basic
--- PASS: TestAccGlueConnection_basic (24.19s)
=== CONT  TestAccGlueCrawler_tags
--- PASS: TestAccGlueCrawler_tags (68.56s)
=== CONT  TestAccGlueConnection_tags
--- PASS: TestAccGlueConnection_tags (54.27s)
=== CONT  TestAccGlueConnectionDataSource_basic
--- PASS: TestAccGlueConnectionDataSource_basic (21.50s)
=== CONT  TestAccGlueCatalogTable_basic
--- PASS: TestAccGlueCatalogTable_basic (25.89s)
=== CONT  TestAccGlueSecurityConfiguration_basic
--- PASS: TestAccGlueDevEndpoint_tags (524.95s)
=== CONT  TestAccGlueWorkflow_tags
--- PASS: TestAccGlueSecurityConfiguration_basic (23.52s)
=== CONT  TestAccGlueWorkflow_basic
--- PASS: TestAccGlueWorkflow_basic (20.56s)
=== CONT  TestAccGlueUserDefinedFunction_basic
--- PASS: TestAccGlueWorkflow_tags (54.16s)
=== CONT  TestAccGlueTrigger_tags
--- PASS: TestAccGlueUserDefinedFunction_basic (41.07s)
=== CONT  TestAccGlueTrigger_basic
--- PASS: TestAccGlueTrigger_basic (36.85s)
=== CONT  TestAccGlueRegistry_tags
--- PASS: TestAccGlueTrigger_tags (70.33s)
=== CONT  TestAccGlueSchema_tags
--- PASS: TestAccGlueRegistry_tags (45.32s)
=== CONT  TestAccGlueSchema_basic
--- PASS: TestAccGlueSchema_tags (56.93s)
=== CONT  TestAccGlueRegistry_basic
--- PASS: TestAccGlueSchema_basic (35.36s)
=== CONT  TestAccGluePartition_basic
--- PASS: TestAccGlueRegistry_basic (35.60s)
--- PASS: TestAccGluePartition_basic (35.11s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/glue	1025.526s
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/grafana	9.898s [no tests to run]
?   	github.com/hashicorp/terraform-provider-aws/internal/service/greengrass	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	45.656s [no tests to run]
FAIL
make: *** [testacc] Error 1

@github-actions
Copy link

github-actions bot commented Apr 5, 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/gamelift Issues and PRs that pertain to the gamelift service. service/glacier Issues and PRs that pertain to the glacier service. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. service/glue Issues and PRs that pertain to the glue service. service/grafana Issues and PRs that pertain to the grafana service. service/guardduty Issues and PRs that pertain to the guardduty service. size/XL Managed by automation to categorize the size of a PR. labels Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This functionality has been released in v4.62.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

github-actions bot commented May 9, 2023

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 9, 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/gamelift Issues and PRs that pertain to the gamelift service. service/glacier Issues and PRs that pertain to the glacier service. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. service/glue Issues and PRs that pertain to the glue service. service/grafana Issues and PRs that pertain to the grafana service. service/guardduty Issues and PRs that pertain to the guardduty 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.

None yet

1 participant