Repeatable deploymentsedit

For repeatable deployments, it is recommended to target a specific template release within the GitHub repository; Each release is identified by tagging the commit and the release notes indicate the changes in the release.

Targeting a specific release ensures that the template parameters remain the same, in addition to which resources are deployed and how they are configured. Furthermore, a release undergoes considerable testing before being considered ready for public release.

As an example, to target 6.4.2 release of the template

Azure CLI 2.0.

template_base_uri=https://raw.githubusercontent.com/elastic/azure-marketplace
template_version=6.4.2

az group deployment create \
  --resource-group "<name>" \
  --template-uri $template_base_uri/$template_version/src/mainTemplate.json \
  --parameters artifactsBaseUrl=$template_base_uri/$template_version/src \
               esVersion=6.4.2 esClusterName=elasticsearch \
               vmDataDiskCount=1 dataNodesAreMasterEligible=Yes \
               adminUsername=russ adminPassword=Password1234 \
               securityBootstrapPassword=bootstrapPassword123 \
               securityAdminPassword=adminPassword123 \
               securityReadPassword=readPassword123 \
               securityKibanaPassword=kibanaPassword123 \
               securityLogstashPassword=logstashPassword123 \
               securityBeatsPassword=beatsPassword123

Azure PowerShell.

$templateBaseUri = "https://raw.githubusercontent.com/elastic/azure-marketplace"
$templateVersion = "6.4.2"

$parameters = @{
  "artifactsBaseUrl" = "$templateBaseUri/$templateVersion/src"
  "esVersion" = "6.4.2"
  "esClusterName" = "elasticsearch"
  "vmDataDiskCount" = 1
  "dataNodesAreMasterEligible" = "Yes"
  "adminUsername" = "russ"
  "adminPassword" = "Password1234"
  "securityBootstrapPassword" = "bootstrapPassword123"
  "securityAdminPassword" = "adminPassword123"
  "securityReadPassword" = "readPassword123"
  "securityKibanaPassword" = "kibanaPassword123"
  "securityLogstashPassword" = "logstashPassword123"
  "securityBeatsPassword" = "beatsPassword123"
}

$deployment = New-AzureRmResourceGroupDeployment -ResourceGroupName "<name>" `
  -TemplateUri "$templateBaseUri/$templateVersion/src/mainTemplate.json" `
  -TemplateParameterObject $parameters