Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure region outside of the CLI? #277

Closed
rouge8 opened this issue Nov 29, 2016 · 13 comments
Closed

Configure region outside of the CLI? #277

rouge8 opened this issue Nov 29, 2016 · 13 comments
Milestone

Comments

@rouge8
Copy link
Contributor

rouge8 commented Nov 29, 2016

It would be great if we could specify the region when configuring stacks, e.g.:

stacks:
  - name: app-us-west
    class_path: my_blueprints.App
    region: us-west
  - name: app-us-east
    class_path: my_blueprints.App
    region: us-east
@phobologic
Copy link
Member

I wonder if this would be a good idea to combine w/ #263. Maybe make a profile a mix of account id + region?

@phobologic
Copy link
Member

@ejholmes ping ^^

@ejholmes
Copy link
Contributor

ejholmes commented Nov 30, 2016

Yep, I think it'd make sense to just add support for specifying what profile to use when creating a stack. That'd easily allow for cross account/region/etc use cases, as well as all the other stuff that profiles allow, like assuming roles + mfa.

For example, in the case above, you can just point stacker at an ~/.aws/config file like:

[profile "infra-east"]
region = us-east-1

[profile "infra-west"]
region = us-west-1

And then specify the profile in the stacks definition:

stacks:
  - name: app-us-west
    class_path: my_blueprints.App
    profile: infra-west
  - name: app-us-east
    class_path: my_blueprints.App
    profile: infra-east

@phobologic phobologic added this to the post-1.0 milestone Dec 4, 2016
@phobologic
Copy link
Member

(pinging @rouge8 since he opened this, and @troyready since he mentioned he was looking at this in #318):

I'm going to mark this as post-1.0. I'm working on trying to get 1.0 out, and I think this can wait till after that (though I don't think it'll take long). Let me know if you disagree!

@rouge8
Copy link
Contributor Author

rouge8 commented Feb 15, 2017

Fine with me, I ended up going with a wrapper script around the Stacker CLI anyways. :)

@phobologic
Copy link
Member

@rouge8 Cool - hopefully we can pull this in soon so you can do away with the wrapper :)

@kappataumu
Copy link

@phobologic This would really simplify some stuff, like creating buckets for cross-region replication. Is it on the roadmap?

@phobologic
Copy link
Member

@kappataumu It's in theory on the roadmap, but not currently scheduled in any way. It's definitely something we want to do though - or, if someone wants to give us a PR, we'd be happy to take a look!

@kappataumu
Copy link

@phobologic We've settled on stacker for our infra so I might take a look at some point. Currently using a wrapper script as well.

@ejholmes
Copy link
Contributor

This is something I want to tackle in the next ~month or so. I put together a little RFC for how I think this should work if anyone else has thoughts: https://github.com/remind101/stacker/wiki/RFC:-Profiles

@troyready
Copy link
Contributor

@ejholmes I love it. For xref, I'd prefer it to have an option to specify a profile added to its syntax (profile@stack or whatever`) and have it fallback to the environment (AWS_DEFAULT_PROFILE / output of assume-role / etc)

@ejholmes
Copy link
Contributor

Hey guys. Support for this was recently merged with #551 and will be coming in 1.3 :).

@ejholmes
Copy link
Contributor

Also, I should note, the exact syntax used in the description of this issue will work, in addition to supporting AWS profiles in #553.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants