Closed saveshnshetty closed 6 years ago
This issue has been automatically migrated to terraform-providers/terraform-provider-aws#5609 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to terraform-providers/terraform-provider-aws#5609.
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Hi team, I've defined volume tags in aws_instance resource and aws_ebs_volume resource since I need to add tags to root volume also. But when I ran "terraform apply" second time. Ebs volumes tags got replaced with aws instance volume tags. On third run it got replaced with original ebs volume tags . This tags changes alternatively . Can you please look into it .
syntax : resource "aws_instance" "app" { count = "1" ami = "${lookup(var.ami,var.region)}" ebs_optimized = "${var.ebs_optimized}" instance_type = "${var.instance_type_app}" monitoring = "${var.monitoring}" key_name = "${var.key_name}" user_data = "${data.template_file.userdata-app..rendered[count.index]}" network_interface { network_interface_id = "${element(aws_network_interface.network-interface-app..id, count.index)}" device_index = 0 } tags { Name = "$app-${count.index + 1}" Type = "app" Env = "${var.env}" Customer_id = "${var.customer_id}" }
}
resource "aws_ebs_volume" "ebs-app" { count = "${var.app_count}" availability_zone = "****" size = "${var.ebs_volume_size[0]}" type = "${var.ebs_volume_type[0]}" tags { Name = "app-tmp" Type = "ebs-volume" Env = "${var.env}" Customer_id = "${var.customer_id}" } }