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

aws_api_gateway_authorizer: fix authorizer_result_ttl_in_seconds cache disable #9605

Merged
merged 1 commit into from
Nov 1, 2019
Merged

aws_api_gateway_authorizer: fix authorizer_result_ttl_in_seconds cache disable #9605

merged 1 commit into from
Nov 1, 2019

Conversation

geriBatai
Copy link
Contributor

Null value for authorizer_result_ttl_in_seconds means that API Gateway will use default TTL for authorizer cache, which is 300. Provider was assuming that 0 and null values are the same, causing #705, which made disabling authorization cache impossible. This PR fixes it.

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAPIGatewayAuthorizer_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSAPIGatewayAuthorizer_basic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAPIGatewayAuthorizer_basic
=== PAUSE TestAccAWSAPIGatewayAuthorizer_basic
=== CONT  TestAccAWSAPIGatewayAuthorizer_basic
--- PASS: TestAccAWSAPIGatewayAuthorizer_basic (55.13s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	55.172s

$ make testacc TESTARGS='-run=TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL
=== PAUSE TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL
=== CONT  TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL
--- PASS: TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL (91.47s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	91.513s

@geriBatai geriBatai requested a review from a team August 2, 2019 16:22
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/apigateway Issues and PRs that pertain to the apigateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 2, 2019
@bflad bflad added the bug Addresses a defect in current functionality. label Aug 7, 2019
@bflad bflad added this to the v2.35.0 milestone Nov 1, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Thanks so much for this fix, @geriBatai, LGTM. 🚀 Setting the attribute default to 300 looks correct in this situation.

--- PASS: TestAccAWSAPIGatewayAuthorizer_cognito (14.11s)
--- PASS: TestAccAWSAPIGatewayAuthorizer_basic (44.79s)
--- PASS: TestAccAWSAPIGatewayAuthorizer_authTypeValidation (81.48s)
--- PASS: TestAccAWSAPIGatewayAuthorizer_switchAuthType (126.50s)
--- PASS: TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL (142.93s)

@bflad bflad merged commit 3de2e16 into hashicorp:master Nov 1, 2019
bflad added a commit that referenced this pull request Nov 1, 2019
@geriBatai geriBatai deleted the api-gateway-authorizer-ttl branch November 1, 2019 15:17
@ghost
Copy link

ghost commented Nov 7, 2019

This has been released in version 2.35.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 29, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
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/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants