Open pzalews opened 7 months ago
The tilde ~ at the end of for might not be necessary unless it is part of a specific syntax or requirement. Typically, for loops in Heredocs do not use it. Ensure proper spacing and alignment for readability and consistency. Ensure that the closing EOT matches the opening <<EOT without any additional spaces or characters. Here's a corrected and properly formatted version of your Heredoc syntax:
name = <<EOT
%{for role in var.ADMIN_ROLES_ARN}
- rolearn: ${role}
username: ${join("-", slice(split("/", role), 1, length(split("/", role))))}
groups:
- system:masters
%{endfor}
EOT
With latest version 4.3.3:
Example terraform code: