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_method_settings: Prevent unexpected errors during creation and deletion #17234

Merged
merged 2 commits into from Feb 3, 2021

Conversation

bflad
Copy link
Member

@bflad bflad commented Jan 22, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #13985
Reference: #16796

Fixing this as part of API Gateway service spike work. As mentioned in the issue this will not help mitigate the cause of the problem, but will at least give a better error message.

Output from acceptance testing:

--- PASS: TestAccAWSAPIGatewayMethodSettings_basic (25.35s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_disappears (247.81s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CacheDataEncrypted (147.06s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CacheTtlInSeconds (340.17s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CachingEnabled (448.46s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_DataTraceEnabled (216.61s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_LoggingLevel (55.96s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_MetricsEnabled (397.43s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_Multiple (692.67s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_RequireAuthorizationForCacheControl (178.96s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingBurstLimit (118.97s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingBurstLimitDisabledByDefault (86.39s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingRateLimit (515.72s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingRateLimitDisabledByDefault (484.35s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_UnauthorizedCacheControlHeaderStrategy (312.16s)

…uring creation and deletion

Reference: #13985
Reference: #16796

Fixing this as part of API Gateway service spike work. As mentioned in the issue this will not help mitigate the cause of the problem, but will at least give a better error message.

Output from acceptance testing:

```
--- PASS: TestAccAWSAPIGatewayMethodSettings_basic (25.35s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_disappears (247.81s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CacheDataEncrypted (147.06s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CacheTtlInSeconds (340.17s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_CachingEnabled (448.46s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_DataTraceEnabled (216.61s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_LoggingLevel (55.96s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_MetricsEnabled (397.43s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_Multiple (692.67s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_RequireAuthorizationForCacheControl (178.96s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingBurstLimit (118.97s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingBurstLimitDisabledByDefault (86.39s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingRateLimit (515.72s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_ThrottlingRateLimitDisabledByDefault (484.35s)
--- PASS: TestAccAWSAPIGatewayMethodSettings_Settings_UnauthorizedCacheControlHeaderStrategy (312.16s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Jan 22, 2021
@bflad bflad requested a review from a team as a code owner January 22, 2021 07:32
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/apigateway Issues and PRs that pertain to the apigateway service. labels Jan 22, 2021
Base automatically changed from master to main January 23, 2021 01:00
if !ok {
log.Printf("[WARN] API Gateway Method Settings for %q not found, removing", methodPath)

if !d.IsNewResource() && !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

😎 😎

@bflad bflad merged commit 476417f into main Feb 3, 2021
@bflad bflad deleted the b-aws_api_gateway_method_settings-IsNewResource branch February 3, 2021 14:53
@github-actions github-actions bot added this to the v3.27.0 milestone Feb 3, 2021
@ghost
Copy link

ghost commented Feb 5, 2021

This has been released in version 3.27.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!

@ghost
Copy link

ghost commented Mar 5, 2021

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!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/apigateway Issues and PRs that pertain to the apigateway service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected provider exception when creating "aws_api_gateway_method_settings"
2 participants