-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add Custom::App CloudFormation resource. #819
Conversation
|
||
func (p *AppsProvisioner) Provision(req Request) (id string, data interface{}, err error) { | ||
ctx := context.Background() | ||
user := &empire.User{Name: "cloudformation"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool thing is you'll still get even notifications when CloudFormation sets environment variables.
This is really neat :) |
Thinking about this a bit, I think you should be able to control whether an environment variable is secret (hidden from There's certain things that we'd want to make both locked and secret (like DATABASE_URL) and certain things that we might want to just set as sensible defaults when a new environment is brought up. |
ports: lb.NewDBPortAllocator(db), | ||
ports: lb.NewDBPortAllocator(empire.DB.DB.DB()), | ||
}, | ||
"Custom::App": &AppsProvisioner{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should check if it's possible to use Custom::Empire::App
here. Not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I tried it but didn't work. Maybe just make this Custom::EmpireApp
.
_, err := p.empire.Set(ctx, empire.SetOpts{ | ||
User: user, | ||
App: app, | ||
Vars: vars, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be cool to pass a message here describing which CF event set the variables, ie. update or create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I'll update this with messages.
i can't get over how cool this is going to be. 95% of the variables set within my empire apps are from cloudformation via stacker. being able to define everything within cloudformation is going to be life changing. 👍 👍 💯 |
#855 should be used instead |
Closing in favor of #855 |
Closes #810
This adds a
Custom::App
resource, so you can provision Empire applications, and set environment variables from CloudFormation stacks. This allows you to provision your entire infrastructure, including Empire apps, and link it all together.Not quite ready, because I think there's some UX things to address first, but I'm pretty excited about what this enables.
TODO
emp set
.Custom::Empire::App
?