-
Notifications
You must be signed in to change notification settings - Fork 43
/
data.tf
60 lines (49 loc) · 1.12 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# AWS Data
data "aws_vpc" "vpc" {
state = "available"
filter {
name = "vpc-id"
values = [var.vpc_id]
}
}
data "aws_region" "current" {}
data "aws_subnets" "public" {
filter {
name = "vpc-id"
values = [data.aws_vpc.vpc.id]
}
filter {
name = "tag:${var.subnet_tag}"
values = [var.public_subnets]
}
}
data "aws_subnets" "private" {
filter {
name = "vpc-id"
values = [data.aws_vpc.vpc.id]
}
filter {
name = "tag:${var.subnet_tag}"
values = [var.private_subnets]
}
}
data "aws_acm_certificate" "external-cert" {
count = var.enable_external_lb ? 1 : 0
domain = var.ssl_cert_external
}
data "aws_acm_certificate" "internal-cert" {
count = var.enable_external_lb ? 1 : 0
domain = var.ssl_cert_internal
}
data "aws_acm_certificate" "admin-cert" {
count = var.enable_external_lb ? 1 : 0
domain = var.ssl_cert_admin
}
data "aws_acm_certificate" "manager-cert" {
count = var.enable_external_lb ? 1 : 0
domain = var.ssl_cert_manager
}
data "aws_acm_certificate" "portal-cert" {
count = var.enable_external_lb ? 1 : 0
domain = var.ssl_cert_portal
}