Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from PatientPing/IN-1830-v2.9.0
Browse files Browse the repository at this point in the history
ignore tags directive for subnet resources and vpc
  • Loading branch information
efredrickson-patientping authored Jan 2, 2020
2 parents 40821bb + f59d19f commit 143b24b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ resource "aws_vpc" "this" {
enable_dns_support = var.enable_dns_support
assign_generated_ipv6_cidr_block = var.assign_generated_ipv6_cidr_block

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format("%s", var.name)
Expand Down Expand Up @@ -255,6 +261,12 @@ resource "aws_subnet" "public" {
availability_zone = element(var.azs, count.index)
map_public_ip_on_launch = var.map_public_ip_on_launch

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand All @@ -278,6 +290,12 @@ resource "aws_subnet" "private" {
cidr_block = var.private_subnets[count.index]
availability_zone = element(var.azs, count.index)

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand All @@ -301,6 +319,12 @@ resource "aws_subnet" "database" {
cidr_block = var.database_subnets[count.index]
availability_zone = element(var.azs, count.index)

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand Down Expand Up @@ -340,6 +364,12 @@ resource "aws_subnet" "redshift" {
cidr_block = var.redshift_subnets[count.index]
availability_zone = element(var.azs, count.index)

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand Down Expand Up @@ -379,6 +409,12 @@ resource "aws_subnet" "elasticache" {
cidr_block = var.elasticache_subnets[count.index]
availability_zone = element(var.azs, count.index)

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand Down Expand Up @@ -410,6 +446,12 @@ resource "aws_subnet" "intra" {
cidr_block = var.intra_subnets[count.index]
availability_zone = element(var.azs, count.index)

lifecycle {
ignore_changes = [
tags,
]
}

tags = merge(
{
"Name" = format(
Expand Down

0 comments on commit 143b24b

Please sign in to comment.