binbashar / le-tf-infra-aws

Terraform code for Leverage Reference Architecture for AWS, designed under optimal configs for the most popular modern web and mobile applications needs.
https://www.binbash.co/leverage
Apache License 2.0
24 stars 7 forks source link

BUG | Should key name be changed? #553

Open juanmatias opened 4 months ago

juanmatias commented 4 months ago

Describe the Bug

The key name for cost-mgmt layer here is root/cost-mgmt/terraform.tfstate.

If downloading the layer to management account (where it is supposed to be), it produces an error:

[17:45:53.730] INFO     Found: 'root/cost-mgmt/terraform.tfstate'                                                                       
               INFO     Expected one of: management/cost-mgmt/terraform.tfstate;management/cost-mgmt-dr/terraform.tfstate;management/glo
                        bal/cost-mgmt/terraform.tfstate;management/global/cost-mgmt-dr/terraform.tfstate                                
[17:45:53.731] ERROR    ✘ FAILED 

Should we change it in the RefArch (and for the case look for other keys in the same situation)?

Expected Behavior

It not failing.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Download the layer to your project's management account
  2. Run leverage tf init

Additional Context

In a green-field binbash Leverage project, changing this key to start with management does not fail.