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

resource/aws_api_gateway_deployment: Reverts validation errors #40067

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Nov 8, 2024

Description

The PR #39929 added the following validation to canary_settings and stage_description, since the values are ignored when stage_name is not set:

RequiredWith: []string{
	"stage_name",
},

This caused some users to have errors with their existing configurations.

Remove the validation error and add run-time warnings.

Also deprecates stage_name, stage_description, and canary_settings on the aws_api_gateway_deployment resource if favour of an explicit aws_api_gateway_stage.

Relations

Closes #39957

Output from Acceptance Testing

% make testacc PKG=apigateway TESTS=TestAccAPIGatewayDeployment_

--- PASS: TestAccAPIGatewayDeployment_variables (47.22s)
--- PASS: TestAccAPIGatewayDeployment_deploymentCanarySettings (47.46s)
--- PASS: TestAccAPIGatewayDeployment_Disappears_restAPI (47.70s)
--- PASS: TestAccAPIGatewayDeployment_conflictingConnectionType (91.50s)
--- PASS: TestAccAPIGatewayDeployment_stageName (119.71s)
--- PASS: TestAccAPIGatewayDeployment_disappears (130.63s)
--- PASS: TestAccAPIGatewayDeployment_basic (205.23s)
--- PASS: TestAccAPIGatewayDeployment_stageDescription (224.13s)
--- PASS: TestAccAPIGatewayDeployment_triggers (283.42s)
--- PASS: TestAccAPIGatewayDeployment_StageName_emptyString (425.85s)
--- PASS: TestAccAPIGatewayDeployment_description (476.43s)

…n `aws_api_gateway_deployment` in favour of explicit `aws_api_gateway_stage`
@gdavison gdavison requested a review from a team as a code owner November 8, 2024 20:04
Copy link

github-actions bot commented Nov 8, 2024

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 documentation Introduces or discusses updates to documentation. service/apigateway Issues and PRs that pertain to the apigateway service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Nov 8, 2024
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc PKG=apigateway TESTS=TestAccAPIGatewayDeployment_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/apigateway/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayDeployment_'  -timeout 360m
2024/11/08 15:59:59 Initializing Terraform AWS Provider...
=== RUN   TestAccAPIGatewayDeployment_basic
=== PAUSE TestAccAPIGatewayDeployment_basic
=== RUN   TestAccAPIGatewayDeployment_disappears
=== PAUSE TestAccAPIGatewayDeployment_disappears
=== RUN   TestAccAPIGatewayDeployment_Disappears_restAPI
=== PAUSE TestAccAPIGatewayDeployment_Disappears_restAPI
=== RUN   TestAccAPIGatewayDeployment_triggers
=== PAUSE TestAccAPIGatewayDeployment_triggers
=== RUN   TestAccAPIGatewayDeployment_description
=== PAUSE TestAccAPIGatewayDeployment_description
=== RUN   TestAccAPIGatewayDeployment_stageDescription
=== PAUSE TestAccAPIGatewayDeployment_stageDescription
=== RUN   TestAccAPIGatewayDeployment_stageName
=== PAUSE TestAccAPIGatewayDeployment_stageName
=== RUN   TestAccAPIGatewayDeployment_StageName_emptyString
=== PAUSE TestAccAPIGatewayDeployment_StageName_emptyString
=== RUN   TestAccAPIGatewayDeployment_variables
=== PAUSE TestAccAPIGatewayDeployment_variables
=== RUN   TestAccAPIGatewayDeployment_conflictingConnectionType
=== PAUSE TestAccAPIGatewayDeployment_conflictingConnectionType
=== RUN   TestAccAPIGatewayDeployment_deploymentCanarySettings
=== PAUSE TestAccAPIGatewayDeployment_deploymentCanarySettings
=== CONT  TestAccAPIGatewayDeployment_basic
=== CONT  TestAccAPIGatewayDeployment_stageName
=== CONT  TestAccAPIGatewayDeployment_triggers
=== CONT  TestAccAPIGatewayDeployment_Disappears_restAPI
=== CONT  TestAccAPIGatewayDeployment_disappears
=== CONT  TestAccAPIGatewayDeployment_stageDescription
=== CONT  TestAccAPIGatewayDeployment_description
=== CONT  TestAccAPIGatewayDeployment_conflictingConnectionType
=== CONT  TestAccAPIGatewayDeployment_deploymentCanarySettings
=== CONT  TestAccAPIGatewayDeployment_variables
=== CONT  TestAccAPIGatewayDeployment_StageName_emptyString
--- PASS: TestAccAPIGatewayDeployment_variables (19.37s)
--- PASS: TestAccAPIGatewayDeployment_conflictingConnectionType (52.23s)
--- PASS: TestAccAPIGatewayDeployment_deploymentCanarySettings (84.93s)
--- PASS: TestAccAPIGatewayDeployment_stageName (89.21s)
--- PASS: TestAccAPIGatewayDeployment_basic (101.25s)
--- PASS: TestAccAPIGatewayDeployment_StageName_emptyString (121.78s)
--- PASS: TestAccAPIGatewayDeployment_triggers (285.24s)
--- PASS: TestAccAPIGatewayDeployment_Disappears_restAPI (317.64s)
--- PASS: TestAccAPIGatewayDeployment_stageDescription (369.29s)
--- PASS: TestAccAPIGatewayDeployment_description (405.94s)
--- PASS: TestAccAPIGatewayDeployment_disappears (675.58s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	679.509s

@YakDriver YakDriver merged commit 41d2db2 into main Nov 11, 2024
39 checks passed
@YakDriver YakDriver deleted the b-apigateway-stage-canary branch November 11, 2024 14:52
@github-actions github-actions bot added this to the v5.75.1 milestone Nov 11, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Nov 11, 2024
Copy link

This functionality has been released in v5.75.1 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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_api_gateway_deployment: Deprecate attributes that create stage
2 participants