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: convert minimum_compression_size to NullableTypeInt #30969

Merged

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Apr 25, 2023

Description

Changes the minimum_compression_size attribute to a NullableTypeInt, allowing for the attribute to be computed when set via the body attribute. -1 was preserved as a valid value to allow disabling an existing minimum compression size configuration which cannot be done by simply removing the attribute since it is now computed.

From the Provider contributor documentation:

NullableTypeInt: Workaround "schema type" created to accept a whole numeric value that is not configured in addition to 0. Not implemented in the Terraform Plugin SDK, but uses TypeString (where "" represents not configured) and additional validation.

Relations

Closes #30844

Output from Acceptance Testing

$ make testacc PKG=apigateway TESTS=TestAccAPIGatewayRestAPI_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/apigateway/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayRestAPI_'  -timeout 180m

--- PASS: TestAccAPIGatewayRestAPI_disappears (20.06s)
--- PASS: TestAccAPIGatewayRestAPI_Name_overrideBody (47.35s)
--- PASS: TestAccAPIGatewayRestAPI_parameters (76.74s)
--- PASS: TestAccAPIGatewayRestAPI_MinimumCompressionSize_setByBody (77.14s)
--- PASS: TestAccAPIGatewayRestAPI_apiKeySource (136.54s)
--- PASS: TestAccAPIGatewayRestAPI_minimumCompressionSize (217.95s)
--- PASS: TestAccAPIGatewayRestAPI_APIKeySource_overrideBody (232.00s)
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_setByBody (303.62s)
--- PASS: TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_overrideBody (33.93s)
--- PASS: TestAccAPIGatewayRestAPI_disableExecuteAPIEndpoint (129.28s)
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_mergeBody (285.59s)
--- PASS: TestAccAPIGatewayRestAPI_body (23.63s)
--- PASS: TestAccAPIGatewayRestAPI_MinimumCompressionSize_overrideBody (457.72s)
--- PASS: TestAccAPIGatewayRestAPI_Description_overrideBody (33.58s)
--- PASS: TestAccAPIGatewayRestAPI_Policy_overrideBody (579.59s)
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideToMergeBody (638.59s)
--- PASS: TestAccAPIGatewayRestAPI_Endpoint_vpcEndpointIDs (357.09s)
--- PASS: TestAccAPIGatewayRestAPI_endpoint (671.53s)
--- PASS: TestAccAPIGatewayRestAPI_Policy_order (753.12s)
--- PASS: TestAccAPIGatewayRestAPI_APIKeySource_setByBody (792.31s)
--- PASS: TestAccAPIGatewayRestAPI_binaryMediaTypes (820.55s)
--- PASS: TestAccAPIGatewayRestAPI_Endpoint_private (708.59s)
--- PASS: TestAccAPIGatewayRestAPI_DisableExecuteAPIEndpoint_setByBody (915.49s)
--- PASS: TestAccAPIGatewayRestAPI_basic (955.62s)
--- PASS: TestAccAPIGatewayRestAPI_BinaryMediaTypes_overrideBody (1065.63s)
--- PASS: TestAccAPIGatewayRestAPI_EndpointVPCEndpointIDs_overrideBody (1103.15s)
--- PASS: TestAccAPIGatewayRestAPI_tags (1063.39s)
--- PASS: TestAccAPIGatewayRestAPI_Policy_setByBody (1177.62s)
--- PASS: TestAccAPIGatewayRestAPI_Policy_basic (1227.23s)
--- PASS: TestAccAPIGatewayRestAPI_BinaryMediaTypes_setByBody (923.13s)
--- PASS: TestAccAPIGatewayRestAPI_FailOnWarnings (1304.13s)
--- PASS: TestAccAPIGatewayRestAPI_Description_setByBody (1066.66s)
--- PASS: TestAccAPIGatewayRestAPI_description (1178.91s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigateway 1552.900s
$ make testacc PKG=apigateway TESTS=TestAccAPIGatewayRestAPIDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/apigateway/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayRestAPIDataSource_'  -timeout 180m
=== RUN   TestAccAPIGatewayRestAPIDataSource_basic
=== PAUSE TestAccAPIGatewayRestAPIDataSource_basic
=== RUN   TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
=== PAUSE TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
=== CONT  TestAccAPIGatewayRestAPIDataSource_basic
=== CONT  TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs
--- PASS: TestAccAPIGatewayRestAPIDataSource_basic (12.63s)
--- PASS: TestAccAPIGatewayRestAPIDataSource_Endpoint_vpcEndpointIDs (155.57s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigateway 158.976s

@jar-b jar-b added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Apr 25, 2023
@jar-b jar-b added this to the v5.0.0 milestone Apr 25, 2023
@github-actions
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 size/M Managed by automation to categorize the size of a PR. service/apigateway Issues and PRs that pertain to the apigateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 25, 2023
@jar-b jar-b force-pushed the b-rest_api-minimum_compression_size-nullabletypeint branch from 0277cc8 to b66b561 Compare April 25, 2023 18:37
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Apr 25, 2023
@jar-b jar-b marked this pull request as ready for review April 25, 2023 19:09
@jar-b jar-b force-pushed the b-rest_api-minimum_compression_size-nullabletypeint branch from b66b561 to abed709 Compare April 26, 2023 15:43
@jar-b jar-b force-pushed the b-rest_api-minimum_compression_size-nullabletypeint branch from abed709 to 852bc4a Compare May 1, 2023 13:57
@jar-b jar-b merged commit 21af31f into prerelease/5.x May 1, 2023
@jar-b jar-b deleted the b-rest_api-minimum_compression_size-nullabletypeint branch May 1, 2023 18:56
github-actions bot pushed a commit that referenced this pull request May 1, 2023
@github-actions
Copy link

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

danielw-aws pushed a commit to danielw-aws/terraform-provider-aws that referenced this pull request May 31, 2023
@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 Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. 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.

2 participants