-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
43 lines (35 loc) · 829 Bytes
/
main.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
provider "aws" {
region = var.region
}
module "self_signed_cert" {
source = "../.."
subject = {
common_name = module.this.id
organization = "Cloud Posse"
organizational_unit = "Engineering"
}
validity = {
duration_hours = 730
early_renewal_hours = 24
}
allowed_uses = var.basic_constraints.ca ? [
"crl_signing",
"cert_signing",
] : [
"key_encipherment",
"digital_signature",
"server_auth"
]
subject_alt_names = var.basic_constraints.ca ? {
ip_addresses = null
dns_names = null
uris = null
} : {
ip_addresses = ["10.10.10.10"]
dns_names = ["example.com"]
uris = ["https://example.com"]
}
basic_constraints = var.basic_constraints
skid_enabled = true
context = module.this.context
}