We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b734a58 commit 8c20030Copy full SHA for 8c20030
data.tf
@@ -20,4 +20,4 @@ data "aws_ami" "amazon_linux_2023" {
20
name = "virtualization-type"
21
values = ["hvm"]
22
}
23
-}
+}
main.tf
@@ -271,7 +271,7 @@ DOC
271
272
resource "aws_launch_template" "default" {
273
name_prefix = module.this.id
274
- image_id = length(var.ami) > 0 ? var.ami : data.aws_ami.amazon_linux_2023.id
+ image_id = coalesce(var.ami, data.aws_ami.amazon_linux_2023.id)
275
instance_type = var.instance_type
276
key_name = var.key_pair_name
277
user_data = base64encode(var.user_data)
0 commit comments