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
754 stars 1.87k forks source link

fix: Modify coalesce ami and ami_ssm_parameter function from always failing when ami var defined #353

Closed Zonny closed 1 year ago

Zonny commented 1 year ago

… always failing when ami var defined

Description

Include separate try functions for both var.ami and nonsensitive(data.aws_ssm_parameter.this[0].value) to allow them to return null separately instead of returning null if the whole expression fails

Motivation and Context

Change is required to fix #352

Breaking Changes

How Has This Been Tested?

antonbabenko commented 1 year ago

This has been resolved in #354

github-actions[bot] commented 1 year 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.