Bruce Xu
08/15/2025, 2:57 PMvars:
connection_string: |
printf "postgres://username:%s@%s:5432/dbname"
!terraform.output rds-postgres-resources .additional_users | .username.db_user_password
!terraform.output rds-postgres rds_addressAndriy Knysh (Cloud Posse)
08/15/2025, 3:03 PM!terraform.output (and !terraform.state) function is a YAML explicit tag, which has to be at the beginning of the string.
You have two choices:
• Update the Terraform component code to accept two vars and then combine them in terraform
• Use [atmos.Component](https://atmos.tools/core-concepts/stacks/templates/functions/atmos.Component/) template functions and then combine the results using Go templates, e.g. printfBruce Xu
08/15/2025, 3:04 PMAndriy Knysh (Cloud Posse)
08/15/2025, 3:04 PMErik Osterman (Cloud Posse)
08/15/2025, 4:08 PMErik Osterman (Cloud Posse)
08/15/2025, 4:08 PMErik Osterman (Cloud Posse)
08/15/2025, 4:08 PMBruce Xu
08/15/2025, 4:11 PMErik Osterman (Cloud Posse)
08/18/2025, 7:18 PMErik Osterman (Cloud Posse)
08/18/2025, 7:18 PM