Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: udpate azurerm_key_vault_access_policy object_id description for principal app #20366

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 15 additions & 1 deletion website/docs/r/key_vault_access_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ resource "azurerm_key_vault_access_policy" "example" {
"Get",
]
}

data "azuread_service_principal" "example" {
display_name = "example-app"
}

resource "azurerm_key_vault_access_policy" "example-principal" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azuread_service_principal.example.object_id

key_permissions = [
"Get", "List", "Encrypt", "Decrypt"
]
}
```

## Argument Reference
Expand All @@ -55,7 +69,7 @@ The following arguments are supported:

* `tenant_id` - (Required) The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.

* `object_id` - (Required) The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
* `object_id` - (Required) The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.

* `application_id` - (Optional) The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created.

Expand Down