One place we've had issues with using `!terraform....
# atmos
z
One place we've had issues with using
!terraform.state
is inside of yaml:
Copy code
policy: |
  {
    "Version": "2012-10-17",
    "Statement": [
      {
        "Sid": "ExternalSecretsAccess",
        "Effect": "Allow",
        "Action": [
          "secretsmanager:GetSecretValue",
          "secretsmanager:DescribeSecret",
          "kms:Decrypt",
          "kms:GenerateDataKey",
          "kms:DescribeKey"
        ],
        "Resource": [
          !terraform.state rds {{ printf "demo-%s" .vars.deployment_requirements.stage }} .rds_properties.db_instance_master_user_secret_arn,
          !terraform.state kms {{ printf "demo-%s" .vars.deployment_requirements.stage }} kms_key_arn,
        ]
      }
    ]
  }
When this renders in a variables file it has the literal !terraform... string in the variables
and even if we try to move the lookups to a different variable and ingest it here it ends up being the literal string. Any ideas on how to work around? Claude is saying I need to write template files for atmos
e
Please note, that
!anything
is YAML syntax
It's not some funky template syntax we came up with 😃
These "explicit tags" are only valid as the value
Copy code
something: !sometag
z
🤔 yeah just trying to get atmos to render that inside of a literal block scalar I guess
if there was a
go
way to also do the state lookups maybe..?
e
Ideally, this is where we can use locals; but locals have their own problems right now. It may or may not work.
Copy code
locals:
  foo: !something

...

vars:
  blah: |
    {{ local.foo }}
a
we are working on supporting templates like the above, either with
locals
or directly. will be available in the next release
z
Ok sweet
j
Is there any status update on this? Definitely would be a nice feature to have.
a
it didn't get into the last release 1.220.0 due to a lot of other fixes and improvements, we'll try to get it into the next release
gratitude thank you 1