diff --git a/main.tf b/main.tf index bc80617..94d8543 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,7 @@ locals { instance_count = module.this.enabled ? var.instance_count : 0 region = var.region != "" ? var.region : data.aws_region.default.name - root_iops = var.root_volume_type == "io1" || var.root_volume_type == "gp3" ? var.root_iops : 0 + root_iops = var.root_volume_type == "io1" || var.root_volume_type == "gp3" ? var.root_iops : "3000" ebs_iops = var.ebs_volume_type == "gp3" ? var.ebs_iops : 0 availability_zone = var.availability_zone root_volume_type = var.root_volume_type != "" ? var.root_volume_type : data.aws_ami.info.root_device_type @@ -121,7 +121,7 @@ resource "aws_instance" "default" { } ) lifecycle { - ignore_changes = [ami, subnet_id] + ignore_changes = [user_data, ami, subnet_id, ebs_optimized, hibernation, tags["ScheduleMessage"], tags_all["ScheduleMessage"], tags["LocalHostName"], tags_all["LocalHostName"]] } } @@ -142,7 +142,7 @@ resource "aws_instance" "default" { resource "aws_eip" "default" { count = local.count_default_ips network_interface = aws_instance.default.*.primary_network_interface_id[count.index] - vpc = true + domain = "vpc" depends_on = [aws_instance.default] tags = module.this.tags }