github.com/brandonstevens/terraform@v0.9.6-0.20170512224929-5367f2607e16/examples/azure-cdn-with-storage-account/main.tf (about) 1 # provider "azurerm" { 2 # subscription_id = "REPLACE-WITH-YOUR-SUBSCRIPTION-ID" 3 # client_id = "REPLACE-WITH-YOUR-CLIENT-ID" 4 # client_secret = "REPLACE-WITH-YOUR-CLIENT-SECRET" 5 # tenant_id = "REPLACE-WITH-YOUR-TENANT-ID" 6 # } 7 8 resource "azurerm_resource_group" "rg" { 9 name = "${var.resource_group}" 10 location = "${var.location}" 11 } 12 13 resource "azurerm_storage_account" "stor" { 14 name = "${var.resource_group}stor" 15 location = "${var.location}" 16 resource_group_name = "${azurerm_resource_group.rg.name}" 17 account_type = "${var.storage_account_type}" 18 } 19 20 resource "azurerm_cdn_profile" "cdn" { 21 name = "${var.resource_group}CdnProfile1" 22 location = "${var.location}" 23 resource_group_name = "${azurerm_resource_group.rg.name}" 24 sku = "Standard_Akamai" 25 } 26 27 resource "azurerm_cdn_endpoint" "cdnendpt" { 28 name = "${var.resource_group}CdnEndpoint1" 29 profile_name = "${azurerm_cdn_profile.cdn.name}" 30 location = "${var.location}" 31 resource_group_name = "${azurerm_resource_group.rg.name}" 32 33 origin { 34 name = "${var.resource_group}Origin1" 35 host_name = "${var.host_name}" 36 http_port = 80 37 https_port = 443 38 } 39 }