1 回答
- 最新
- 投票最多
- 评论最多
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
相关内容
- AWS 官方已更新 5 个月前
- AWS 官方已更新 10 个月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
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