terraform-aws-ec2-instance icon indicating copy to clipboard operation
terraform-aws-ec2-instance copied to clipboard

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

Open alisson276 opened this issue 1 year ago β€’ 1 comments

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?

  • [X] I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • [x] I have tested and validated these changes using one or more of the provided examples/* projects
  • [x] I have executed pre-commit run -a on my pull request

alisson276 avatar Feb 21 '24 09:02 alisson276

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

alisson276 avatar Feb 21 '24 11:02 alisson276

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] avatar Mar 23 '24 00:03 github-actions[bot]

This PR was automatically closed because of stale in 10 days

github-actions[bot] avatar Apr 02 '24 00:04 github-actions[bot]

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.

github-actions[bot] avatar May 02 '24 02:05 github-actions[bot]