I've created an Azure Typescript project which cur...
# general
w
I've created an Azure Typescript project which currently creates a single VM. I'm now trying to add DSC configuration but I'm starting to get stuck. I have a zipped Powershell script in a GitHub repo and I have had a look at the documentation, but I can't figure out how to reference the zip file URL and configuration function like you would in an ARM template. Can anyone help or are there any examples I could take a look at?
w
Do you have an ARM snippet of what you are trying to accomplish for reference?
w
I think I was using the wrong thing. The script is to install IIS via DSC so after doing the same thing in the Azure portal, I have switched to using
azure.compute.Extension
. However, I have a new error. The code I'm using is: const contosoWebsite = new azure.compute.Extension("ContosoWebsite", { location: resourceGroup.location, publisher: "Microsoft.Powershell", resourceGroupName: resourceGroup.name, settings:
Copy code
{
  "modulesUrl": "<https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-iis-server-windows-vm/ContosoWebsite.ps1.zip>",
  "configurationFunction": "ContosoWebsite.ps1\\\\ContosoWebsite"
}
, type: "DSC", typeHandlerVersion: "2.19", virtualMachineName: vm.name, });` The error is "Error downloading https://github.com........Could not create SSL/TLS secure channel" If I do the same thing through the Azure portal, it works. If I remote to the VM, and browser to the URL with IE (I know), it says it is not trusted. Am I missing something obvious?
The ARM template via the portal is: { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.19", "autoUpgradeMinorVersion": true, "settings": { "ModulesUrl": "https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-iis-server-windows-vm/ContosoWebsite.ps1.zip", "ConfigurationFunction": "ContosoWebsite.ps1\\ContosoWebsite", "Properties": { "MachineName": "[parameters('vmName')]" } }, "protectedSettings": null }