Versions Compared

Key

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

...

Note

Please don't allow Terraform to delete the tags prefixed by "cit:" tags", or the "Cost Center" tag! They are important for the migration to the v2 Direct Connect architecture. If you (or Terraform) delete those tags, they will be recreated before the migration proceeds. Deleting the "Cost Center" tag on TGW attachments will result in customers paying for TGW attachment costs instead of CIT.

This is what it looks like when Terraform finds those tags, and makes a plan to delete them:

...

Code Block
titleRecent Terraform Versions (>= v0.13)
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"],
	  tags["Cost Center"],
     ]
  }
}

Terraform Version 0.12.0 through 0.12.2

...

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",
      "tags.cit:tgw-attachment-guidance",
      "tags.Cost Center",
     ]
  }
}

Last Ditch Options

...