terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
758 stars 1.88k forks source link

fix: Setting var.launch_template doesn't work due to default ami and instance_type vars #378

Closed alisson276 closed 7 months ago

alisson276 commented 9 months ago

Description

If ami or instance_type are set (and they are by default) passing launch_template to the module doesn't work.

Motivation and Context

Breaking Changes

How Has This Been Tested?

alisson276 commented 9 months ago

The only problem with this solution is if the launch template has no ami or instance_type it won't work. What do you suggest?

I thought putting a "flag" would work, like override_ami = true, but I don't like the idea of introducing new variables

github-actions[bot] commented 8 months ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

github-actions[bot] commented 7 months ago

This PR was automatically closed because of stale in 10 days

github-actions[bot] commented 6 months ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.