From c7bfe3acf1c3146f953dd52be3861b37926abe58 Mon Sep 17 00:00:00 2001 From: Xat59 Date: Fri, 8 Jan 2021 11:05:55 +0100 Subject: [PATCH 1/2] fix: access policies --- main.tf | 12 ++++++------ variables.tf | 9 +-------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/main.tf b/main.tf index 111067e..9e93b44 100644 --- a/main.tf +++ b/main.tf @@ -24,13 +24,13 @@ resource "azurerm_key_vault" "kv" { content { tenant_id = var.tenant_id - object_id = network_acls.value.object_id - application_id = network_acls.value.application_id + object_id = access_policy.value.object_id + application_id = lookup(access_policy.value, "application_id", null) - certificate_permissions = network_acls.value.certificate_permissions - key_permissions = network_acls.value.key_permissions - secret_permissions = network_acls.value.secret_permissions - storage_permissions = network_acls.value.storage_permissions + certificate_permissions = lookup(access_policy.value, "certificate_permissions", null) + key_permissions = lookup(access_policy.value, "key_permissions", null) + secret_permissions = lookup(access_policy.value, "secret_permissions", null) + storage_permissions = lookup(access_policy.value, "storage_permissions", null) } } diff --git a/variables.tf b/variables.tf index 82b741b..aa334c9 100644 --- a/variables.tf +++ b/variables.tf @@ -25,14 +25,7 @@ variable "tenant_id" { } variable "access_policy" { - type = list(object({ - object_id = string - application_id = string - certificate_permissions = list(string) - key_permissions = list(string) - secret_permissions = list(string) - storage_permissions = list(string) - })) + type = list(any) description = "(Optional) A list of up to 16 objects describing access policies." default = [] } From 3c68b3abced4ecb20b0505aa2722f52eeb12f05a Mon Sep 17 00:00:00 2001 From: Xat59 Date: Fri, 8 Jan 2021 11:07:03 +0100 Subject: [PATCH 2/2] fix: access policies --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 994f43a..699e3e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.0.2 + +- fix access policies + ## v0.0.1 ### Added