-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-access.tf
49 lines (42 loc) · 954 Bytes
/
dev-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
49
data "azuread_group" "service_team" {
count = var.service_team_name != "" ? 1 : 0
display_name = var.service_team_name
security_enabled = true
}
locals {
service_team_object_id = var.service_team_name == "" ? var.service_team_object_id : data.azuread_group.service_team[0].object_id
}
resource "azurerm_key_vault_access_policy" "service_team_access" {
key_vault_id = azurerm_key_vault.this.id
object_id = local.service_team_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",
"Get",
"Set",
"Delete",
"Recover",
]
}