Skip to content

Commit

Permalink
dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 19, 2026
1 parent 4e40237 commit db212d8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions modules/ec2/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,3 @@ data "aws_availability_zone" "zone" {
state = "available"
name = each.key
}

data "external" "portfolio" {
program = ["bash", "-c", "tf-aws servicecatalog list-portfolios --region ${local.region} --query \"PortfolioDetails[?contains(DisplayName, 'Service Portfolio for')]|[0]|{id: Id}\" --output json"]
}

data "external" "product" {
program = ["bash", "-c", "tf-aws servicecatalog search-products --region ${local.region} --query \"ProductViewSummaries[?contains(Name, 'RHEL')]|[0]|{id: ProductId}\" --output json"]
}
6 changes: 0 additions & 6 deletions modules/ec2/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ locals {
region = data.aws_region.current.id
vpc_id = data.aws_vpc.vpc.id

# Use provided portfolio_id or fall back to external data source lookup
portfolio_id = var.portfolio_id != null ? var.portfolio_id : try(data.external.portfolio.result.id, null)

# Use provided product_id or fall back to external data source lookup
product_id = var.product_id != null ? var.product_id : try(data.external.product.result.id, null)

# Get the latest provisioning artifact ID
latest_artifact_id = local.product_id == null ? null : try(
[for artifact in data.aws_servicecatalog_provisioning_artifacts.this[0].provisioning_artifact_details :
Expand Down

0 comments on commit db212d8

Please sign in to comment.