VPC module with transit_gateway_id and cidr_block

210 views Asked by At

I just want to confirm my understanding of something I found in the Terraform-AWS-VPC module.

Outside of Terraform, a network engineer added a transit gateway to our AWS account. If I run terraform apply, will I lose his transit gateway and cidr block additions, or is the terraform plan output (below) simply telling me that Terraform has found the values of the transit_gateway_id and cidr_block? I looked at the source code for the VPC module and it appears on line 154 that the code is looking up the values for the transit_gateway_id and cidr_block fields.

terraform plan

# module.vpc.aws_route_table.private[0] has changed
  ~ resource "aws_route_table" "private" {
        id               = "rtb-12345"
      ~ route            = [
          + {
              + carrier_gateway_id         = ""
              + cidr_block                 = "10.0.0.0/8"
              + destination_prefix_list_id = ""
              + egress_only_gateway_id     = ""
              + gateway_id                 = ""
              + instance_id                = ""
              + ipv6_cidr_block            = ""
              + local_gateway_id           = ""
              + nat_gateway_id             = ""
              + network_interface_id       = ""
              + transit_gateway_id         = "tgw-12345"
              + vpc_endpoint_id            = ""
              + vpc_peering_connection_id  = ""
            },
          + {
              + carrier_gateway_id         = ""
              + cidr_block                 = "172.0.0.0/32"
              + destination_prefix_list_id = ""
              + egress_only_gateway_id     = ""
              + gateway_id                 = ""
              + instance_id                = ""
              + ipv6_cidr_block            = ""
              + local_gateway_id           = ""
              + nat_gateway_id             = ""
              + network_interface_id       = ""
              + transit_gateway_id         = "tgw-12345"
              + vpc_endpoint_id            = ""
              + vpc_peering_connection_id  = ""
            },
            # (1 unchanged element hidden)
        ]
        tags             = {
            "Terraform_Managed" = "True"
        }
        # (5 unchanged attributes hidden)
    }

Thanks

0

There are 0 answers