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

Cannot update Already Created Cloudfront Distribution with forward_values to replace with cache_policy_id #17662

Closed
pen-pal opened this issue Feb 17, 2021 · 4 comments
Labels
bug Addresses a defect in current functionality. service/cloudfront Issues and PRs that pertain to the cloudfront service.

Comments

@pen-pal
Copy link

pen-pal commented Feb 17, 2021

PS: Please correct the report as this is my first time

Hy team,

I have a previously created cloudfront distribution with forwarded_values values enabled.

forwarded_values {
  query_string = true

  cookies {
    forward = "none"
  }
}

Now when I try to implement cache_policy_id = xxxxx to be distribution by setting

forwarded_values {
  query_string = none
  headers = null

  cookies {
    forward = "none"
  }
}

Once I apply this, I get the following error.

Warning: Applied changes may be incomplete

The plan was created with the -target option in effect, so some changes
requested in the configuration may have been ignored and the output values may
not be fully updated. Run the following command to verify that no other
changes are pending:                                                               
    terraform plan                                                                 

Note that the -target option is not suitable for routine use, and is provided
only for exceptional situations such as recovering from errors or mistakes, or
when Terraform specifically suggests to use it as part of an error message.


Error: error updating CloudFront Distribution (EQ3US9107CM6F): InvalidArgument: The parameter ForwardedValues cannot be used when a cache policy is associated to the cache behavior.
        status code: 400, request id: 05af011a-723d-40db-b3b1-94a0cf6881f6

But when I create new distribution with only cache_policy_id = xxxxx it works fine.

Is there a way to implement cache_policy_id = xxxxx id on the previously created cloudfront distribution by disabling forwarded_values ??

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 17, 2021
@ewbankkit ewbankkit added service/cloudfront Issues and PRs that pertain to the cloudfront service. bug Addresses a defect in current functionality. labels Feb 17, 2021
@ewbankkit
Copy link
Contributor

@billy-reilly
Copy link

this is a duplicate of #17626

@ewbankkit
Copy link
Contributor

@M-A-N-I-S-H-K Thanks for raising this issue.
It has already been noticed in #17626. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Feb 17, 2021
@ghost
Copy link

ghost commented Mar 20, 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!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 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/cloudfront Issues and PRs that pertain to the cloudfront service.
Projects
None yet
Development

No branches or pull requests

3 participants