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

r/aws_api_gateway_rest_api: Correct set root_resource_id on resource Read #37040

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 22, 2024

Description

Correctly sets root_resource_id for non-AWS API Gateway implementations.

Relations

Closes #37007.
Relates #36445.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccAPIGatewayResource_\|TestAccAPIGatewayRestAPIDataSource_\|TestAccAPIGatewayRestAPI_' PKG=apigateway ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/apigateway/... -v -count 1 -parallel 3  -run=TestAccAPIGatewayResource_\|TestAccAPIGatewayRestAPIDataSource_\|TestAccAPIGatewayRestAPI_ -timeout 360m
=== RUN   TestAccAPIGatewayResource_basic
=== PAUSE TestAccAPIGatewayResource_basic
=== RUN   TestAccAPIGatewayResource_update
=== PAUSE TestAccAPIGatewayResource_update
=== RUN   TestAccAPIGatewayResource_disappears
=== PAUSE TestAccAPIGatewayResource_disappears
=== RUN   TestAccAPIGatewayResource_withSleep
=== PAUSE TestAccAPIGatewayResource_withSleep
=== RUN   TestAccAPIGatewayRestAPIDataSource_basic
=== PAUSE TestAccAPIGatewayRestAPIDataSource_basic
=== RUN   TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
=== PAUSE TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
=== RUN   TestAccAPIGatewayRestAPI_basic
=== PAUSE TestAccAPIGatewayRestAPI_basic
=== RUN   TestAccAPIGatewayRestAPI_tags
=== PAUSE TestAccAPIGatewayRestAPI_tags
=== RUN   TestAccAPIGatewayRestAPI_disappears
=== PAUSE TestAccAPIGatewayRestAPI_disappears
=== RUN   TestAccAPIGatewayRestAPI_endpoint
=== PAUSE TestAccAPIGatewayRestAPI_endpoint
=== RUN   TestAccAPIGatewayRestAPI_Endpoint_private
=== PAUSE TestAccAPIGatewayRestAPI_Endpoint_private
=== RUN   TestAccAPIGatewayRestAPI_apiKeySource
=== PAUSE TestAccAPIGatewayRestAPI_apiKeySource
=== RUN   TestAccAPIGatewayRestAPI_APIKeySource_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_APIKeySource_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_APIKeySource_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_APIKeySource_setByBody
=== RUN   TestAccAPIGatewayRestAPI_binaryMediaTypes
=== PAUSE TestAccAPIGatewayRestAPI_binaryMediaTypes
=== RUN   TestAccAPIGatewayRestAPI_BinaryMediaTypes_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_BinaryMediaTypes_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_BinaryMediaTypes_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_BinaryMediaTypes_setByBody
=== RUN   TestAccAPIGatewayRestAPI_body
=== PAUSE TestAccAPIGatewayRestAPI_body
=== RUN   TestAccAPIGatewayRestAPI_description
=== PAUSE TestAccAPIGatewayRestAPI_description
=== RUN   TestAccAPIGatewayRestAPI_Description_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_Description_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_Description_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_Description_setByBody
=== RUN   TestAccAPIGatewayRestAPI_disableExecuteAPIEndpoint
=== PAUSE TestAccAPIGatewayRestAPI_disableExecuteAPIEndpoint
=== RUN   TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_setByBody
=== RUN   TestAccAPIGatewayRestAPI_Endpoint_vpcEndpointIDs
=== PAUSE TestAccAPIGatewayRestAPI_Endpoint_vpcEndpointIDs
=== RUN   TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_mergeBody
=== PAUSE TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_mergeBody
=== RUN   TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideToMergeBody
=== PAUSE TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideToMergeBody
=== RUN   TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_setByBody
=== RUN   TestAccAPIGatewayRestAPI_minimumCompressionSize
=== PAUSE TestAccAPIGatewayRestAPI_minimumCompressionSize
=== RUN   TestAccAPIGatewayRestAPI_MinimumCompressionSize_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_MinimumCompressionSize_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_MinimumCompressionSize_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_MinimumCompressionSize_setByBody
=== RUN   TestAccAPIGatewayRestAPI_Name_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_Name_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_FailOnWarnings
=== PAUSE TestAccAPIGatewayRestAPI_FailOnWarnings
=== RUN   TestAccAPIGatewayRestAPI_parameters
=== PAUSE TestAccAPIGatewayRestAPI_parameters
=== RUN   TestAccAPIGatewayRestAPI_Policy_basic
=== PAUSE TestAccAPIGatewayRestAPI_Policy_basic
=== RUN   TestAccAPIGatewayRestAPI_Policy_order
=== PAUSE TestAccAPIGatewayRestAPI_Policy_order
=== RUN   TestAccAPIGatewayRestAPI_Policy_overrideBody
=== PAUSE TestAccAPIGatewayRestAPI_Policy_overrideBody
=== RUN   TestAccAPIGatewayRestAPI_Policy_setByBody
=== PAUSE TestAccAPIGatewayRestAPI_Policy_setByBody
=== CONT  TestAccAPIGatewayResource_basic
=== CONT  TestAccAPIGatewayRestAPI_Description_setByBody
=== CONT  TestAccAPIGatewayRestAPI_MinimumCompressionSize_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_Description_setByBody (25.54s)
=== CONT  TestAccAPIGatewayRestAPI_Policy_setByBody
--- PASS: TestAccAPIGatewayResource_basic (25.64s)
=== CONT  TestAccAPIGatewayRestAPI_Policy_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_MinimumCompressionSize_overrideBody (88.57s)
=== CONT  TestAccAPIGatewayRestAPI_Policy_order
--- PASS: TestAccAPIGatewayRestAPI_Policy_setByBody (92.70s)
=== CONT  TestAccAPIGatewayRestAPI_Policy_basic
--- PASS: TestAccAPIGatewayRestAPI_Policy_order (29.87s)
=== CONT  TestAccAPIGatewayRestAPI_parameters
--- PASS: TestAccAPIGatewayRestAPI_parameters (99.61s)
=== CONT  TestAccAPIGatewayRestAPI_FailOnWarnings
--- PASS: TestAccAPIGatewayRestAPI_FailOnWarnings (45.53s)
=== CONT  TestAccAPIGatewayRestAPI_Name_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_Name_overrideBody (42.21s)
=== CONT  TestAccAPIGatewayRestAPI_MinimumCompressionSize_setByBody
--- PASS: TestAccAPIGatewayRestAPI_MinimumCompressionSize_setByBody (19.51s)
=== CONT  TestAccAPIGatewayRestAPI_BinaryMediaTypes_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_BinaryMediaTypes_overrideBody (42.60s)
=== CONT  TestAccAPIGatewayRestAPI_Description_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_Description_overrideBody (42.42s)
=== CONT  TestAccAPIGatewayRestAPI_description
--- PASS: TestAccAPIGatewayRestAPI_description (29.62s)
=== CONT  TestAccAPIGatewayRestAPI_body
--- PASS: TestAccAPIGatewayRestAPI_body (31.16s)
=== CONT  TestAccAPIGatewayRestAPI_BinaryMediaTypes_setByBody
--- PASS: TestAccAPIGatewayRestAPI_BinaryMediaTypes_setByBody (79.62s)
=== CONT  TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideBody (152.88s)
=== CONT  TestAccAPIGatewayRestAPI_minimumCompressionSize
--- PASS: TestAccAPIGatewayRestAPI_minimumCompressionSize (42.98s)
=== CONT  TestAccAPIGatewayRestAPI_Endpoint_private
--- PASS: TestAccAPIGatewayRestAPI_Endpoint_private (43.10s)
=== CONT  TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_setByBody
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_setByBody (134.12s)
=== CONT  TestAccAPIGatewayRestAPI_binaryMediaTypes
--- PASS: TestAccAPIGatewayRestAPI_binaryMediaTypes (29.95s)
=== CONT  TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideToMergeBody
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideToMergeBody (164.78s)
=== CONT  TestAccAPIGatewayRestAPI_APIKeySource_setByBody
--- PASS: TestAccAPIGatewayRestAPI_APIKeySource_setByBody (20.06s)
=== CONT  TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_mergeBody
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_mergeBody (200.43s)
=== CONT  TestAccAPIGatewayRestAPI_APIKeySource_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_APIKeySource_overrideBody (43.52s)
=== CONT  TestAccAPIGatewayRestAPI_apiKeySource
--- PASS: TestAccAPIGatewayRestAPI_apiKeySource (39.02s)
=== CONT  TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
--- PASS: TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs (138.75s)
=== CONT  TestAccAPIGatewayResource_withSleep
--- PASS: TestAccAPIGatewayResource_withSleep (36.73s)
=== CONT  TestAccAPIGatewayRestAPI_endpoint
--- PASS: TestAccAPIGatewayRestAPI_endpoint (80.45s)
=== CONT  TestAccAPIGatewayRestAPIDataSource_basic
--- PASS: TestAccAPIGatewayRestAPIDataSource_basic (19.81s)
=== CONT  TestAccAPIGatewayRestAPI_disappears
--- PASS: TestAccAPIGatewayRestAPI_disappears (77.16s)
=== CONT  TestAccAPIGatewayRestAPI_tags
--- PASS: TestAccAPIGatewayRestAPI_tags (41.13s)
=== CONT  TestAccAPIGatewayResource_disappears
--- PASS: TestAccAPIGatewayResource_disappears (32.87s)
=== CONT  TestAccAPIGatewayRestAPI_basic
--- PASS: TestAccAPIGatewayRestAPI_basic (27.91s)
=== CONT  TestAccAPIGatewayRestAPI_Endpoint_vpcEndpointIDs
--- PASS: TestAccAPIGatewayRestAPI_Policy_overrideBody (1966.76s)
=== CONT  TestAccAPIGatewayResource_update
--- PASS: TestAccAPIGatewayResource_update (33.41s)
=== CONT  TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_overrideBody
--- PASS: TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_overrideBody (44.40s)
=== CONT  TestAccAPIGatewayRestAPI_disableExecuteAPIEndpoint
--- PASS: TestAccAPIGatewayRestAPI_Endpoint_vpcEndpointIDs (219.83s)
=== CONT  TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_setByBody
--- PASS: TestAccAPIGatewayRestAPI_disableExecuteAPIEndpoint (43.72s)
--- PASS: TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_setByBody (57.90s)
--- PASS: TestAccAPIGatewayRestAPI_Policy_basic (2175.83s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	2304.271s

% make testacc TESTARGS='-run=TestAccAPIGatewayResource_' PKG=apigateway
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/apigateway/... -v -count 1 -parallel 20  -run=TestAccAPIGatewayResource_ -timeout 360m
=== RUN   TestAccAPIGatewayResource_basic
=== PAUSE TestAccAPIGatewayResource_basic
=== RUN   TestAccAPIGatewayResource_update
=== PAUSE TestAccAPIGatewayResource_update
=== RUN   TestAccAPIGatewayResource_disappears
=== PAUSE TestAccAPIGatewayResource_disappears
=== RUN   TestAccAPIGatewayResource_withSleep
=== PAUSE TestAccAPIGatewayResource_withSleep
=== CONT  TestAccAPIGatewayResource_basic
=== CONT  TestAccAPIGatewayResource_disappears
=== CONT  TestAccAPIGatewayResource_withSleep
=== CONT  TestAccAPIGatewayResource_update
--- PASS: TestAccAPIGatewayResource_basic (24.50s)
--- PASS: TestAccAPIGatewayResource_disappears (61.87s)
--- PASS: TestAccAPIGatewayResource_withSleep (93.56s)
--- PASS: TestAccAPIGatewayResource_update (124.28s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	134.632s
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/apigateway Issues and PRs that pertain to the apigateway service. labels Apr 22, 2024
Copy link

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 the size/M Managed by automation to categorize the size of a PR. label Apr 22, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 22, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@ewbankkit ewbankkit merged commit 36de4bc into main Apr 23, 2024
37 checks passed
@ewbankkit ewbankkit deleted the b-aws_api_gateway_rest_api.root_resource_id branch April 23, 2024 21:35
@github-actions github-actions bot added this to the v5.47.0 milestone Apr 23, 2024
github-actions bot pushed a commit that referenced this pull request Apr 23, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 26, 2024
Copy link

This functionality has been released in v5.47.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!

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 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigateway Issues and PRs that pertain to the apigateway service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: After version 5.45.0 of hashicorp/aws the API root_resource_id comes empty after resource is created
2 participants