1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
Hello.
How about using "Fn::GetOptionSetting"?
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-functions.html#ebextensions-functions-getoptionsetting
By using "Fn::GetOptionSetting", you can set "option_settings" as an environment variable when creating the environment.
option_settings:
aws:elasticbeanstalk:environment:
LoadBalancerType: application
aws:elbv2:loadbalancer:
IdleTimeout: 300
aws:elbv2:listener:443:
DefaultProcess: default
ListenerEnabled: 'true'
Protocol: HTTPS
SSLCertificateArns:
"Fn::GetOptionSetting":
Namespace: "aws:elasticbeanstalk:application:environment"
OptionName: "ACM_CERT_ARN"
DefaultValue: ""
eb create --envvars "ACM_CERT_ARN=${cert_arn}" test
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 5 Monaten
- AWS OFFICIALAktualisiert vor 5 Monaten
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 5 Monaten
I want to use the .config files differently for each env. I am wondering if we can load a config file based on the env we are deploying.
let say i have 3 env dev, test, perf and all these have different config files, i want one of these needs to be loaded based on the beanstalk env.
As far as I know, I don't think that's possible. For example, if you are using CI/CD and have a configuration that copies the .config file according to the environment variables during deployment, it may be possible.
Okay thanks for looking into it, we can try doing at the project packaging level, to include the appropriate env file, but that still not work how exactly i wanted to do it