Last active
August 18, 2017 09:10
-
-
Save cdennig/008aa08cb4b513ce15172a45cd82e838 to your computer and use it in GitHub Desktop.
Azure Storage Account plus CDN
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('storageName')]", | |
"type": "Microsoft.Storage/storageAccounts", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-01-01", | |
"sku": { | |
"name": "Standard_LRS", | |
"tier": "Standard" | |
}, | |
"kind": "BlobStorage", | |
"dependsOn": [], | |
"tags": { | |
"displayName": "Storage Blobs / CDN backend" | |
}, | |
"properties": { | |
"accessTier": "Hot" | |
} | |
}, | |
{ | |
"name": "[variables('profileName')]", | |
"type": "Microsoft.Cdn/profiles", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-04-02", | |
"tags": { | |
"displayName": "CDN" | |
}, | |
"sku": { | |
"name": "Standard_Akamai" | |
}, | |
"properties": {}, | |
"resources": [{ | |
"apiVersion": "2016-04-02", | |
"name": "[variables('endpointName')]", | |
"type": "endpoints", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Cdn/profiles/', variables('profileName'))]", | |
"[resourceId('Microsoft.Storage/storageAccounts/', variables('storageName'))]" | |
], | |
"location": "[resourceGroup().location]", | |
"tags": { | |
"displayName": "CDN Endpoint" | |
}, | |
"properties": { | |
"originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts',variables('storageName')),'2015-06-15').primaryEndpoints.blob,'https://',''),'/','')]", | |
"isHttpAllowed": true, | |
"isHttpsAllowed": true, | |
"queryStringCachingBehavior": "IgnoreQueryString", | |
"contentTypesToCompress": ["text/plain", "text/html", "text/css", "application/x-javascript", "text/javascript"], | |
"isCompressionEnabled": true, | |
"origins": [{ | |
"name": "origin1", | |
"properties": { | |
"hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts',variables('storageName')),'2015-06-15').primaryEndpoints.blob,'https://',''),'/','')]" | |
} | |
}] | |
} | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment