-
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
terraform miss the Use Origin Cache Headers #1994
Comments
I'm facing the same problem. |
Hello, I've got the same problem. Any news about that? |
Same here, what's the status on this? @radeksimko @bflad or anyone else working with the provider.. |
While the attributes are marked as required in Terraform, taking a look at the SDK documentation implies that CloudFront might "do the right thing" here if the appropriate headers are set in the origin. Specifically this sentence for Default TTL and Max TTL:
Luckily, it also looks like the |
TL;DR is seems like we might be able to set For cross-reference this is the same request as #1472. |
Upon further testing when the attributes are not supplied during creation, AWS will set the default |
Support to make all 3 TTL arguments optional has been merged into master and will be released in v1.11.0 of the AWS provider, likely at the end of the week. Please note they are default_ttl (1 day), max_ttl (365 days), and min_ttl (0 days) to match the behavior of the API and console. |
This has been released in version 1.11.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
@bflad and team, thank you very much for adding this feature. |
@bflad i dont get it completely... they are optional now, but then the aws defaults apply? how do i set Use Origin Cache Headers then? |
@digitalkaoz if you remove all three caching properties from your config and apply, the default values will be set in these properties, but CloudFront will be configured with Use Origin Cache Headers. |
Thanks @matt-zangen! I can confirm that removing |
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! |
This issue was originally opened by @arbabnazar as hashicorp/terraform#16209. It was migrated here as a result of the provider split. The original body of the issue is below.
I want to use AWS cloudfront cache behaviour to
Use Origin Cache Headers
as sent by my server.However in terraform, the min_ttl, max_ttl and default_ttl is required.
Is there a way to to use the
Use Origin Cache Headers
in terraform?The text was updated successfully, but these errors were encountered: