-
Notifications
You must be signed in to change notification settings - Fork 0
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
Set up stage-specific config #12
Conversation
3763b65
to
c398929
Compare
c398929
to
cc0bce3
Compare
"net.logstash.logback" % "logstash-logback-encoder" % "7.3", | ||
("com.gu" %% "simple-configuration-ssm" % "1.6.4").cross(CrossVersion.for3Use2_13), |
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's no Scala 3 version of the library yet
@@ -34,7 +34,7 @@ export class Gatehouse extends GuStack { | |||
userData: { | |||
distributable: { | |||
fileName: `${ec2App}.deb`, | |||
executionStatement: `dpkg -i /${ec2App}/${ec2App}.deb && echo "stage=${this.stage}" | sudo tee "/etc/gatehouse/stage.conf" > /dev/null`, | |||
executionStatement: `dpkg -i /${ec2App}/${ec2App}.deb`, |
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.
Because we're getting the stage from EC2 tags, we no longer need to write a file with the stage value in it.
super.configuration | ||
else | ||
Configuration("play.http.secret.key" -> secretKey).withFallback(super.configuration) | ||
|
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.
are you planning to to use play secret rotation ? I think it's still the recommendation
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.
Yes I started looking at that. Thanks for the reminder
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.
looks good to me
This is a change to use the recommended simple configuration library to give us stage-specific config by reading the stage tag on the host EC2 instance.
I've largely followed the examples in the simple-configuration readme.
Tested on Code.