Skip to content

Commit

Permalink
core components
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Istrati committed May 9, 2024
1 parent 37c3de3 commit 09210ef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 0 additions & 1 deletion iac/core/eks_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ resource "aws_eks_access_policy_association" "this" {
namespaces = var.q.namespaces != "" ? split(",", var.q.namespaces) : null
}
}

11 changes: 11 additions & 0 deletions iac/core/vpc_endpoint/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ data "terraform_remote_state" "sg" {
key = format(var.backend_pattern, "security_group")
}
}

data "terraform_remote_state" "subnet" {
backend = "s3"
config = {
skip_region_validation = true

region = data.aws_region.this.name
bucket = var.backend_bucket[data.aws_region.this.name]
key = format(var.backend_pattern, "vpc_subnet")
}
}
4 changes: 2 additions & 2 deletions iac/core/vpc_endpoint/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resource "aws_vpc_endpoint" "this" {
private_dns_enabled = true
service_name = format("com.amazonaws.%s.%s", data.aws_region.this.name, element(local.interfaces, count.index))
subnet_ids = merge(
data.terraform_remote_state.sg.outputs.igw_subnet_ids,
data.terraform_remote_state.sg.outputs.nat_subnet_ids
data.terraform_remote_state.subnet.outputs.igw_subnet_ids,
data.terraform_remote_state.subnet.outputs.nat_subnet_ids
)
security_group_ids = [data.terraform_remote_state.sg.outputs.id]
depends_on = [aws_vpc_endpoint.that]
Expand Down
5 changes: 5 additions & 0 deletions iac/core/vpc_endpoint/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ dependency "sg" {
config_path = "../security_group"
skip_outputs = true
}

dependency "subnet" {
config_path = "../vpc_subnet"
skip_outputs = true
}

0 comments on commit 09210ef

Please sign in to comment.