Skip to content

Instantly share code, notes, and snippets.

@torgro
Last active January 15, 2017 23:16
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 torgro/62d9710aa80b41fd5b89d92a1ffa22ea to your computer and use it in GitHub Desktop.
Save torgro/62d9710aa80b41fd5b89d92a1ffa22ea to your computer and use it in GitHub Desktop.
# Create a new empty template
New-ArmTemplate
# Creates a new variable named Region
New-ARMvariable -Name Region -Value "East US" | Add-ARMvariable
$newVar = @{
Name = "Region2"
Value = "North Europe"
}
# Creates a new variable named Region2
New-ARMvariable @newVar | Add-ARMvariable
$newParm = @{
Name = 'adminUsername'
Type = 'string'
Description = 'Username for the Virtual Machine.'
}
# Creates a new parameter named adminUsername
New-ARMparameter @newParm | Add-ARMparameter
$resource = @{
type = "Microsoft.Storage/storageAccounts"
name = "StorageSimpleVM"
apiVersion = "2016-01-01"
location = "North Europe"
sku = @{
name = "Standard_LRS"
}
kind = "Storage"
properties = @{}
}
# Creates a new StorageAccount with name StorageSimpleVM
New-ARMresource @resource | Add-ARMresource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment