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

resource aws_cloudfront_distribution restrictions with restriction_type equal to "none" gives an invalid request parameter #19243

Open
helioascorreia opened this issue May 5, 2021 · 3 comments
Labels
bug Addresses a defect in current functionality. service/cloudfront Issues and PRs that pertain to the cloudfront service.

Comments

@helioascorreia
Copy link

I'm trying to configure the terraform to create a cloudfront. After a few tries, following the examples I successfully created one cloudfront, than I started to make a few tweaks to implement my desire configuration.
In my config I want to disable the geo restrictions so I follow the configuration and got an error.

with this it's working

restrictions {
    geo_restriction {
      restriction_type = "blacklist"
      locations        = ["BW"]
    }
  }

and with this not

restrictions {
    geo_restriction {
      restriction_type = "none"
    }
  }

error

Error: error updating CloudFront Distribution (E2BUECT05PC943): InvalidGeoRestrictionParameter: Your request contains invalid Restriction parameters.
        status code: 400, request id: XXXX-XXX-XXX-XXXX

The terraform plan works go and only gives the error after starting to making the apply on the api

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 0.13.5
aws 3.38.0

Affected Resource(s)

  • aws_cloudfront_distribution

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#restrictions-arguments

@ghost ghost added the service/cloudfront Issues and PRs that pertain to the cloudfront service. label May 5, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 5, 2021
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 4, 2021
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Sep 21, 2023
@tyree731
Copy link

I ran into this as well today. Has anyone taken a look at this?

@github-actions github-actions bot removed the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Sep 22, 2023
@tyree731
Copy link

Looks like this is a duplicate of #20807 , with that issue having a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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