unbounce / iidy

iidy (Is it done yet?) -- CloudFormation with Confidence
MIT License
52 stars 7 forks source link

create-stack targeting wrong region #68

Closed jpb closed 6 years ago

jpb commented 6 years ago

Expected: stack created in us-west-2 Actual: stack created in us-east-1

$ env | grep AWS
$ cat stack-args.yaml
$imports:
  stackLabel: env:STACK_LABEL:slim

Region: us-west-2
StackName: 'my-stack-{{ stackLabel }}'
Template: cfn-template.yaml
Parameters:
  ...
$ iidy --debug create-stack stack-args.yaml
debug: argsdata -> stackArgs { '$imports': { stackLabel: 'env:STACK_LABEL:slim' },
  Region: 'us-west-2',
  StackName: 'my-stack-{{ stackLabel }}',
  Template: 'cfn-template.yaml',
  Parameters:
   { ... },
  '$envValues':
   { region: 'us-east-1',
     environment: 'development',
     iidy: { environment: 'development', region: 'us-east-1' },
     stackLabel: 'slim' } }
...

Command Metadata:
 CFN Operation:           CREATE_STACK
 Region:                  us-west-2
 CLI Arguments:           region=null, profile=null, argsfile=infrastructure/ssh_security_group/stack-args.yaml
...
ARN:                     arn:aws:cloudformation:us-east-1:...:stack/...
 Console URL:             https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stack/detail?stackId=...
jpb commented 6 years ago

Workaround is to use --region CLI parameter.