-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtransit_key.tf
50 lines (37 loc) · 1.23 KB
/
transit_key.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
# Enable transit secret engine
## https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/transit_secret_backend_key
resource "vault_mount" "transit" {
path = "transit"
type = "transit"
default_lease_ttl_seconds = 3600
max_lease_ttl_seconds = 86400
}
module "demo_key" {
source = "./modules/transit-key"
transit_mount_path = vault_mount.transit.path
key_name = "demo"
## After key rotation, use those variables
## to disallowed using older keys
# min_decryption_version = 2
# min_encryption_version = 2
}
module "transit_rsa_key" {
source = "./modules/transit-key"
transit_mount_path = vault_mount.transit.path
key_name = "rsa"
key_type = "rsa-4096"
## After key rotation, use those variables
## to disallowed using older keys
# min_decryption_version = 2
# min_encryption_version = 2
}
module "transit_ecdsa_key" {
source = "./modules/transit-key"
transit_mount_path = vault_mount.transit.path
key_name = "ecdsa"
key_type = "ecdsa-p521"
## After key rotation, use those variables
## to disallowed using older keys
# min_decryption_version = 2
# min_encryption_version = 2
}