-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Unable to remove forwarded_values on aws_cloudfront_distribution and instead use cache policy #17626
Comments
I had this issue as well. Was able to work around it for now by making the change in the AWS console and then applying with terraform to match. |
Looks like the |
Is there any update on it yet? |
Same issue here, any news? |
I might have some time to try working on this next week, but I've not contributed to this repo before and am completely new to go so would really appreciate some guidance Does anyone know if attributes not being removed from resources is a common issue with the provider? Are there any examples of PRs fixing bugs like this for other resources? Also hey @bill-rich and @gdavison, just wanted to reach out because I saw you worked on adding the cache policy (#17336) - do you happen to have any ideas on what might need to be changed to resolve this issue? Thanks 🙂 |
@billy-reilly The reason the One way to work around this for now, should be to set |
@bill-rich cheers do you mean something like this?
I'm getting a validation error:
|
That was the thought, but I forgot there were |
@bill-rich amazing thank you! |
@billy-reilly I took a look, and the simplest solution seems to be to just make |
Ah sweet! Thanks @bill-rich 🙌 |
@bill-rich do you know if there's any chance that #18042 might be included in v3.33? |
This has been released in version 3.34.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! |
Since Terraform closed the stack drift when upgrading a CloudFront distribution from legacy beheaviours to policies, we no longer need special instructions how to fix this. See: hashicorp/terraform-provider-aws#17626 (comment)
Hi everyone this issue was re-introduced in 3.35.0 Error: Missing required argument
on cencommerce-postventa-customer.tf line 172, in resource "aws_cloudfront_distribution" "customer":
172: forwarded_values {}
The argument "query_string" is required, but no definition was found. |
hey @esteban1983cl instead of having an empty Above we tried having an empty |
This problem is stil persistent in 3.36. Doesn't work neither removing the block, nor passing an empty block. |
I have the same issue with 3.36.0: Like suggested before, I tried:
|
I can confirm that issue returned with 3.36.0. |
I've just tested with 3.36.0 using the config I shared above and it worked fine
@georgepoenaru @sebge2 @AnzeKovac maybe one of you could create a new issue and share your config? |
Done #19041 |
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
Terraform CLI and Terraform AWS Provider Version
I've also tested with TF
v0.12.20
Affected Resource(s)
aws_cloudfront_distribution
Terraform Configuration Files
config 1:
config 2:
Expected Behavior
If you apply the first config and then apply the second, it should remove the
forwarded_values
from the distribution'sdefault_cache_behavior
and apply the newcache_policy_id
successfullyActual Behavior
I can see from the plan step that it does not try to remove the
forwarded_values
:and so it errors with:
Steps to Reproduce
terraform apply
with config 1 aboveterraform apply
with config 2 aboveReferences
The text was updated successfully, but these errors were encountered: