clusterinthecloud / support

If you need help with Cluster in the Cloud, this is the right place
2 stars 0 forks source link

terraform ignores the value of AWS_PROFILE #19

Open chryswoods opened 3 years ago

chryswoods commented 3 years ago

When run from the command line, terraform ignores the value of the AWS_PROFILE environment variable. This means that the "default" AWS profile is used, instead of the profile chosen by the user. The CitC instance is created in the "wrong" AWS account, leaving the user open to unexpected spend.

The best fix would be to either have a confirmation or explicit setting of AWS_PROFILE before running, or to double check that the profile used by terraform is the same one that the "aws" cli uses. I think this would also impact, e.g. default regions (I had expected to see the cluster go in us-east-1 in my AWS_PROFILE account, but instead it went into eu-west-1 in my default account)