Skip to content

Instantly share code, notes, and snippets.

@dcolebatch
Created April 4, 2018 02:35
Show Gist options
  • Save dcolebatch/914641c86e32f432d8405ac4c6095460 to your computer and use it in GitHub Desktop.
Save dcolebatch/914641c86e32f432d8405ac4c6095460 to your computer and use it in GitHub Desktop.
Snippet of Terraform for Azure Container Instance configuration
resource "azurerm_container_group" "aci-api" {
name = "aci-api"
location = "${azurerm_resource_group.serverless.location}"
resource_group_name = "${azurerm_resource_group.serverless.name}"
ip_address_type = "public"
os_type = "linux"
container {
name = "meow"
image = "dcolebatch/random-cats"
cpu ="0.5"
memory = "0.5"
port = "80"
environment_variables {
"NODE_ENV" = "production"
}
volume {
name = "logs"
mount_path = "/aci/logs"
read_only = false
share_name = "${azurerm_storage_share.aci-share.name}"
storage_account_name = "${azurerm_storage_account.aci-sa.name}"
storage_account_key = "${azurerm_storage_account.aci-sa.primary_access_key}"
}
}
tags {
environment = "Serverless Example"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment