Skip to content

Commit

Permalink
Merge pull request #13 from truefoundry/hl_cleanup_existing
Browse files Browse the repository at this point in the history
move data to data.tf
  • Loading branch information
sachincool authored Jan 6, 2025
2 parents 8258efb + 8b3764e commit b796b46
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
11 changes: 11 additions & 0 deletions data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
data "aws_subnet" "private_subnets" {
count = var.shim ? length(var.private_subnets_ids) : 0

id = element(var.private_subnets_ids, count.index)
}

data "aws_subnet" "public_subnets" {
count = var.shim ? length(var.public_subnets_ids) : 0

id = element(var.public_subnets_ids, count.index)
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ variable "flow_logs_bucket_override_name" {
description = "Override name for s3 bucket. flow_logs_bucket_enable_override must be set true"
type = string
default = ""
}
}
12 changes: 0 additions & 12 deletions vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,4 @@ resource "aws_vpc_endpoint" "s3" {
vpc_id = module.aws-vpc-module[0].vpc_id
service_name = "com.amazonaws.${var.aws_region}.s3"
tags = local.tags
}

data "aws_subnet" "private_subnets" {
count = var.shim ? length(var.private_subnets_ids) : 0

id = element(var.private_subnets_ids, count.index)
}

data "aws_subnet" "public_subnets" {
count = var.shim ? length(var.public_subnets_ids) : 0

id = element(var.public_subnets_ids, count.index)
}

0 comments on commit b796b46

Please sign in to comment.