Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleTerraform v0.11.x
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",
    ]
  }
}

Last Ditch Configuration

Warning

If your Terraform version doesn't allow you to name specific tags, you can tell it to ignore all tag changes:

Code Block
   lifecycle {
     ignore_changes = [ tags ]
   } 

Or

Code Block
   lifecycle {
     ignore_changes = [ "tags" ]
   } 


...