Skip to content

Commit

Permalink
create a deploymentScript resource to do pre-entitlement check
Browse files Browse the repository at this point in the history
Signed-off-by: Jianguo Ma <[email protected]>
  • Loading branch information
majguo committed Sep 26, 2021
1 parent e4d7423 commit 9d1ccc7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<test.parameters>-TestParameter '@{&quot;PasswordMinLength&quot;=6}'</test.parameters>
<azure.apiVersion>2020-06-01</azure.apiVersion>
<azure.apiVersion2>2019-06-01</azure.apiVersion2>
<azure.apiVersion.deploymentScript>2020-10-01</azure.apiVersion.deploymentScript>
<customer.usage.attribution.id>pid-fb16aee1-039d-45dc-a476-806224793a6c-partnercenter</customer.usage.attribution.id>
<cluster.start>c2efe274-0dc2-50f3-b51f-338a3fe01afb</cluster.start>
<cluster.end>9c5dbfce-a6b9-5659-96bc-ca0cf429122a</cluster.end>
Expand Down
37 changes: 37 additions & 0 deletions src/main/arm/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
"name_share": "wasshare",
"name_storageAccount": "[concat('storage',take(replace(parameters('guidValue'),'-',''),6))]",
"name_virtualNetwork": "[concat(variables('const_dnsLabelPrefix'), '-vnet')]",
"name_deploymentScript": "[concat('script', take(replace(parameters('guidValue'), '-', ''), 6))]",
"ref_deploymentScript": "[resourceId('Microsoft.Resources/deploymentScripts', variables('name_deploymentScript'))]",
"ref_fileService": "[resourceId('Microsoft.Storage/storageAccounts/fileServices', variables('name_storageAccount'), 'default')]",
"ref_fileShare": "[resourceId('Microsoft.Storage/storageAccounts/fileServices/shares', variables('name_storageAccount'), 'default', variables('name_share'))]",
"ref_ihsPublicIPAddress": "[resourceId('Microsoft.Network/publicIPAddresses', variables('name_ihsPublicIPAddress'))]",
Expand Down Expand Up @@ -257,11 +259,37 @@
}
}
},
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "${azure.apiVersion.deploymentScript}",
"name": "[variables('name_deploymentScript')]",
"location": "[parameters('location')]",
"kind": "AzureCLI",
"properties": {
"AzCliVersion": "2.15.0",
"environmentVariables": [
{
"name": "IBM_USER_ID",
"value": "[parameters('ibmUserId')]"
},
{
"name": "IBM_USER_PWD",
"secureValue": "[parameters('ibmUserPwd')]"
}
],
"primaryScriptUri": "[uri(variables('const_scriptLocation'), concat('was-check.sh', parameters('_artifactsLocationSasToken')))]",
"cleanupPreference": "OnSuccess",
"retentionInterval": "P1D"
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "${azure.apiVersion2}",
"name": "[variables('name_storageAccount')]",
"location": "[parameters('location')]",
"dependsOn": [
"[variables('ref_deploymentScript')]"
],
"sku": {
"name": "Standard_LRS"
},
Expand Down Expand Up @@ -298,6 +326,9 @@
"apiVersion": "${azure.apiVersion}",
"name": "[variables('name_networkSecurityGroup')]",
"location": "[parameters('location')]",
"dependsOn": [
"[variables('ref_deploymentScript')]"
],
"properties": {
"securityRules": [
{
Expand Down Expand Up @@ -360,6 +391,9 @@
"apiVersion": "${azure.apiVersion}",
"name": "[variables('name_publicIPAddress')]",
"location": "[parameters('location')]",
"dependsOn": [
"[variables('ref_deploymentScript')]"
],
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
Expand Down Expand Up @@ -574,6 +608,9 @@
"apiVersion": "${azure.apiVersion}",
"name": "[variables('name_ihsPublicIPAddress')]",
"location": "[parameters('location')]",
"dependsOn": [
"[variables('ref_deploymentScript')]"
],
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
Expand Down

0 comments on commit 9d1ccc7

Please sign in to comment.