Skip to content

Instantly share code, notes, and snippets.

@kaparora
Last active July 24, 2020 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaparora/ed0ee995d3ae4ff1e3b2524d67822cd5 to your computer and use it in GitHub Desktop.
Save kaparora/ed0ee995d3ae4ff1e3b2524d67822cd5 to your computer and use it in GitHub Desktop.
#!/bin/sh
#enable azure auth method
vault auth enable azure
#configure azure auth method using azure service principal
vault write auth/azure/config tenant_id="${tenant_id}" \
resource="https://management.azure.com/" client_id="${client_id}" \
client_secret="${client_secret}"
#create azure auth role with the acl policy, azure subscription and resource group
vault write auth/azure/role/dev-role policies="webapp" \
bound_subscription_ids="${subscription_id}" \
bound_resource_groups="${resource_group_name}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment