-
Notifications
You must be signed in to change notification settings - Fork 2
/
team-access.tf
48 lines (41 loc) · 955 Bytes
/
team-access.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
data "azuread_group" "product_team" {
display_name = var.product_group_name
security_enabled = true
count = var.product_group_name == "" ? 0 : 1
}
locals {
product_group_object_id = var.product_group_name == "" ? var.product_group_object_id : data.azuread_group.product_team[0].object_id
}
resource "azurerm_key_vault_access_policy" "product_team_access_policy" {
key_vault_id = azurerm_key_vault.kv.id
object_id = local.product_group_object_id
tenant_id = data.azurerm_client_config.current.tenant_id
key_permissions = [
"List",
"Update",
"Create",
"Import",
"Delete",
"Recover",
]
certificate_permissions = [
"List",
"Update",
"Create",
"Import",
"Delete",
"ManageContacts",
"ManageIssuers",
"GetIssuers",
"ListIssuers",
"SetIssuers",
"DeleteIssuers",
"Recover",
]
secret_permissions = [
"List",
"Set",
"Delete",
"Recover",
]
}