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

Invalid JSON policy Error #17717

Closed
ghost opened this issue Mar 28, 2018 · 2 comments
Closed

Invalid JSON policy Error #17717

ghost opened this issue Mar 28, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 28, 2018

Hi,

Terraform validate says "policy" contains invalid JSON policy

This is my json policy which is validate then why terraform validate says invalid policy?

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::bucket1",
                "arn:aws:s3:::bucket2",
                "arn:aws:s3:::bucket3",
                "arn:aws:s3:::bucket4",
                "arn:aws:s3:::bucket5"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::bucket1/*",
                "arn:aws:s3:::bucket2/*",
                "arn:aws:s3:::bucket3/*",
                "arn:aws:s3:::bucket4/*",
                "arn:aws:s3:::bucket5/*"
            ]
        }
    ]
}

Terraform -v:

0.11.3

Terraform reproduce:

terraform plan
terraform validate

Error:

Error: aws_iam_policy.test_policy: "policy" contains an invalid JSON policy

@ghost
Copy link

ghost commented Mar 29, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#3970 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#3970.

@ghost
Copy link

ghost commented Apr 4, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant