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

Support other partitions like aws-cn aws-us-gov #200

Closed
ron-liu opened this issue Dec 5, 2021 · 0 comments · Fixed by #203
Closed

Support other partitions like aws-cn aws-us-gov #200

ron-liu opened this issue Dec 5, 2021 · 0 comments · Fixed by #203

Comments

@ron-liu
Copy link

ron-liu commented Dec 5, 2021

Describe the Feature

I am working on cn-north-1, when given the below simple usages, it will complain the error: Error putting S3 policy: MalformedPolicy: Policy has invalid resource.

module "cloudfront-s3-cdn" {
  source = "cloudposse/cloudfront-s3-cdn/aws"
  # version = "0.78.0"

  namespace         = "site"
  stage             = "prod"
  name              = "www-mysite"
  aliases           = ["www.mysite.cn", "mysite.cn"]
  dns_alias_enabled = true
  parent_zone_name  = "mysite.cn"

  price_class       = "PriceClass_All"
  ipv6_enabled      = false
}

I think the following lines cause the issue, it assumes everyone is in aws partition.

Expected Behavior

It should work even for aws cn.

Describe Ideal Solution

Might should introduce a variable called partition, which default to aws, can be set to aws-cn or aws-us-gov.

Alternatives Considered

Couldn't walk around. May be we should create S3 ourself.

Additional Context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant