Skip to content

Multi-Region with Provider Aliases example is not workingΒ #2208

@heylongdacoder

Description

@heylongdacoder

Describe the Bug

https://atmos.tools/stacks/providers#multi-region-with-provider-aliases, this example is not working, the actual generated file is different from the example.

Expected Behavior

The generated file is the same as the example.

Steps to Reproduce

With the following atmos component config:

components:
  terraform:
    eip:
      providers:
        aws:
          region: us-east-2
        aws.use1:
          region: us-east-1
          alias: use1
      metadata:
        component: eip

Run atmos command and check the output of providers_override.tf.json

Screenshots

The content of the generated providers_override.tf.json

{
  "provider": {
    "aws": {
      "region": "us-east-2"
    },
    "aws.use1": {
      "alias": "use1",
      "region": "us-east-1"
    }
  }
}

Would expect it to be :

{
  "provider": {
    "aws": [
      {
        "region": "us-east-2"
      },
      {
        "alias": "use1",
        "region": "us-east-1"
      }
    ]
  }
}

Environment

  • OS: OSX
  • Version: 1.209.0
  • Terraform version: v1.14.7

Additional Context

No response

Metadata

Metadata

Labels

bugπŸ› An issue with the system

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions