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

origin_keepalive_timeout is restricted to 180 seconds for aws_cloudfront_distribution resource #23437

Closed
Brianpro opened this issue Mar 1, 2022 · 4 comments · Fixed by #31608
Labels
bug Addresses a defect in current functionality. service/cloudfront Issues and PRs that pertain to the cloudfront service. timeouts Pertains to timeout increases.
Milestone

Comments

@Brianpro
Copy link

Brianpro commented Mar 1, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

  • Terraform v1.1.6
  • provider registry.terraform.io/hashicorp/aws v4.2.0

Affected Resource(s)

  • aws_cloudfront_distribution

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_cloudfront_distribution" "site" {
  origin {
    domain_name = var.domain-name
    origin_id   = "${var.origin-id-prefix}-${var.domain-name}"

    custom_origin_config {
      http_port  = 80
      https_port = 443

      origin_protocol_policy   = "https-only"
      origin_keepalive_timeout = 600
      origin_read_timeout      = 31

      origin_ssl_protocols = ["TLSv1.2"] # TLS 1.2 is required for PCI compliance
    }

Debug Output

Error: expected origin.0.custom_origin_config.0.origin_keepalive_timeout to be in the range (1 - 180), got [600]
 
  with module.cdn-site.aws_cloudfront_distribution.site,
  on ../../../modules/cdn/site/site.tf line 33, in resource "aws_cloudfront_distribution" "site":
  33: resource "aws_cloudfront_distribution" "site" {

Expected Behavior

We should be able to allow any value for origin_keepalive_timeout. It's up to AWS to restrict really high values not terraform since you can negotiate with AWS to allow high values in certain cases.

Actual Behavior

Error running terraform plan only allowing a max value of 180.

Steps to Reproduce

Set origin_keepalive_timeout to something higher then 180 seconds.

  1. terraform apply

References

Reference to code.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 1, 2022
@justinretzolk
Copy link
Member

Hey @Brianpro 👋 Thank you for taking the time to raise this! So that we have all of the necessary information in order to look into this, can you update the issue description to include the rest of the information from the bug template?

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. service/cloudfront Issues and PRs that pertain to the cloudfront service. waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 1, 2022
@Brianpro
Copy link
Author

Brianpro commented Mar 2, 2022

Done. Thanks

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 2, 2022
@justinretzolk justinretzolk added the timeouts Pertains to timeout increases. label Mar 18, 2022
@github-actions github-actions bot added this to the v5.1.0 milestone May 30, 2023
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.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!

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2023
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/cloudfront Issues and PRs that pertain to the cloudfront service. timeouts Pertains to timeout increases.
Projects
None yet
2 participants