-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Added import support for API Gateway Deployment #28030
Added import support for API Gateway Deployment #28030
Conversation
Hey @bluenick2k17 👋 Thank you very much for your contribution! At times, our maintainers need to make direct edits to pull requests in order to help get it ready to be merged. Your current settings do not allow maintainers to make such edits. To help facilitate this, update your pull request to allow such edits as described in GitHub's Allowing changes to a pull request branch created from a fork documentation. (If you're using a fork owned by an organization, your organization may not allow you to change this setting. If that is the case, let us know.) |
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @bluenick2k17 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
moved stage url validation to stage specific config and removed stage name/desc from basic test
I'm in a GitHub organization which doesn't currently allow me to change this setting. I'll do what I can to stay on top of suggestions/feedback, and keeping the branch current. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccAPIGatewayDeployment_' PKG=apigateway ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/apigateway/... -v -count 1 -parallel 2 -run=TestAccAPIGatewayDeployment_ -timeout 180m
=== RUN TestAccAPIGatewayDeployment_basic
=== PAUSE TestAccAPIGatewayDeployment_basic
=== 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
=== CONT TestAccAPIGatewayDeployment_basic
=== CONT TestAccAPIGatewayDeployment_stageDescription
--- PASS: TestAccAPIGatewayDeployment_basic (20.70s)
=== CONT TestAccAPIGatewayDeployment_StageName_emptyString
--- PASS: TestAccAPIGatewayDeployment_stageDescription (20.82s)
=== CONT TestAccAPIGatewayDeployment_variables
--- PASS: TestAccAPIGatewayDeployment_StageName_emptyString (68.45s)
=== CONT TestAccAPIGatewayDeployment_triggers
--- PASS: TestAccAPIGatewayDeployment_variables (109.29s)
=== CONT TestAccAPIGatewayDeployment_description
--- PASS: TestAccAPIGatewayDeployment_triggers (63.88s)
=== CONT TestAccAPIGatewayDeployment_Disappears_restAPI
--- PASS: TestAccAPIGatewayDeployment_description (89.83s)
=== CONT TestAccAPIGatewayDeployment_stageName
--- PASS: TestAccAPIGatewayDeployment_Disappears_restAPI (75.52s)
--- PASS: TestAccAPIGatewayDeployment_stageName (33.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/apigateway 258.159s
@bluenick2k17 Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.44.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! |
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. |
Description
Enables the ability to import
aws_api_gateway_deployment
.Currently as implemented,
aws_api_gateway_deployment
will not attempt to importstage_name
,stage_description
, orvariables
due to the recommended approach of importingaws_api_gateway_stage
and to prevent issues importing multiple stages tied to the same deployment.Relations
Closes #558
(
aws_api_gateway_deployment
is the last API Gateway resource that is not importable)References
internal/service/apigateway/stage.go
andinternal/service/apigatewayv2/deployment.go
for implementation.Output from Acceptance Testing
Acceptance Test Modifications
stage_name
andstage_description
from the_basic
test, since thestage_*
variables are optional and shouldn't be a part of a basic test.execution_arn
andinvoke_url
using the stage to the_stageName
test, sincestage_name
was removed from the_basic
test. The_basic
test still validates the two properties without the stage present._basic
test