I am working on migrating our infrastructure code from launch_configuration to launch_template. I want to use either launch_configuration and launch_template based on the AWS region.
How can i use aws_autoscaling_group resource to pick launch_configuration or launch_template?
resource "aws_autoscaling_group" "asg" {
launch_configuration = xyz
or
launch_template {
id = 123
version = $LATEST
}
I could use dynamic block for launch_template block based on the condition but i am not able to figure out how to include or exclude launch_configuration argument based on the condition
You do this with
null
: