Environment Variables
To create different environment variables per stage is easy with the Gothic Framework. Declare each stage under Deploy.Providers.AWS.Stages in your gothic.config.go, and set each variable with the gothic.Env(...) builder for a plain literal value, as shown below.
Stages: map[string]gothic.Stage{
"dev": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("my-env-var-1-dev"),
},
},
"qa": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("my-env-var-1-qa"),
},
},
"prod": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("my-env-var-1-prod"),
},
},
},Did you like this session of how to deploy your app with custom environment variables per stage? Check out how to get your environment variables in a secure way using AWS Parameter Store!
