We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to parse this:
locals { enabled = (var.enable ? 1 : 0) } resource "aws_iam_user" "sync" { count = local.enabled name = "${'$'}{var.sync_username}-${'$'}{var.idp_name}" tags = var.tags } resource "aws_iam_policy" "list_roles" { count = local.enabled name = "list-roles-${'$'}{var.sync_username}-${'$'}{var.idp_name}" policy = file("${'$'}{path.module}/list-policy.json") tags = var.tags } resource "aws_iam_policy_attachment" "this" { count = local.enabled name = "saml-role-sync-policy" users = [aws_iam_user.sync[0].name] policy_arn = aws_iam_policy.list_roles[0].arn } resource "aws_iam_access_key" "sync_creds" { count = local.enabled user = aws_iam_user.sync[0].name }
I get this error:
Infinite recursion (StackOverflowError) (through reference chain: com.bertramlabs.plugins.hcl4j.symbols.HCLArray[\"children\"]->java.util.ArrayList[0]->com.bertramlabs.plugins.hcl4j.symbols.HCLValue[\"parent\"]->com.bertramlabs.plugins.hcl4j.symbols.HCLArray[\"children\"]->java.util.ArrayList[0]->com.bert","text":"locals {\n enabled = (var.enable ? 1 : 0)\n}\n\nresource \"aws_iam_user\" \"sync\" {\n count = local.enabled\n name = \"${var.sync_username}-${var.idp_name}\"\n tags = var.tags\n}\n\nresource \"aws_iam_policy\" \"list_roles\" {\n count = local.enabled\n name = \"list-roles-${var.sync_username}-${var.idp_name}\"\n policy = file(\"${path.module}/list-policy.json\")\n tags = var.tags\n}\n\nresource \"aws_iam_policy_attachment\" \"this\" {\n count = local.enabled\n name = \"saml-role-sync-policy\"\n users = [aws_iam_user.sync[0].name]\n policy_arn = aws_iam_policy.list_roles[0].arn\n}\n\nresource \"aws_iam_access_key\" \"sync_creds\" {\n count = local.enabled\n user = aws_iam_user.sync[0].name\n}
This "trimmed down" example also gets a similar error:
resource "something" "here" { count = 1 name = "bobby" } resource "something" "there" { count = 1 name = something.here[0].name }
It doesn't seem to like the something.here[0].name. Here is my call:
something.here[0].name
(HCLParser().parse(file.byteInputStream(), "UTF-8", false)
I am using 0.6.8 of hcl4j.
The text was updated successfully, but these errors were encountered:
is it common practice to reference another resource value from another resource in terraform?
Sorry, something went wrong.
No branches or pull requests
When trying to parse this:
I get this error:
This "trimmed down" example also gets a similar error:
It doesn't seem to like the
something.here[0].name
. Here is my call:I am using 0.6.8 of hcl4j.
The text was updated successfully, but these errors were encountered: