diff --git a/CHANGELOG.md b/CHANGELOG.md index d74e5704..ab4899b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [6.1.1](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/compare/v6.1.0...v6.1.1) (2025-08-25) + + +### Bug Fixes + +* Avoid setting `Name` tag when a value has not been provided for `name` ([#452](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/452)) ([c227866](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/commit/c227866fa9c7a3ac557fb6ad53ce813ae42590b7)) + ## [6.1.0](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/compare/v6.0.2...v6.1.0) (2025-08-22) diff --git a/README.md b/README.md index 850b7371..21ed8faa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ module "ec2_instance" { name = "single-instance" - instance_type = "t2.micro" + instance_type = "t3.micro" key_name = "user1" monitoring = true subnet_id = "subnet-eddcdzz4" @@ -36,7 +36,7 @@ module "ec2_instance" { name = "instance-${each.key}" - instance_type = "t2.micro" + instance_type = "t3.micro" key_name = "user1" monitoring = true subnet_id = "subnet-eddcdzz4" @@ -60,7 +60,7 @@ module "ec2_instance" { spot_price = "0.60" spot_type = "persistent" - instance_type = "t2.micro" + instance_type = "t3.micro" key_name = "user1" monitoring = true subnet_id = "subnet-eddcdzz4" diff --git a/main.tf b/main.tf index b116b406..39b3e235 100644 --- a/main.tf +++ b/main.tf @@ -10,7 +10,7 @@ locals { instance_tags = merge( var.tags, var.instance_tags, - { "Name" = var.name }, + var.name != "" ? { "Name" = var.name } : {} ) instance_id = try(