Skip to content

Commit

Permalink
Merge pull request #1 from scalair/fix_access_policy
Browse files Browse the repository at this point in the history
Fix access policy
  • Loading branch information
Xat59 authored Jan 8, 2021
2 parents 0071675 + 3c68b3a commit 79c0b13
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.0.2

- fix access policies

## v0.0.1

### Added
Expand Down
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
9 changes: 1 addition & 8 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
}
Expand Down

0 comments on commit 79c0b13

Please sign in to comment.