-
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
r/api_gateway_rest_api_policy - add new resource #13619
r/api_gateway_rest_api_policy - add new resource #13619
Conversation
3b29885
to
8a9392d
Compare
Thank you for raising this PR! I've been experiencing #5549, so I'm grateful for you taking the time to work on a fix. Apparently there are conflicts on |
a56aadd
to
c243d96
Compare
Rebased and refactored |
how long does this usually take to merge an all green PR ? |
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.
Thanks, @DrFaust92 🚀
Output from acceptance testing (see other comment for failure details):
--- PASS: TestAccAWSAPIGatewayRestApiPolicy_disappears_restApi (16.41s)
--- PASS: TestAccAWSAPIGatewayRestApi_openapi (45.41s)
--- PASS: TestAccAWSAPIGatewayRestApi_basic (74.27s)
--- PASS: TestAccAWSAPIGatewayRestApi_api_key_source (106.42s)
--- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration_Private (113.88s)
--- PASS: TestAccAWSAPIGatewayRestApiPolicy_disappears (141.26s)
--- PASS: TestAccAWSAPIGatewayRestApi_tags (168.51s)
--- FAIL: TestAccAWSAPIGatewayRestApi_policy (199.92s)
--- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration (268.79s)
--- PASS: TestAccAWSAPIGatewayRestApi_disappears (385.07s)
--- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration_VPCEndpoint (386.16s)
--- PASS: TestAccAWSAPIGatewayRestApiPolicy_basic (428.07s)
@@ -49,6 +49,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { | |||
"policy": { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
Computed: true, |
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.
This update breaks the existing TestAccAWSAPIGatewayRestApi_policy
test:
=== CONT TestAccAWSAPIGatewayRestApi_policy
TestAccAWSAPIGatewayRestApi_policy: resource_aws_api_gateway_rest_api_test.go:446: Step 4/4 error: Check failed: Check 1/1 error: aws_api_gateway_rest_api.test: Attribute 'policy' expected "", got "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Principal\":{\"AWS\":\"*\"},\"Action\":\"execute-api:Invoke\",\"Resource\":\"*\"}]}"
--- FAIL: TestAccAWSAPIGatewayRestApi_policy (199.92s)
Since the removal behavior is expected unless it is configured to an empty string (""
), will update the test and document the behavior in the resource documentation on merge.
apparently 76 days :p |
This has been released in version 3.16.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
Closes #5834
Relates #5549
Relates #10986
Release note for CHANGELOG:
Output from acceptance testing: