-
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
New resource: aws_apigatewayv2_deployment #9245
New resource: aws_apigatewayv2_deployment #9245
Conversation
Includes
|
Be aware of #162. |
Rebased to fix merge conflict. $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Deployment_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Deployment_ -timeout 120m
=== RUN TestAccAWSAPIGateway2Deployment_basic
=== PAUSE TestAccAWSAPIGateway2Deployment_basic
=== CONT TestAccAWSAPIGateway2Deployment_basic
--- PASS: TestAccAWSAPIGateway2Deployment_basic (41.48s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 41.540s |
421835c
to
48a5eae
Compare
Re-ran acceptance tests: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Deployment_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Deployment_ -timeout 120m
=== RUN TestAccAWSAPIGateway2Deployment_basic
=== PAUSE TestAccAWSAPIGateway2Deployment_basic
=== CONT TestAccAWSAPIGateway2Deployment_basic
--- PASS: TestAccAWSAPIGateway2Deployment_basic (45.79s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 45.810s |
So this is now lying dormant for months, I know I'm busting your balls on this but we really need to get this going. What is holding this back? I'm seeing release notes for issues that are getting a release with a far lower priority. |
After merge of #8881, incorporate all the feedback:
|
6cb96f1
to
36c00bd
Compare
Renamed resource to $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Deployment_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Deployment_ -timeout 120m
=== RUN TestAccAWSAPIGatewayV2Deployment_basic
=== PAUSE TestAccAWSAPIGatewayV2Deployment_basic
=== RUN TestAccAWSAPIGatewayV2Deployment_disappears
=== PAUSE TestAccAWSAPIGatewayV2Deployment_disappears
=== CONT TestAccAWSAPIGatewayV2Deployment_basic
=== CONT TestAccAWSAPIGatewayV2Deployment_disappears
--- PASS: TestAccAWSAPIGatewayV2Deployment_disappears (28.85s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_basic (52.03s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 52.080s |
0878c7b
to
166b6ac
Compare
166b6ac
to
bb318d6
Compare
Ready for review. |
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.
One comment, otherwise LGTM 🚀
--- PASS: TestAccAWSAPIGatewayV2Deployment_disappears (10.72s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_basic (17.94s)
|
||
outputRaw, err := stateConf.WaitForState() | ||
|
||
switch output := outputRaw.(type) { |
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.
Since there are only two possibilities, would if v, ok := outputRaw.(*apigatewayv2.GetDeploymentOutput); ok { ... }
work better here?
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.
I based the code on the original PR - https://github.com/terraform-providers/terraform-provider-aws/pull/12765/files#diff-51328917bb577dc7dd98f1ece91ed566R26-R31 but have no strong opinion.
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.
On implementation, your suggestions seems more maintainable.
I made the change.
} | ||
} | ||
|
||
func testAccCheckAWSAPIGatewayV2DeploymentExists(n string, vApiId *string, v *apigatewayv2.GetDeploymentOutput) resource.TestCheckFunc { |
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.
I like how in this and your other PRs you've added returning the ID to our existing pattern of returning the object.
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.
The returned objects don't include all the necessary information to be able to identify the resource which is different from other AWS APIs.
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.
Ah, I see. It's a minor convenience/cosmetic thing, but I've seen a number of use cases where it would be handy, or at least meaning fewer dereferences :)
This has been released in version 2.58.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Another resource for #7004.
Release note for CHANGELOG:
Output from acceptance testing:
Currently based on #8842, will need to rebase once that PR is merged.