Skip to content

Instantly share code, notes, and snippets.

View johndowns's full-sized avatar

John Downs johndowns

  • Microsoft
  • Auckland, New Zealand
View GitHub Profile

Keybase proof

I hereby claim:

  • I am johndowns on github.
  • I am johndowns (https://keybase.io/johndowns) on keybase.
  • I have a public key ASByXxyKlmvtT7vLkF_5eeMKEvr71u5YTPEOb8WIuYqGDAo

To claim this, I am signing this object:

@johndowns
johndowns / key-vault-managed-identity.bicep
Created February 21, 2022 08:41
Create a key vault, managed identity, and role assignment to grant the managed identity the 'Key Vault Administrator' role on the vault
param keyVaultName string = uniqueString(resourceGroup().id)
param location string = resourceGroup().location
var managedIdentityName = 'my-mi'
resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
name: keyVaultName
location: location
properties: {
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "Australia East"
}
resource "azurerm_cdn_profile" "example" {
name = "examplejdcdn1"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Standard_Verizon" // This represents Azure CDN from Edgio (standard)