flosell / iam-policy-json-to-terraform

Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document
https://flosell.github.io/iam-policy-json-to-terraform/
Apache License 2.0
774 stars 58 forks source link

Not parsing correctly adding this statement = [ #17

Closed ghost closed 4 years ago

ghost commented 4 years ago

Doing the same thing for me

data "aws_iam_policy_document" "policy" {
  statement = [
    {
      sid       = ""
      effect    = "Allow"
      resources = ["*"]

      actions = [
        "autoscaling:DescribeAutoScalingGroups",
        "autoscaling:DescribeAutoScalingInstances",
        "autoscaling:SetDesiredCapacity",
        "autoscaling:TerminateInstanceInAutoScalingGroup",
        "autoscaling:DescribeTags",
      ]
    },
  ]
}

Error message

An argument named "statement" is not expected here. Did you mean to define a block of type "statement"?

Originally posted by @k8s-class in https://github.com/flosell/iam-policy-json-to-terraform/issues/9#issuecomment-650341601

flosell commented 4 years ago

Duplicate of #9 which has been fixed now.