Skip to content

Commit

Permalink
Merge pull request #361 from tschwarz01/keyvault-access-policy-object…
Browse files Browse the repository at this point in the history
…id-support

Adds ability to use object_id with KeyVault Access Policies
  • Loading branch information
LaurentLesle committed May 4, 2022
2 parents bc0f3d2 + 2b4c2a8 commit a9f187d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/resources/keyvault_access_policies.tfvars.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
keyvault_access_policies = {
{% for key, policy in resources[tfstate_resource].resources[subscription_key].keyvault_access_policies.items() %}
{{ key }} = {
{{ key }} = {
{% for s_key, s_policy in policy.items() %}
{{ s_key }} = {
{% if s_policy.lz_key is defined %}
Expand All @@ -12,6 +12,8 @@ keyvault_access_policies = {
azuread_service_principal_key = "{{ s_policy.azuread_service_principal_key }}"
{% elif s_policy.managed_identity_key is defined %}
managed_identity_key = "{{ s_policy.managed_identity_key }}"
{% elif s_policy.object_id is defined %}
object_id = "{{ s_policy.object_id }}"
{% endif %}
{% if s_policy.secret_permissions is defined %}
secret_permissions = {{ s_policy.secret_permissions | replace('None','[]') | replace('\'','\"') }}
Expand All @@ -22,4 +24,4 @@ keyvault_access_policies = {
{% endfor %}
}
{% endfor %}
}
}

0 comments on commit a9f187d

Please sign in to comment.