generated from pbs/terraform-aws-template-v2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.tf
40 lines (33 loc) · 917 Bytes
/
data.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
data "aws_route53_zone" "hosted_zone" {
count = local.lookup_hosted_zone ? 1 : 0
name = "${local.hosted_zone}."
private_zone = var.internal
}
data "aws_vpc" "vpc" {
count = var.vpc_id == null ? 1 : 0
tags = local.vpc_data_lookup_tags
}
data "aws_acm_certificate" "primary_acm_wildcard_cert" {
count = local.lookup_primary_acm_wildcard_cert ? 1 : 0
domain = "*.${var.primary_hosted_zone}"
}
data "aws_subnets" "public_subnets" {
count = var.lb_subnets == null && !var.internal ? 1 : 0
dynamic "filter" {
for_each = local.subnet_data_lookup_filters
content {
name = filter.key
values = filter.value
}
}
}
data "aws_subnets" "private_subnets" {
count = var.lb_subnets == null && var.internal ? 1 : 0
dynamic "filter" {
for_each = local.subnet_data_lookup_filters
content {
name = filter.key
values = filter.value
}
}
}