*** This version of Confluence is for testing only and contains a copy of content from June 29th 2026. No changes will be preserved. ***
...
| Code Block | ||
|---|---|---|
| ||
resource "aws_subnet" "example" {
cidr_block = "10.92.117.128/25"
vpc_id = aws_vpc.example.id
...
tags = {
Name = "example-subnet"
}
lifecycle {
ignore_changes = [
tags["cit:dc-arch-migration-description"],
tags["cit:dc-arch-migration-target"],
tags["cit:dc-arch-version"],
tags["cit:dc-vgw"],
tags["cit:subnet-type"],
tags["cit:tgw-attachment-target"],
tags["cit:tgw-attachment-guidance"],
]
}
} |
Terraform Version 0.12.0 through 0.12.2
...
| Code Block | ||
|---|---|---|
| ||
resource "aws_subnet" "example" {
cidr_block = "10.92.117.128/25"
vpc_id = aws_vpc.example.id
...
tags = {
Name = "example-subnet"
}
lifecycle {
ignore_changes = [
"tags.%",
"tags.cit:dc-arch-migration-description",
"tags.cit:dc-arch-migration-target",
"tags.cit:dc-arch-version",
"tags.cit:dc-vgw",
"tags.cit:subnet-type",
"tags.cit:tgw-attachment-target",
"tags.cit:tgw-attachment-guidance",
]
}
} |
Last Ditch Options
If your Terraform version or AWS provider version doesn't support (or behave as expected) with the options above, you should be able to, at least, tell Terraform to ignore all changes to tags, as shown below:
...