terraform-diff icon indicating copy to clipboard operation
terraform-diff copied to clipboard

provider functions trip up terraform-diff

Open ohookins opened this issue 10 months ago • 1 comments

terraform-diff -range "origin/master" deployments/xxxx/
failed getting dependencies for folder deployments/xxxx: Error processing: Missing attribute separator: Expected a newline or comma to mark the beginning of the next attribute. (and 1 other messages)

I believe it's due to this:

data "aws_iam_policy_document" "xxxx" {
  statement {
    actions = ["sts:AssumeRole"]
    principals {
      type = "AWS"
      identifiers = [
        provider::aws::arn_build("aws", "iam", "", "xxxx", "role/zzzz"),
        provider::aws::arn_build("aws", "iam", "", "yyyy", "role/zzzz")
      ]
    }
  }
}

Can't comment on why though, just yet. I expect the parser is tripping over the multiple commas in the function invocation.

ohookins avatar Dec 02 '24 01:12 ohookins