Skip to content

Commit

Permalink
🐛 fix(dns_zones.tf): removed unneeded tag filter on dummy-vpc (#23)
Browse files Browse the repository at this point in the history
Hit an error running Terragrunt, too many vpcs in the environment. Turns
out each of the clusters was creating it's own dummy vpc and tagging it
as for that cluster since we had a cluster specific tag filter
  • Loading branch information
morga471 committed Sep 17, 2024
1 parent aef5865 commit 811688b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions dns_zones.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ provider "aws" {

provider "aws" {
alias = "self"
# Commented as in testing we are assuming this role already
# assume_role {
# role_arn = format("arn:%v:iam::%v:role/r-inf-terraform", data.aws_arn.current.partition, data.aws_caller_identity.current.account_id)
# session_name = var.os_username
# }
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, data.aws_caller_identity.current.account_id)
session_name = var.os_username
}
}

#-------------------------------------------------
Expand Down Expand Up @@ -125,10 +124,6 @@ data "aws_vpc" "dummy_vpc" {
name = "tag:Name"
values = ["vpc0-dummy"]
}
filter {
name = "tag:eks-cluster-name"
values = [var.cluster_name]
}
}

resource "aws_vpc" "vpc" {
Expand All @@ -137,8 +132,7 @@ resource "aws_vpc" "vpc" {
enable_dns_hostnames = false
tags = merge(
var.tags,
{ "Name" = "vpc0-dummy" },
{ "eks-cluster-name" = var.cluster_name }
{ "Name" = "vpc0-dummy" }
)
}

Expand Down

0 comments on commit 811688b

Please sign in to comment.