-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
44 lines (41 loc) · 1.51 KB
/
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
44
##############################################################################
# Resource Group
##############################################################################
module "resource_group" {
source = "terraform-ibm-modules/resource-group/ibm"
version = "1.1.6"
# if an existing resource group is not set (null) create a new one using prefix
resource_group_name = var.resource_group == null ? "${var.prefix}-resource-group" : null
existing_resource_group_name = var.resource_group
}
##############################################################################
# Key Protect All Inclusive
##############################################################################
module "key_protect_all_inclusive" {
source = "../.."
resource_group_id = module.resource_group.resource_group_id
key_protect_instance_name = "${var.prefix}-slz-kms"
region = var.region
resource_tags = var.resource_tags
access_tags = var.access_tags
keys = [
# Create one new Key Ring with multiple new Keys in it
{
key_ring_name = "${var.prefix}-slz-ring"
keys = [
{
key_name = "${var.prefix}-slz-key"
force_delete = true # Setting it to true for testing purpose
},
{
key_name = "${var.prefix}-atracker-key"
force_delete = true
},
{
key_name = "${var.prefix}-vsi-volume-key"
force_delete = true
}
]
}
]
}