:wave: Hello, not sure if this is an expected beha...
# atmos
a
๐Ÿ‘‹ Hello, not sure if this is an expected behaviour ๐Ÿงต
โœ… 1
When running:
atmos terraform generate backends --file-template={component-path}/backends/{namespace}-{tenant}-{stage}-{environment}-{component}.s3.tfbackend --format backend-config
outputs:
Copy code
acl = "bucket-owner-full-control"

assume_role = {
  "role_arn" = "arn:aws:iam::12345:role/foo"
}

bucket = "foo-live-fra-fuu-terraform-states"

encrypt = true

key = "terraform.tfstate"

region = "eu-central-1"

use_lockfile = true

workspace_key_prefix = "dynamodb"
atmos terraform generate backends --file-template={component-path}/backends/{namespace}-{tenant}-{stage}-{environment}-{component}.s3.tfbackend
outputs:
Copy code
terraform {
  backend "s3" {
    acl                  = "bucket-owner-full-control"
    bucket               = "foo-live-fra-fuu-terraform-states"
    encrypt              = true
    key                  = "terraform.tfstate"
    region               = "eu-central-1"
    use_lockfile         = true
    workspace_key_prefix = "dynamodb"
  }
}
This is my template: stacks/_defaults.yaml
Copy code
terraform:
  backend_type: s3
  backend:
    s3:
      acl: "bucket-owner-full-control"
      encrypt: true
      bucket: "foo-{{ .vars.stage }}-{{ .vars.environment }}-{{ .vars.account_name }}-terraform-states"
      region: "eu-central-1"
      key: terraform.tfstate
      use_lockfile: true
      assume_role:
        role_arn: "arn:aws:iam::{{ .vars.account_id }}:role/{{ .vars.control_plane_account_access_role }}"
in the second command the
assume_role
is not generated ๐Ÿค”
a
thanks @Alberto Rojas I think it's an issue with the HCL generator (it does not generate complex maps)
@Gabriela Campana (Cloud Posse) please create a task for this
โœ… 1
g
a
@Alberto Rojas this is fixed in https://github.com/cloudposse/atmos/pull/1750, will be in the next Atmos release
๐Ÿ™Œ 1
a
Nice!, thanks! I also have this PR open: https://github.com/cloudposse/atmos/pull/1749 @Andriy Knysh (Cloud Posse)
merged 1
๐Ÿ™Œ 2