Created
July 5, 2021 19:07
-
-
Save xximjasonxx/c35f33a31bbb3bc1824995fcc9fc86e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "=2.62.1" | |
} | |
} | |
} | |
variable "key_vault_id" { | |
type = string | |
} | |
variable "tenant_id" { | |
type = string | |
} | |
variable "object_id" { | |
type = string | |
} | |
variable "secret_permissions" { | |
type = list(string) | |
default = [] | |
} | |
variable "key_permissions" { | |
type = list(string) | |
default = [] | |
} | |
variable "certificate_permissions" { | |
type = list(string) | |
default = [] | |
} | |
# create resource | |
resource "azurerm_key_vault_access_policy" "this" { | |
key_vault_id = var.key_vault_id | |
tenant_id = var.tenant_id | |
object_id = var.object_id | |
key_permissions = var.key_permissions | |
secret_permissions = var.secret_permissions | |
certificate_permissions = var.certificate_permissions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment