Skip to content

Stack name override not taken into account by atmos tf planΒ #1932

@afeblot

Description

@afeblot

Describe the Bug

name can now be overridden in a stack definition. This is properly taken into account by atmos list stacks and atmos list values but not by atmos tf plan and atmos tf apply.

Expected Behavior

Stack name override is consistently taken into account in all atmos commands.

Steps to Reproduce

tar xvf name_bug.tar.gz

$ atmos list values myapp

 Key    dev-custom  prod 
─────────────────────────
 stage  dev         prod 
$ atmos list stacks

 Stack      
────────────
 dev-custom 
 prod       
$ atmos tf plan myapp -s dev-custom

 Error 

 Error: invalid component

## Explanation

 Could not find the component  myapp  in the stack  dev-custom .
 Check that all the context variables are correctly defined in the stack manifests.
 Are the component and stack names correct? Did you forget an import?
$ atmos tf plan myapp -s dev

Initializing the backend...

Initializing provider plugins...
- terraform.io/builtin/terraform is built in to OpenTofu
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

OpenTofu will perform the following actions:

  # terraform_data.helloworld will be created
  + resource "terraform_data" "helloworld" {
      + id = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Screenshots

No response

Environment

  • Atmos 1.203.0
  • WSL2 / Ubuntu 22.04

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    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