Last active
August 26, 2017 14:34
-
-
Save janakiramm/78a7af86ba6b8a71b15a86746a0082a0 to your computer and use it in GitHub Desktop.
ARM Template to Deploy ACI Container
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"variables": { | |
"containerName": "", | |
"containerImage": "", | |
"imageRegistryLoginServer":"", | |
"imageRegistryUsername":"", | |
"imageRegistryPassword":"", | |
"dbConnectionString" : "" | |
}, | |
"resources": [ | |
{ | |
"name": "todo", | |
"type": "Microsoft.ContainerInstance/containerGroups", | |
"apiVersion": "2017-08-01-preview", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"containers": [ | |
{ | |
"name": "[variables('containerName')]", | |
"properties": { | |
"image": "[variables('containerImage')]", | |
"environmentVariables": [ | |
{ "name": "DB", "value":"[variables('dbConnectionString')]" }, | |
{ "name": "PORT", "value":"80"} | |
], | |
"resources":{ | |
"requests": { | |
"cpu": 1, | |
"memoryInGb": 1.5 | |
} | |
}, | |
"ports": [ | |
{ | |
"port": 80 | |
} | |
] | |
} | |
}, | |
], | |
"osType": "Linux", | |
"imageRegistryCredentials": [{ | |
"server": "[variables('imageRegistryLoginServer')]", | |
"username": "[variables('imageRegistryUsername')]", | |
"password": "[variables('imageRegistryPassword')]" | |
}], | |
"ipAddress": { | |
"type": "Public", | |
"ports": [ | |
{ | |
"protocol": "tcp", | |
"port": "80" | |
} | |
] | |
} | |
} | |
} | |
], | |
"outputs": { | |
"containerIPv4Address": { | |
"type": "string", | |
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', 'todoGroup')).ipAddress.ip]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment