Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoore-msft committed Feb 25, 2019
2 parents 598fdb1 + 06dac3b commit b72d89b
Show file tree
Hide file tree
Showing 85 changed files with 3,935 additions and 833 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ node_js:
sudo: false
cache:
directories:
- node_modules
- node_modules
1 change: 1 addition & 0 deletions 101-batchaccount-with-storage/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"parameters": {
"batchAccountName": {
"type": "string",
"defaultValue": "[concat(toLower(uniqueString(resourceGroup().id)), 'batch')]",
"metadata": {
"description": "Batch Account Name"
}
Expand Down
6 changes: 1 addition & 5 deletions 101-batchaccount-with-storage/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"batchAccountName": {
"value": "GEN-UNIQUE-12"
}
}
"parameters": { }
}
17 changes: 15 additions & 2 deletions 101-key-vault-create/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create Key Vault
# Create an Azure Key Vault

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-key-vault-create%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
Expand All @@ -7,4 +7,17 @@
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template creates a Key Vault. For more information, go to: http://azure.microsoft.com/en-us/documentation/services/key-vault/
This template creates an Azure Key Vault and a secret stored inside the key vault. If you are new to Azure Key Vault, see:

- [Azure Key Vault service](https://azure.microsoft.com/services/key-vault/)
- [Azure Key Vault documentation](https://docs.microsoft.com/azure/key-vault/)
- [Azure Key Vault template reference](https://docs.microsoft.com/azure/templates/microsoft.keyvault/allversions)
- [Quickstart templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Keyvault)

If you are new to the template development, see:

- [Azure Resource Manager documentation](https://docs.microsoft.com/en-us/azure/azure-resource-manager/)
- [Use Azure Key Vault to pass secure parameter value during deployment](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-keyvault-parameter)
- [Tutorial: Integrate Azure Key Vault in Resource Manager Template deployment](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-tutorial-use-key-vault)

Tags: Azure Key Vault, Key Vault, Secrets, Resource Manager, Resource Manager templates, ARM templates
122 changes: 76 additions & 46 deletions 101-key-vault-create/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,60 @@
"keyVaultName": {
"type": "string",
"metadata": {
"description": "Name of the Vault"
"description": "Specifies the name of the key vault."
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Specifies the Azure location where the key vault should be created."
}
},
"enabledForDeployment": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"metadata": {
"description": "Specifies whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault."
}
},
"enabledForDiskEncryption": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"metadata": {
"description": "Specifies whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys."
}
},
"enabledForTemplateDeployment": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"metadata": {
"description": "Specifies whether Azure Resource Manager is permitted to retrieve secrets from the key vault."
}
},
"tenantId": {
"type": "string",
"defaultValue": "[subscription().tenantId]",
"metadata": {
"description": "Tenant Id of the subscription. Get using Get-AzureRmSubscription cmdlet or Get Subscription API"
"description": "Specifies the Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Get it by using Get-AzSubscription cmdlet."
}
},
"objectId": {
"type": "string",
"metadata": {
"description": "Object Id of the AD user. Get using Get-AzureRmADUser or Get-AzureRmADServicePrincipal cmdlets"
"description": "Specifies 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. Get it by using Get-AzADUser or Get-AzADServicePrincipal cmdlets."
}
},
"keysPermissions": {
Expand All @@ -27,7 +67,7 @@
"list"
],
"metadata": {
"description": "Permissions to keys in the vault. Valid values are: all, create, import, update, get, list, delete, backup, restore, encrypt, decrypt, wrapkey, unwrapkey, sign, and verify."
"description": "Specifies the permissions to keys in the vault. Valid values are: all, encrypt, decrypt, wrapKey, unwrapKey, sign, verify, get, list, create, update, import, delete, backup, restore, recover, and purge."
}
},
"secretsPermissions": {
Expand All @@ -36,7 +76,7 @@
"list"
],
"metadata": {
"description": "Permissions to secrets in the vault. Valid values are: all, get, set, list, and delete."
"description": "Specifies the permissions to secrets in the vault. Valid values are: all, get, list, set, delete, backup, restore, recover, and purge."
}
},
"skuName": {
Expand All @@ -47,76 +87,66 @@
"Premium"
],
"metadata": {
"description": "SKU for the vault"
}
},
"enableVaultForDeployment": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"metadata": {
"description": "Specifies if the vault is enabled for a VM deployment"
"description": "Specifies whether the key vault is a standard vault or a premium vault."
}
},
"enableVaultForDiskEncryption": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"metadata": {
"description": "Specifies if the azure platform has access to the vault for enabling disk encryption scenarios."
}
},
"enabledForTemplateDeployment": {
"type": "bool",
"defaultValue": false,
"allowedValues": [
true,
false
],
"secretName": {
"type": "string",
"metadata": {
"description": "Specifies whether Azure Resource Manager is permitted to retrieve secrets from the key vault."
"description": "Specifies the name of the secret that you want to create."
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"secretValue": {
"type": "securestring",
"metadata": {
"description": "Location for all resources."
"description": "Specifies the value of the secret that you want to create."
}
}
},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"name": "[parameters('keyVaultName')]",
"apiVersion": "2016-10-01",
"apiVersion": "2018-02-14",
"location": "[parameters('location')]",
"properties": {
"enabledForDeployment": "[parameters('enableVaultForDeployment')]",
"enabledForDiskEncryption": "[parameters('enableVaultForDiskEncryption')]",
"enabledForDeployment": "[parameters('enabledForDeployment')]",
"enabledForDiskEncryption": "[parameters('enabledForDiskEncryption')]",
"enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]",
"tenantId": "[parameters('tenantId')]",
"accessPolicies": [
{
"tenantId": "[parameters('tenantId')]",
"objectId": "[parameters('objectId')]",
"tenantId": "[parameters('tenantId')]",
"permissions": {
"keys": "[parameters('keysPermissions')]",
"secrets": "[parameters('secretsPermissions')]"
"secrets": "[parameters('secretsPermissions')]"
}
}
],
"sku": {
"name": "[parameters('skuName')]",
"family": "A"
},
"networkAcls": {
"value": {
"defaultAction": "Allow",
"bypass": "AzureServices"
}
}
}
},
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(parameters('keyVaultName'), '/', parameters('secretName'))]",
"apiVersion": "2018-02-14",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', parameters('keyVaultName'))]"
],
"properties": {
"value": "[parameters('secretValue')]"
}
}
]
}
}
10 changes: 8 additions & 2 deletions 101-key-vault-create/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
"value": "GEN-UNIQUE"
},
"objectId": {
"value": "GEN-AAD-OBJECTID"
"value": "GEN-AZUREAD-OBJECTID"
},
"secretName": {
"value": "GEN-UNIQUE"
},
"secretValue": {
"value": "GEN-UNIQUE"
}
}
}
}
6 changes: 3 additions & 3 deletions 101-key-vault-create/metadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
"type": "QuickStart",
"itemDisplayName": "Create a Key Vault",
"description": "This template creates a Key Vault and assigns permissions to the supplied objectId (principal).",
"itemDisplayName": "Create an Azure Key Vault and a secret",
"description": "This template creates an Azure Key Vault and a secret.",
"summary": "This template creates a Key Vault and assigns permissions to the supplied objectId (principal).",
"githubUsername": "seanbamsft",
"dateUpdated": "2017-09-08"
"dateUpdated": "2019-02-14"
}


2 changes: 1 addition & 1 deletion 101-ubuntu-mate-desktop-vscode/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"vmStorageAccountContainerName": "vhds",
"imagePublisher": "Canonical",
"imageOffer": "UbuntuServer",
"ubuntuOSVersion": "17.10",
"ubuntuOSVersion": "18.04-LTS",
"OSDiskName": "OSDisk",
"vmName": "vm",
"nicName": "vmNic",
Expand Down
2 changes: 1 addition & 1 deletion 201-alert-to-queue-with-logic-app/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
},
"actions": {
"Send_message.": {
"Send_message": {
"type": "ApiConnection",
"inputs": {
"body": {
Expand Down
8 changes: 4 additions & 4 deletions 201-alert-to-queue-with-logic-app/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"logicAppName": {
"value":"AlertToQueue"
},
"servicebusconnectionString": {
"serviceBusConnectionString": {
"value":"GEN-PASSWORD"
},
"servicebusConnectionName": {
"serviceBusConnectionName": {
"value":"AlertQueue"
},
"servicebusQueueName": {
"serviceBusQueueName": {
"value":"myQueue"
}
}
}
}
4 changes: 3 additions & 1 deletion 201-front-door-rate-limiting/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
}
],
"acceptedProtocols": [
"Http"
"Http",
"Https"
],
"patternsToMatch": [
"/*"
Expand Down Expand Up @@ -129,6 +130,7 @@
"backends": [
{
"address": "[parameters('backendAddress')]",
"backendHostHeader": "[parameters('backendAddress')]",
"httpPort": 80,
"httpsPort": 443,
"weight": 50,
Expand Down
25 changes: 21 additions & 4 deletions 201-key-vault-secret-create/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
# Create an Azure Key Vault and a list of secrets

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-key-vault-secret-create%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-key-vault-secret-create%2Fazuredeploy.json" target="_blank">
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template helps you to create a Key Vault. It allows to create and set multiple access policies and Secrets while creating the Vault. If you are new to [Key Vault check this out](https://azure.microsoft.com/en-us/services/key-vault/). A full walk through of this template is available [here](http://www.rahulpnath.com/blog/managing-azure-key-vault-using-azure-resource-manager-arm-templates/).
This template creates a key vault with a multiple access policies, and a list of secrets. Instead of just using an array for the secret creation, this template wraps an array in a [secureObject](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-authoring-templates#parameters). Using a secureObject instead of an array type means that the values you pass, cannot be read back in the portal after the deployment.

Resource iteration is used in this template. For more information, see

- [Create multiple instances](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-multiple)
- [Tutorial: create multiple instances](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-tutorial-create-multiple-instances)

If you are new to Azure Key Vault, see:

- [Azure Key Vault service](https://azure.microsoft.com/services/key-vault/)
- [Azure Key Vault documentation](https://docs.microsoft.com/azure/key-vault/)
- [Azure Key Vault template reference](https://docs.microsoft.com/azure/templates/microsoft.keyvault/allversions)
- [Quickstart templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Keyvault)

If you are new to the template development, see:

Instead of just using an array for the secret creation, this template wraps an array in a [secureObject](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authoring-templates#parameters).
Using a secureObject instead of an array type means that the values you pass, cannot be read back in the portal after the deployment.
- [Azure Resource Manager documentation](https://docs.microsoft.com/en-us/azure/azure-resource-manager/)
- [Use Azure Key Vault to pass secure parameter value during deployment](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-keyvault-parameter)
- [Tutorial: Integrate Azure Key Vault in Resource Manager Template deployment](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-tutorial-use-key-vault)

Tags: Azure Key Vault, Key Vault, Secrets
Tags: Azure Key Vault, Key Vault, Secrets, Resource Manager, Resource Manager templates, ARM templates
Loading

0 comments on commit b72d89b

Please sign in to comment.