-
Notifications
You must be signed in to change notification settings - Fork 878
Open
Description
Hello,
I am having an issue trying to dynamically set the EC2's InstancTypes per environment using .ebextensions.
I have tried multiple configurations and this Stack Overflow article has a good break down of the problem with more detailed examples and some troubleshooting provided as well.
working yaml example (hard coded):
option_settings:
aws:ec2:instances:
InstanceTypes: t3.small # <-- hard coded works.
example environment variable yaml used:
option_settings:
aws:elasticbeanstalk:application:environment:
ENV_INSTANCE_TYPE: t3.small
failing yaml example (using getOptionSetting fn)
option_settings:
aws:ec2:instances:
InstanceTypes: {"Fn::GetOptionSetting": {"Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "ENV_INSTANCE_TYPE"}}
returns error:
ERROR Not a comma-separated string or array: '{"Fn::GetOptionSetting":{"Namespace":"aws:elasticbeanstalk:application:environment","OptionName":"ENV_INSTANCE_TYPE"}}'
I also tried:
- using custom resources.
- using 't3.small,t3.medium' and splitting that into 2 separate variables for the env var.
- using various attempts of joining/splitting the string in conjunction with the Fn::GetOptionSetting.
I do not see any issues referenced in the following documentation stating this should be an issue:
- functions usable in ebextensions
- fn::GetOptionSetting
- aws:ec2:instances -> InstanceTypes
- using custom resources
Is there something I am missing or is this not possible?
Any help with this would be greatly appreciated. Thank you.
Metadata
Metadata
Assignees
Labels
No labels