Duffy Gillman
09/23/2025, 3:58 PMimport:
- ./_defaults
- path: catalog/ecr-deployer-role
context:
ecr_repository_arns:
- !terraform.state image1-ecr global repository_arn
- !terraform.state image2-ecr global repository_arn
git_repository: bogus_repo_name
when atmos processes this file, I get:
"invalid number of arguments in the Atmos YAML function !terraform.state image1-
ecr
global repository_arn !terraform.state image2-ecr global repository_arn"Duffy Gillman
09/23/2025, 3:59 PMecr_repository_arns: [
"!terraform.state image1-ecr global repository_arn",
"!terraform.state image2-ecr global repository_arn"
]
the same error occursDuffy Gillman
09/23/2025, 4:01 PM! command/object. There needs to be some delimiter to identify the end of the arguments it should process or something. I have not found a canonical YAML syntax for doing thisDuffy Gillman
09/23/2025, 4:24 PMprocessTagTerraformState in atmos/internal/exec/yaml_func_terraform_state.go. It is processing the !terraform.state tag and its arguments. If my suspicion is correct, then this call to getStringAfterTag could be overgenerating inputs to the !terraform.state function. I don't know the contract to the methods i'm looking at - this is just a hunch.Erik Osterman (Cloud Posse)
09/23/2025, 5:30 PMErik Osterman (Cloud Posse)
09/23/2025, 5:35 PM- path: catalog/ecr-deployer-role
context:
ecr_repository_arns:
- !terraform.state image1-ecr global repository_arn
- !terraform.state image2-ecr global repository_arnErik Osterman (Cloud Posse)
09/23/2025, 5:36 PMecr_repository_arns: [
"!terraform.state image1-ecr global repository_arn",
"!terraform.state image2-ecr global repository_arn"
]Erik Osterman (Cloud Posse)
09/23/2025, 5:36 PMErik Osterman (Cloud Posse)
09/23/2025, 5:36 PMDuffy Gillman
09/23/2025, 5:41 PMDuffy Gillman
09/23/2025, 5:42 PMDuffy Gillman
09/23/2025, 5:45 PM!terraform.state directive in an item in a list, all remaining items in the list are included mistakenly as arguments to the directive. It is as though the \n is not considered a valid separator and the directive is not terminating at the correct number of arguments.Duffy Gillman
09/23/2025, 5:45 PMAndriy Knysh (Cloud Posse)
09/23/2025, 6:27 PMDuffy Gillman
09/23/2025, 7:00 PMErik Osterman (Cloud Posse)
09/24/2025, 12:51 PMErik Osterman (Cloud Posse)
09/24/2025, 1:20 PMErik Osterman (Cloud Posse)
09/24/2025, 4:42 PMDuffy Gillman
09/24/2025, 5:47 PM