This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path to file | |
$fileName = "C:\tmp\mycert.pfx" | |
# get content of the file as Byte | |
$fileContentBytes = get-content $fileName -Encoding Byte | |
# convert to Base64 | |
$fileContentEncoded = [System.Convert]::ToBase64String($fileContentBytes) | |
# convert to secure string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "[variables('HostName')]", | |
"type": "Microsoft.Compute/virtualMachines", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-04-30-preview", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('uniquestring'),'HostNicName'))]" | |
], | |
"tags": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"networkProfile": { | |
"networkInterfaces": [ | |
{ | |
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('HostNic'))]" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "HostNic", | |
"type": "Microsoft.Network/networkInterfaces", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2015-06-15", | |
"dependsOn": [ | |
"[variables('VnetID')]" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"storageProfile": { | |
"imageReference": { | |
"id": "[parameters('ImageReferenceId')]" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"osProfile": { | |
"computerName": "[variables('HostName')]", | |
"adminUsername": "[parameters('HostAdminUsername')]", | |
"linuxConfiguration": { | |
"disablePasswordAuthentication": true, | |
"ssh": { | |
"publicKeys": [ | |
{ | |
"path": "[concat('/home/',parameters('HostAdminUsername'),'/.ssh/authorized_keys')]", | |
"keyData": "[parameters('SSHPublicKey')]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Host" : { | |
"Type" : "AWS::EC2::Instance", | |
"Properties" : { | |
"InstanceType" : "m4.xlarge" , | |
"KeyName" : "td-eu-west-1" , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "2016-03-30", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "VMSecurityGroup", | |
"location": "[resourceGroup().location]", | |
"tags": { | |
"displayName": "VMSecurityGroup" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"VMSecurityGroup" : { | |
"Type" : "AWS::EC2::SecurityGroup", | |
"Properties" : { | |
"GroupDescription" : "Enable access to the host", | |
"VpcId" : { "Ref" : "VPC" }, | |
"SecurityGroupIngress" : [ | |
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "SourceSecurityGroupId" : { "Ref" : "TestDriveLBSecurityGroup" } } | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "2016-03-30", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "LBSecurityGroup", | |
"location": "[resourceGroup().location]", | |
"tags": { | |
"displayName": "LBSecurityGroup" | |
}, |