Skip to content

Commit

Permalink
vpc/subnet handling
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 12, 2026
1 parent 682ae56 commit 713652b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions common/data.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
data "aws_vpc" "eks_vpc" {
filter {
name = "tag:Name"
values = [var.vpc_name]
}
}

data "aws_subnets" "subnets" {
filter {
name = "tag:Name"
values = [var.subnets_name]
}
filter {
name = "vpc-id"
values = [data.aws_vpc.eks_vpc.id]
}
}

data "aws_subnet" "subnets" {
for_each = toset(data.aws_subnets.subnets.ids)
id = each.key
}

# Get portfolio details if we provided the ID
data "aws_servicecatalog_portfolio" "by_id" {
count = var.portfolio_id != null ? 1 : 0
Expand Down
12 changes: 12 additions & 0 deletions common/variables.product.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,16 @@ variable "timeout_delete" {
description = "Timeout for provisioned product deletion"
type = string
default = "60m"
}

variable "vpc_name" {
description = "Name tag of the VPC to deploy into"
type = string
default = "vpc2-csvd-dev"
}

variable "subnets_name" {
description = "Name tag of the subnets to deploy into"
type = string
default = "apps"
}

0 comments on commit 713652b

Please sign in to comment.