Update per PR and MSI fixes
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
"artifactsBaseUrl": "",
|
||||
"description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated."
|
||||
},
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/terraform/vm-linux-terraform",
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/terraform/master/solution_template/vm-linux-terraform",
|
||||
"type": "string"
|
||||
},
|
||||
"artifactsLocationSasToken": {
|
||||
@ -50,34 +50,6 @@
|
||||
"type": "string",
|
||||
"defaultValue": "[resourceGroup().location]"
|
||||
},
|
||||
"storageAccountType": {
|
||||
"defaultValue": "Standard_LRS",
|
||||
"metadata": {
|
||||
"description": "Storage Account Type"
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"principalId":{
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The Service Principal Id"
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"spSecret":{
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The Service Principal secret"
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"spType":{
|
||||
"defaultValue": "msi",
|
||||
"metadata": {
|
||||
"description": "The type of service principal injected into Terraform (can be 'msi' or 'manual')."
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"vmName": {
|
||||
"metadata": {
|
||||
"description": "Virtual Machine Name (also used as a prefix for other resources)"
|
||||
@ -126,7 +98,7 @@
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('infraStorageAccountName')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"sku": {
|
||||
"name": "Standard_LRS"
|
||||
},
|
||||
@ -137,7 +109,7 @@
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('stateStorageAccountName')]",
|
||||
"apiVersion": "2017-10-01",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"sku": {
|
||||
"name": "Standard_LRS"
|
||||
},
|
||||
@ -148,7 +120,7 @@
|
||||
"apiVersion": "2017-11-01",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
@ -160,7 +132,7 @@
|
||||
"apiVersion": "2017-11-01",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
@ -181,7 +153,7 @@
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"apiVersion": "2017-11-01",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
@ -218,7 +190,7 @@
|
||||
"apiVersion": "2017-11-01",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
@ -247,7 +219,7 @@
|
||||
"apiVersion": "2017-12-01",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"identity": {
|
||||
"type": "SystemAssigned"
|
||||
},
|
||||
@ -265,7 +237,7 @@
|
||||
"imageReference": {
|
||||
"publisher": "Canonical",
|
||||
"offer": "UbuntuServer",
|
||||
"sku": "17.10",
|
||||
"sku": "16.04-LTS",
|
||||
"version": "latest"
|
||||
}
|
||||
},
|
||||
@ -288,7 +260,7 @@
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/MSILinuxExtension')]",
|
||||
"apiVersion": "2017-12-01",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
@ -320,7 +292,7 @@
|
||||
"name": "[concat(parameters('vmName'),'/customscriptextension')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"apiVersion": "2017-03-30",
|
||||
"location": "[resourceGroup().location]",
|
||||
"location": "[parameters('location')]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Authorization/roleAssignments', guid(resourceGroup().id))]"
|
||||
],
|
||||
@ -333,12 +305,11 @@
|
||||
"fileUris": [
|
||||
"[concat(parameters('artifactsLocation'), '/scripts/infra.sh', parameters('artifactsLocationSasToken'))]",
|
||||
"[concat(parameters('artifactsLocation'), '/scripts/install.sh', parameters('artifactsLocationSasToken'))]",
|
||||
"[concat(parameters('artifactsLocation'), '/scripts/desktop.sh', parameters('artifactsLocationSasToken'))]",
|
||||
"[concat(parameters('artifactsLocation'), '/scripts/azureProviderAndCreds.tf', parameters('artifactsLocationSasToken'))]"
|
||||
]
|
||||
},
|
||||
"protectedSettings": {
|
||||
"commandToExecute": "[concat('bash infra.sh && bash install.sh ', variables('installParm1'), variables('installParm2'), variables('installParm3'), ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('stateStorageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value, ' -l ', reference(concat(resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName')),'/providers/Microsoft.ManagedIdentity/Identities/default'),'2015-08-31-PREVIEW').principalId)]"
|
||||
"commandToExecute": "[concat('bash infra.sh && bash install.sh ', variables('installParm1'), variables('installParm2'), variables('installParm3'), ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('stateStorageAccountName')), '2017-10-01').keys[0].value, ' -l ', reference(concat(resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName')),'/providers/Microsoft.ManagedIdentity/Identities/default'),'2015-08-31-PREVIEW').principalId)]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user