To create different environment variables per stage is easy with the Gothic Framework. Fist create the stage name you want into your gothic-config.json as shown below.
{
"projectName" : "gothic-example" ,
"goModuleName" : "github.com/felipegenef/gothicframework/v2" ,
"optimizeImages" : {
"lowResolutionRate" : 20 ,
}
"deploy" : {
"serverMemory" : 128 ,
"serverTimeout" : 30 ,
"region" : "us-east-1" ,
"customDomain" : false ,
"profile" : "default" ,
"stages" : {
"dev" : {
"hostedZoneId" : null ,
"customDomain" : null ,
"certificateArn" : null ,
"wafArn" : null ,
"env" : {
"MyEnvVar1" : "my-env-var-1-dev"
}
},
"qa" : {
"hostedZoneId" : null ,
"customDomain" : null ,
"certificateArn" : null ,
"wafArn" : null ,
"env" : {
"MyEnvVar1" : "my-env-var-1-qa"
}
},
"prod" : {
"hostedZoneId" : null ,
"customDomain" : null ,
"certificateArn" : null ,
"wafArn" : null ,
"env" : {
"MyEnvVar1" : "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!