Description
stringlengths 19
200
| IaC
stringlengths 159
7.6k
|
---|---|
This template creates an Azure Cosmos DB account for MongoDB API (3.2, 3.6 and 4.0) in two regions using shared database throughput with two collections. | {"type": "microsoft.documentdb/databaseaccounts", "apiversion": "2021-04-15", "name": "[variables('accountname_var')]", "location": "[parameters('location')]", "kind": "mongodb", "properties": {"consistencypolicy": "[variables('consistencypolicy')[parameters('defaultconsistencylevel')]]", "locations": "[variables('locations')]", "databaseaccountoffertype": "standard", "apiproperties": {"serverversion": "[parameters('serverversion')]"}}}{"type": "microsoft.documentdb/databaseaccounts/mongodbdatabases", "apiversion": "2021-04-15", "name": "[format('{0}/{1}", variables('accountname_var'), parameters('databasename'))]", "properties": {"resource": {"id": "[parameters('databasename')]"}, "options": {"throughput": "[parameters('throughput')]"}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", variables('accountname_var'))]"]}{"type": "microsoft.documentdb/databaseaccounts/mongodbdatabases/collections", "apiversion": "2021-04-15", "name": "[format('{0}/{1}", format('{0}/{1}", variables('accountname_var'), parameters('databasename')), parameters('collection1name'))]", "properties": {"resource": {"id": "[parameters('collection1name')]", "shardkey": {"user_id": "hash"}, "indexes": [{"key": {"keys": ["_id"]}}, {"key": {"keys": ["$**"]}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": true}}, {"key": {"keys": ["_ts"]}, "options": {"expireafterseconds": 2629746}}], "options": {"if-match": "<etag>"}}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts/mongodbdatabases", split(format('{0}/{1}", variables('accountname_var'), parameters('databasename')), "/')[0], split(format('{0}/{1}", variables('accountname_var'), parameters('databasename')), "/')[1])]"]}{"type": "microsoft.documentdb/databaseaccounts/mongodbdatabases/collections", "apiversion": "2021-04-15", "name": "[format('{0}/{1}", format('{0}/{1}", variables('accountname_var'), parameters('databasename')), parameters('collection2name'))]", "properties": {"resource": {"id": "[parameters('collection2name')]", "shardkey": {"company_id": "hash"}, "indexes": [{"key": {"keys": ["_id"]}}, {"key": {"keys": ["$**"]}}, {"key": {"keys": ["company_id", "company_address"]}, "options": {"unique": true}}, {"key": {"keys": ["_ts"]}, "options": {"expireafterseconds": 2629746}}], "options": {"if-match": "<etag>"}}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts/mongodbdatabases", split(format('{0}/{1}", variables('accountname_var'), parameters('databasename')), "/')[0], split(format('{0}/{1}", variables('accountname_var'), parameters('databasename')), "/')[1])]"]} |
This template creates an Azure Cosmos DB account for Cassandra API in two regions with a keyspace and table with autoscale throughput. | {"type": "microsoft.documentdb/databaseaccounts", "apiversion": "2021-04-15", "name": "[variables('accountname_var')]", "location": "[parameters('location')]", "kind": "globaldocumentdb", "properties": {"capabilities": [{"name": "enablecassandra"}], "consistencypolicy": "[variables('consistencypolicy')[parameters('defaultconsistencylevel')]]", "locations": "[variables('locations')]", "databaseaccountoffertype": "standard", "enableautomaticfailover": "[parameters('automaticfailover')]"}}{"type": "microsoft.documentdb/databaseaccounts/cassandrakeyspaces", "apiversion": "2021-04-15", "name": "[format('{0}/{1}", variables('accountname_var'), parameters('keyspacename'))]", "properties": {"resource": {"id": "[parameters('keyspacename')]"}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", variables('accountname_var'))]"]}{"type": "microsoft.documentdb/databaseaccounts/cassandrakeyspaces/tables", "apiversion": "2021-04-15", "name": "[format('{0}/{1}", format('{0}/{1}", variables('accountname_var'), parameters('keyspacename')), parameters('tablename'))]", "properties": {"resource": {"id": "[parameters('tablename')]", "schema": {"columns": [{"name": "loadid", "type": "uuid"}, {"name": "machine", "type": "uuid"}, {"name": "cpu", "type": "int"}, {"name": "mtime", "type": "int"}, {"name": "load", "type": "float"}], "partitionkeys": [{"name": "machine"}, {"name": "cpu"}, {"name": "mtime"}], "clusterkeys": [{"name": "loadid", "orderby": "asc"}]}}, "options": {"autoscalesettings": {"maxthroughput": "[parameters('autoscalemaxthroughput')]"}}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts/cassandrakeyspaces", split(format('{0}/{1}", variables('accountname_var'), parameters('keyspacename')), "/')[0], split(format('{0}/{1}", variables('accountname_var'), parameters('keyspacename')), "/')[1])]"]} |
Deploy a simple Azure Spring Cloud microservice application | {"type": "microsoft.appplatform/spring", "apiversion": "2020-07-01", "name": "[parameters('servicename')]", "location": "[parameters('location')]", "sku": {"name": "s0", "tier": "standard"}, "properties": {"configserverproperties": {"configserver": {"gitproperty": {"uri": "https://github.com/azure-samples/piggymetrics-config"}}}}, "resources": [{"type": "apps", "apiversion": "2020-07-01", "name": "[parameters('app1')]", "properties": {"public": true}, "dependson": ["[parameters('servicename')]"], "resources": [{"type": "deployments", "apiversion": "2020-07-01", "name": "default", "dependson": ["[parameters('app1')]"], "properties": {"source": {"relativepath": "<default>", "type": "jar"}}}]}, {"type": "apps", "apiversion": "2020-07-01", "name": "[parameters('app2')]", "properties": {"public": true}, "dependson": ["[parameters('servicename')]"], "resources": [{"type": "deployments", "apiversion": "2020-07-01", "name": "default", "dependson": ["[parameters('app2')]"], "properties": {"source": {"relativepath": "<default>", "type": "jar"}}}]}, {"type": "apps", "apiversion": "2020-07-01", "name": "[parameters('app3')]", "properties": {"public": false}, "dependson": ["[parameters('servicename')]"], "resources": [{"type": "deployments", "apiversion": "2020-07-01", "name": "default", "dependson": ["[parameters('app3')]"], "properties": {"source": {"relativepath": "<default>", "type": "jar"}}}]}]} |
Creates a CDN Endpoint with rules engine and remote address based match and adds corresponding response headers. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('cdnsku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "deliverypolicy": {"description": "add response headers", "rules": [{"name": "geomatchcondition", "order": 1, "conditions": [{"name": "remoteaddress", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleremoteaddressconditionparameters", "operator": "geomatch", "matchvalues": ["us"]}}], "actions": [{"name": "modifyresponseheader", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleheaderactionparameters", "headeraction": "overwrite", "headername": "x-client-country", "value": "us"}}]}, {"name": "ipv4match", "order": 2, "conditions": [{"name": "remoteaddress", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleremoteaddressconditionparameters", "operator": "ipmatch", "matchvalues": ["0.0.0.0/0"]}}], "actions": [{"name": "modifyresponseheader", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleheaderactionparameters", "headeraction": "overwrite", "headername": "x-client-ip-version", "value": "ipv4"}}]}, {"name": "ipv6match", "order": 3, "conditions": [{"name": "remoteaddress", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleremoteaddressconditionparameters", "operator": "ipmatch", "matchvalues": ["::0/0"]}}], "actions": [{"name": "modifyresponseheader", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleheaderactionparameters", "headeraction": "overwrite", "headername": "x-client-ip-version", "value": "ipv6"}}]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
Creates a CDN WAF Policy managed rule set DefaultRuleSet_1.0 and a linked CDN Endpoint. | {"type": "microsoft.cdn/cdnwebapplicationfirewallpolicies", "apiversion": "2020-09-01", "name": "[parameters('policyname')]", "location": "global", "sku": {"name": "[parameters('cdnsku')]"}, "properties": {"policysettings": {"enabledstate": "enabled", "mode": "[parameters('policymode')]"}, "managedrules": {"managedrulesets": [{"rulesettype": "defaultruleset", "rulesetversion": "1.0"}]}}}{"name": "[parameters('profilename')]", "type": "microsoft.cdn/profiles", "location": "[parameters('location')]", "apiversion": "2019-06-15-preview", "sku": {"name": "[parameters('cdnsku')]"}, "resources": [{"apiversion": "2019-06-15-preview", "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]", "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"], "location": "[parameters('location')]", "name": "[parameters('endpointname')]", "type": "endpoints", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "webapplicationfirewallpolicylink": {"id": "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"}}}]} |
This template creates a Front Door Standard/Premium including a rule set. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('profilename')]", "location": "global", "sku": {"name": "[parameters('skuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), parameters('endpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('origingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('origingroupname'), variables('originname'))]", "properties": {"hostname": "[parameters('originhostname')]", "httpport": 80, "httpsport": 443, "originhostheader": "[parameters('originhostname')]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/rulesets", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('rulesetname'))]", "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/rulesets/rules", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('rulesetname'), variables('redirectsecuretraffictomicrosoftrulename'))]", "properties": {"order": 1, "conditions": [{"name": "urlpath", "parameters": {"operator": "beginswith", "negatecondition": false, "matchvalues": ["secure/"], "transforms": ["lowercase"], "typename": "deliveryruleurlpathmatchconditionparameters"}}], "actions": [{"name": "urlredirect", "parameters": {"redirecttype": "temporaryredirect", "destinationprotocol": "https", "customhostname": "microsoft.com", "custompath": "/", "typename": "deliveryruleurlredirectactionparameters"}}]}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.cdn/profiles/rulesets", variables('profilename'), variables('rulesetname'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), parameters('endpointname'), variables('routename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]"}, "rulesets": [{"id": "[resourceid('microsoft.cdn/profiles/rulesets", variables('profilename'), variables('rulesetname'))]"}], "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('profilename'), variables('origingroupname'), variables('originname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.cdn/profiles/rulesets", variables('profilename'), variables('rulesetname'))]"]} |
This template creates a Front Door Standard/Premium including a web application firewall with a custom rule. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('profilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), parameters('endpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('origingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('origingroupname'), variables('originname'))]", "properties": {"hostname": "[parameters('originhostname')]", "httpport": 80, "httpsport": 443, "originhostheader": "[parameters('originhostname')]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), parameters('endpointname'), variables('routename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('profilename'), variables('origingroupname'), variables('originname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/securitypolicies", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('securitypolicyname'))]", "properties": {"parameters": {"type": "webapplicationfirewall", "wafpolicy": {"id": "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"}, "associations": [{"domains": [{"id": "[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]"}], "patternstomatch": ["/*"]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"]} |
Create a CDN Profile, a CDN Endpoint with a user defined origin and recommended settings. This template also configures rules engine device based path rewrite and request scheme based redirect. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('cdnsku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "deliverypolicy": {"description": "rewrite and redirect", "rules": [{"name": "pathrewritebasedondevicematchcondition", "order": 1, "conditions": [{"name": "isdevice", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleisdeviceconditionparameters", "operator": "equal", "matchvalues": ["mobile"]}}], "actions": [{"name": "urlrewrite", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlrewriteactionparameters", "sourcepattern": "/standard", "destination": "/mobile"}}]}, {"name": "httpversionbasedredirect", "order": 2, "conditions": [{"name": "requestscheme", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryrulerequestschemeconditionparameters", "operator": "equal", "matchvalues": ["http"]}}], "actions": [{"name": "urlredirect", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlredirectactionparameters", "redirecttype": "found", "destinationprotocol": "https"}}]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
Create a CDN Profile, a CDN Endpoint with a user defined origin and recommended settings. This template also configures rules engine UrlSigning action. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('cdnsku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "ishttpallowed": true, "ishttpsallowed": true, "querystringcachingbehavior": "usequerystring", "contenttypestocompress": ["text/plain", "text/html", "text/css", "application/x-javascript", "text/javascript"], "iscompressionenabled": true, "origins": [{"name": "origin1", "properties": {"hostname": "[parameters('originurl')]"}}], "urlsigningkeys": [{"keyid": "key1", "keysourceparameters": {"@odata.type": "#microsoft.azure.cdn.models.keyvaultsigningkeyparameters", "subscriptionid": "[parameters('urlsigningkeyssubid')]", "resourcegroupname": "[parameters('urlsigningkeysresourcegroup')]", "vaultname": "[parameters('urlsigningkeysvaultname')]", "secretname": "[parameters('urlsigningkeyssecret1name')]", "secretversion": "[parameters('urlsigningkeyssecret1version')]"}}, {"keyid": "key2", "keysourceparameters": {"@odata.type": "#microsoft.azure.cdn.models.keyvaultsigningkeyparameters", "subscriptionid": "[parameters('urlsigningkeyssubid')]", "resourcegroupname": "[parameters('urlsigningkeysresourcegroup')]", "vaultname": "[parameters('urlsigningkeysvaultname')]", "secretname": "[parameters('urlsigningkeyssecret2name')]", "secretversion": "[parameters('urlsigningkeyssecret2version')]"}}], "deliverypolicy": {"description": "urlsigning", "rules": [{"name": "rule1", "order": 1, "conditions": [{"name": "urlpath", "parameters": {"operator": "equal", "matchvalues": ["/urlsigning/test"], "@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlpathmatchconditionparameters"}}], "actions": [{"name": "urlsigning", "parameters": {"keyid": "key1", "algorithm": "sha256", "@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlsigningactionparameters"}}, {"name": "cachekeyquerystring", "parameters": {"querystringbehavior": "exclude", "queryparameters": "expires,keyid,signature", "@odata.type": "#microsoft.azure.cdn.models.deliveryrulecachekeyquerystringbehavioractionparameters"}}]}, {"name": "rule2", "order": 2, "conditions": [{"name": "urlpath", "parameters": {"operator": "equal", "matchvalues": ["/urlsigning/test2"], "@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlpathmatchconditionparameters"}}], "actions": [{"name": "urlsigning", "parameters": {"keyid": "key2", "algorithm": "sha256", "parameternameoverride": [{"paramindicator": "expires", "paramname": "oexpires"}, {"paramindicator": "keyid", "paramname": "okeyid"}, {"paramindicator": "signature", "paramname": "osignature"}], "@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlsigningactionparameters"}}, {"name": "cachekeyquerystring", "parameters": {"querystringbehavior": "exclude", "queryparameters": "oexpires,okeyid,osignature", "@odata.type": "#microsoft.azure.cdn.models.deliveryrulecachekeyquerystringbehavioractionparameters"}}]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
Create a CDN Profile, a CDN Endpoint with a user defined origin and recommended settings. This template also configures rules engine with a path based rule and overrides cache expiration. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('cdnsku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "deliverypolicy": {"description": "path based cache override", "rules": [{"name": "pathmatchcondition", "order": 1, "conditions": [{"name": "urlpath", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryruleurlpathmatchconditionparameters", "operator": "beginswith", "matchvalues": ["/images/"]}}], "actions": [{"name": "cacheexpiration", "parameters": {"@odata.type": "#microsoft.azure.cdn.models.deliveryrulecacheexpirationactionparameters", "cachebehavior": "override", "cachetype": "all", "cacheduration": "00:00:30"}}]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
This template creates a Front Door Standard/Premium, an Azure Functions app, and configures the function app to validate that traffic has come through the Front Door origin. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[variables('frontdoorprofilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "properties": {"hostname": "[reference(resourceid('microsoft.resources/deployments", "functionapp')).outputs.functionapphostname.value]", "httpport": 80, "httpsport": 443, "originhostheader": "[reference(resourceid('microsoft.resources/deployments", "functionapp')).outputs.functionapphostname.value]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]", "[resourceid('microsoft.resources/deployments", "functionapp')]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'), variables('frontdoorroutename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
Creates a CDN WAF Policy with example rate limit rules and a linked CDN Endpoint. | {"type": "microsoft.cdn/cdnwebapplicationfirewallpolicies", "apiversion": "2020-09-01", "name": "[parameters('policyname')]", "location": "global", "sku": {"name": "[parameters('cdnsku')]"}, "properties": {"policysettings": {"enabledstate": "[parameters('enabledstate')]", "mode": "[parameters('policymode')]", "defaultredirecturl": "[parameters('redirecturl')]"}, "ratelimitrules": {"rules": [{"name": "baselimit", "priority": 100, "enabledstate": "enabled", "ratelimitthreshold": 1000, "ratelimitdurationinminutes": 1, "matchconditions": [{"matchvariable": "requestmethod", "operator": "any", "negatecondition": false}], "action": "block"}, {"name": "writelimit", "priority": 50, "enabledstate": "enabled", "ratelimitthreshold": 100, "ratelimitdurationinminutes": 1, "matchconditions": [{"matchvariable": "requestmethod", "operator": "equal", "negatecondition": false, "matchvalue": ["post", "put", "patch"]}], "action": "redirect"}]}}}{"name": "[parameters('profilename')]", "type": "microsoft.cdn/profiles", "location": "[parameters('location')]", "apiversion": "2019-06-15-preview", "sku": {"name": "[parameters('cdnsku')]"}, "resources": [{"apiversion": "2019-06-15-preview", "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]", "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"], "location": "[parameters('location')]", "name": "[parameters('endpointname')]", "type": "endpoints", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "webapplicationfirewallpolicylink": {"id": "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"}}}]} |
This template creates a Front Door Standard/Premium. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[variables('profilename')]", "location": "global", "sku": {"name": "[parameters('skuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), parameters('endpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('origingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('origingroupname'), variables('originname'))]", "properties": {"hostname": "[parameters('originhostname')]", "httpport": 80, "httpsport": 443, "originhostheader": "[parameters('originhostname')]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), parameters('endpointname'), variables('routename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('profilename'), variables('origingroupname'), variables('originname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]} |
Create a CDN Profile and a CDN Endpoint with a Storage Account as origin | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[variables('profilename')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('profilename')]"}, "sku": {"name": "standard_verizon"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", variables('profilename'), variables('endpointname'))]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('endpointname')]"}, "properties": {"originhostheader": "[replace(replace(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))).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('storageaccountname'))).primaryendpoints.blob, "https://", "'), "/", "')]"}}]}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]} |
This template creates a Front Door Standard/Premium including a web application firewall with a rate limit rule. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('profilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), parameters('endpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('origingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('origingroupname'), variables('originname'))]", "properties": {"hostname": "[parameters('originhostname')]", "httpport": 80, "httpsport": 443, "originhostheader": "[parameters('originhostname')]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), parameters('endpointname'), variables('routename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('profilename'), variables('origingroupname'), variables('originname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/securitypolicies", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('securitypolicyname'))]", "properties": {"parameters": {"type": "webapplicationfirewall", "wafpolicy": {"id": "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"}, "associations": [{"domains": [{"id": "[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]"}], "patternstomatch": ["/*"]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"]} |
Create a CDN Profile and a CDN Endpoint | {"type": "microsoft.cdn/profiles", "apiversion": "2020-09-01", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "properties": {}, "sku": {"name": "[parameters('sku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-09-01", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "ishttpallowed": "[parameters('ishttpallowed')]", "ishttpsallowed": "[parameters('ishttpsallowed')]", "querystringcachingbehavior": "[parameters('querystringcachingbehavior')]", "contenttypestocompress": "[parameters('contenttypestocompress')]", "iscompressionenabled": "[parameters('iscompressionenabled')]", "origins": [{"name": "origin1", "properties": {"hostname": "[parameters('originurl')]"}}]}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
This template creates a Front Door Standard/Premium with a container group and Application Gateway. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('frontdoorprofilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "properties": {"hostname": "[reference(resourceid('microsoft.resources/deployments", "application-gateway')).outputs.publicipaddresshostname.value]", "httpport": 80, "httpsport": 443, "originhostheader": "[reference(resourceid('microsoft.resources/deployments", "application-gateway')).outputs.publicipaddresshostname.value]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.resources/deployments", "application-gateway')]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'), variables('frontdoorroutename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httponly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
This template creates a Front Door Standard/Premium, an App Service, and configures the App Service to validate that traffic has come through the Front Door origin. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('frontdoorprofilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "properties": {"hostname": "[reference(resourceid('microsoft.web/sites", parameters('appname'))).defaulthostname]", "httpport": 80, "httpsport": 443, "originhostheader": "[reference(resourceid('microsoft.web/sites", parameters('appname'))).defaulthostname]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.web/sites", parameters('appname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'), variables('frontdoorroutename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
This template creates a Front Door Standard/Premium with a container group. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('frontdoorprofilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "properties": {"hostname": "[reference(resourceid('microsoft.containerinstance/containergroups", variables('containergroupname'))).ipaddress.fqdn]", "httpport": 80, "httpsport": 443, "originhostheader": "[reference(resourceid('microsoft.containerinstance/containergroups", variables('containergroupname'))).ipaddress.fqdn]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.containerinstance/containergroups", variables('containergroupname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'), variables('frontdoorroutename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httponly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
Create a CDN Profile, a CDN Endpoint with a user defined origin and recommended settings. | {"type": "microsoft.cdn/profiles", "apiversion": "2020-04-15", "name": "[parameters('profilename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('cdnsku')]"}}{"type": "microsoft.cdn/profiles/endpoints", "apiversion": "2020-04-15", "name": "[format('{0}/{1}", parameters('profilename'), parameters('endpointname'))]", "location": "[parameters('location')]", "properties": {"originhostheader": "[parameters('originurl')]", "ishttpallowed": true, "ishttpsallowed": true, "querystringcachingbehavior": "ignorequerystring", "contenttypestocompress": ["application/eot", "application/font", "application/font-sfnt", "application/javascript", "application/json", "application/opentype", "application/otf", "application/pkcs7-mime", "application/truetype", "application/ttf", "application/vnd.ms-fontobject", "application/xhtml+xml", "application/xml", "application/xml+rss", "application/x-font-opentype", "application/x-font-truetype", "application/x-font-ttf", "application/x-httpd-cgi", "application/x-javascript", "application/x-mpegurl", "application/x-opentype", "application/x-otf", "application/x-perl", "application/x-ttf", "font/eot", "font/ttf", "font/otf", "font/opentype", "image/svg+xml", "text/css", "text/csv", "text/html", "text/javascript", "text/js", "text/plain", "text/richtext", "text/tab-separated-values", "text/xml", "text/x-script", "text/x-component", "text/x-java-source"], "iscompressionenabled": true, "origins": [{"name": "origin1", "properties": {"hostname": "[parameters('originurl')]"}}]}, "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]"]} |
This template creates a Front Door Standard/Premium and an Application Gateway instance, and uses an NSG and WAF policy to validate that traffic has come through the Front Door origin. | {"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('frontdoorprofilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "properties": {"hostname": "[reference(resourceid('microsoft.resources/deployments", "application-gateway')).outputs.publicipaddresshostname.value]", "httpport": 80, "httpsport": 443, "originhostheader": "[reference(resourceid('microsoft.resources/deployments", "application-gateway')).outputs.publicipaddresshostname.value]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.resources/deployments", "application-gateway')]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('frontdoorprofilename'), parameters('frontdoorendpointname'), variables('frontdoorroutename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "[variables('frontdoortoapplicationgatewayprotocol')]", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('frontdoorprofilename'), parameters('frontdoorendpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('frontdoorprofilename'), variables('frontdoororigingroupname'), variables('frontdoororiginname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('frontdoorprofilename'), variables('frontdoororigingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
Creates a CDN WAF Policy with example custom rules and a linked CDN Endpoint. | {"type": "microsoft.cdn/cdnwebapplicationfirewallpolicies", "apiversion": "2020-09-01", "name": "[parameters('policyname')]", "location": "global", "sku": {"name": "[parameters('cdnsku')]"}, "properties": {"policysettings": {"enabledstate": "[parameters('enabledstate')]", "mode": "[parameters('policymode')]", "defaultredirecturl": "[parameters('redirecturl')]"}, "customrules": {"rules": [{"name": "blockoutsidenorthamerica", "priority": 10, "enabledstate": "enabled", "matchconditions": [{"matchvariable": "remoteaddr", "operator": "geomatch", "negatecondition": true, "matchvalue": ["us", "mx", "ca"]}], "action": "block"}, {"name": "redirectipmatch", "priority": 20, "enabledstate": "enabled", "matchconditions": [{"matchvariable": "remoteaddr", "operator": "ipmatch", "negatecondition": false, "matchvalue": ["1.0.0.0/8", "2.1.1.1", "ffff::/16"]}], "action": "redirect"}, {"name": "allowunauthenticatedlogin", "priority": 30, "enabledstate": "enabled", "matchconditions": [{"matchvariable": "requesturi", "operator": "contains", "negatecondition": false, "matchvalue": ["/login"]}], "action": "allow"}, {"name": "redirectunauthenticated", "priority": 40, "enabledstate": "enabled", "matchconditions": [{"matchvariable": "cookies", "selector": "sessionid", "transforms": ["trim"], "operator": "lessthanorequal", "negatecondition": false, "matchvalue": ["0"]}], "action": "redirect"}]}}}{"name": "[parameters('profilename')]", "type": "microsoft.cdn/profiles", "location": "[parameters('location')]", "apiversion": "2019-06-15-preview", "sku": {"name": "[parameters('cdnsku')]"}, "resources": [{"apiversion": "2019-06-15-preview", "dependson": ["[resourceid('microsoft.cdn/profiles", parameters('profilename'))]", "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"], "location": "[parameters('location')]", "name": "[parameters('endpointname')]", "type": "endpoints", "properties": {"originhostheader": "[parameters('originurl')]", "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": "[parameters('originurl')]"}}], "webapplicationfirewallpolicylink": {"id": "[resourceid('microsoft.cdn/cdnwebapplicationfirewallpolicies", parameters('policyname'))]"}}}]} |
This template demonstrates how to Create a instance of Azure API Management and configure custom hostname for proxy with ssl certificate from keyvault by passing an Azure Resource Id | {"apiversion": "2020-12-01", "name": "[variables('apimanagementservicename')]", "type": "microsoft.apimanagement/service", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]", "hostnameconfigurations": [{"type": "proxy", "hostname": "[concat(parameters('proxycustomhostname'))]", "encodedcertificate": "[parameters('proxycustomhostnamebase64encodedpfxcertificate')]", "certificatepassword": "[parameters('proxysslcertificatepassword')]", "negotiateclientcertificate": false}]}} |
This template demonstrates how to create a instance of Azure API Management with custom hostname for portal and multiple custom hostnames for proxy | {"apiversion": "2017-03-01", "name": "[variables('apimanagementservicename')]", "type": "microsoft.apimanagement/service", "location": "[parameters('location')]", "tags": {}, "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]", "hostnameconfigurations": [{"type": "proxy", "hostname": "[parameters('proxycustomhostname1')]", "encodedcertificate": "[parameters('proxycustomhostnamebase64encodedpfxcertificate1')]", "certificatepassword": "[parameters('proxysslcertificatepassword1')]", "negotiateclientcertificate": false}, {"type": "proxy", "hostname": "[parameters('proxycustomhostname2')]", "encodedcertificate": "[parameters('proxycustomhostnamebase64encodedpfxcertificate2')]", "certificatepassword": "[parameters('proxysslcertificatepassword2')]", "negotiateclientcertificate": false}, {"type": "portal", "hostname": "[parameters('portalcustomhostname')]", "encodedcertificate": "[parameters('portalcustomhostnamebase64encodedpfxcertificate')]", "certificatepassword": "[parameters('portalsslcertificatepassword')]", "negotiateclientcertificate": false}]}} |
Create an API Management service with a virtual network and a private endpoint | {"type": "microsoft.apimanagement/service", "apiversion": "2021-08-01", "name": "[parameters('apimanagementservicename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "identity": {"type": "systemassigned"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]"}} |
Create an API Management instance into Availability Zone and enable Managed Identity. | {"type": "microsoft.apimanagement/service", "apiversion": "2021-01-01-preview", "name": "[parameters('apimanagementservicename')]", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), parameters('availabilityzones'))]", "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "identity": {"type": "systemassigned"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]"}} |
Create an API Management service with SSL from KeyVault using User Assigned identity. | {"type": "microsoft.apimanagement/service", "apiversion": "2021-04-01-preview", "name": "[parameters('apimanagementservicename')]", "location": "[parameters('location')]", "identity": {"type": "userassigned", "userassignedidentities": {"[format('{0}", resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname')))]": {}}}, "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "properties": {"hostnameconfigurations": [{"type": "proxy", "hostname": "[parameters('gatewaycustomhostname')]", "keyvaultid": "[reference(resourceid('microsoft.keyvault/vaults/secrets", split(format('{0}/sslcert", parameters('keyvaultname')), "/')[0], split(format('{0}/sslcert", parameters('keyvaultname')), "/')[1])).secreturi]", "identityclientid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).clientid]", "defaultsslbinding": true}], "publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]", "customproperties": {"microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_ecdhe_ecdsa_with_aes_256_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_ecdhe_ecdsa_with_aes_128_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_ecdhe_rsa_with_aes_256_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_ecdhe_rsa_with_aes_128_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_rsa_with_aes_128_gcm_sha256": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_rsa_with_aes_256_cbc_sha256": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_rsa_with_aes_128_cbc_sha256": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_rsa_with_aes_256_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tls_rsa_with_aes_128_cbc_sha": "false", "microsoft.windowsazure.apimanagement.gateway.security.ciphers.tripledes168": "false", "microsoft.windowsazure.apimanagement.gateway.security.protocols.tls10": "false", "microsoft.windowsazure.apimanagement.gateway.security.protocols.tls11": "false", "microsoft.windowsazure.apimanagement.gateway.security.protocols.ssl30": "false", "microsoft.windowsazure.apimanagement.gateway.security.backend.protocols.tls10": "false", "microsoft.windowsazure.apimanagement.gateway.security.backend.protocols.tls11": "false", "microsoft.windowsazure.apimanagement.gateway.security.backend.protocols.ssl30": "false", "microsoft.windowsazure.apimanagement.gateway.protocols.server.http2": "true"}}, "dependson": ["[resourceid('microsoft.keyvault/vaults/secrets", split(format('{0}/sslcert", parameters('keyvaultname')), "/')[0], split(format('{0}/sslcert", parameters('keyvaultname')), "/')[1])]", "[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]} |
This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway. | {"type": "microsoft.apimanagement/service", "apiversion": "2020-12-01", "name": "[variables('apim-name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('apim-sku')]", "capacity": "[parameters('apim-capacity')]"}, "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]"], "resources": [{"type": "gateways", "apiversion": "2020-12-01", "name": "my-gateway", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"locationdata": {"name": "my internal location"}, "description": "self hosted gateway bringing api management to the edge"}}, {"type": "loggers", "apiversion": "2020-12-01", "name": "appinsightslogger", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"loggertype": "applicationinsights", "resourceid": "[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "credentials": {"instrumentationkey": "[reference(variables('app-insights-name')).instrumentationkey]"}}}, {"type": "diagnostics", "apiversion": "2020-12-01", "name": "applicationinsights", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]", "[resourceid('microsoft.apimanagement/service/loggers", variables('apim-name'), "appinsightslogger')]"], "properties": {"alwayslog": "allerrors", "httpcorrelationprotocol": "legacy", "verbosity": "information", "logclientip": true, "loggerid": "[resourceid('microsoft.apimanagement/service/loggers/", variables('apim-name'), "appinsightslogger')]", "sampling": {"samplingtype": "fixed", "percentage": 100}, "frontend": {"request": {"body": {"bytes": 0}}, "response": {"body": {"bytes": 0}}}, "backend": {"request": {"body": {"bytes": 0}}, "response": {"body": {"bytes": 0}}}}}], "properties": {"publishername": "[parameters('apim-publisher-name')]", "publisheremail": "[parameters('apim-publisher-email')]", "virtualnetworktype": "internal", "virtualnetworkconfiguration": {"subnetresourceid": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "apimsubnet')]"}}} |
Monitor your API Management service with Operations Management Suite - Log Analytics | {"apiversion": "2020-12-01", "name": "[variables('apimanagementservicename')]", "type": "microsoft.apimanagement/service", "location": "[parameters('location')]", "sku": {"name": "[parameters('apimanagementsku')]", "capacity": "[parameters('apimanagementskucount')]"}, "properties": {"publisheremail": "[parameters('apimanagementpublisheremail')]", "publishername": "[parameters('apimanagementpublishername')]"}}{"name": "[concat(variables('apimanagementservicename'), "/", "microsoft.insights/service')]", "type": "microsoft.apimanagement/service/providers/diagnosticsettings", "apiversion": "2015-07-01", "dependson": ["[resourceid('microsoft.apimanagement/service/", variables('apimanagementservicename'))]", "[resourceid('microsoft.operationalinsights/workspaces/", variables('omsworkspacename'))]"], "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", variables('omsworkspacename'))]", "logs": [{"category": "gatewaylogs", "enabled": true}]}} |
Create an API Management instance using a template | {"type": "microsoft.apimanagement/service", "apiversion": "2020-12-01", "name": "[parameters('apimanagementservicename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]"}} |
Create a Standard Stream Analytics Job without input and output | {"type": "microsoft.streamanalytics/streamingjobs", "apiversion": "2019-06-01", "name": "[parameters('streamanalyticsjobname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard"}, "outputerrorpolicy": "stop", "eventsoutoforderpolicy": "adjust", "eventsoutofordermaxdelayinseconds": 0, "eventslatearrivalmaxdelayinseconds": 5, "datalocale": "en-us", "transformation": {"name": "transformation", "properties": {"streamingunits": "[parameters('numberofstreamingunits')]", "query": "select\r\n *\r\ninto\r\n [youroutputalias]\r\nfrom\r\n [yourinputalias]"}}}} |
This template demonstrates how to create a container group with VNet. | {"type": "microsoft.containerinstance/containergroups", "apiversion": "2019-12-01", "name": "[parameters('containergroupname')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername')]", "properties": {"image": "[parameters('image')]", "ports": [{"port": "[parameters('port')]", "protocol": "tcp"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}}}], "ostype": "linux", "networkprofile": {"id": "[resourceid('microsoft.network/networkprofiles", variables('networkprofilename'))]"}, "restartpolicy": "always"}, "dependson": ["[resourceid('microsoft.network/networkprofiles", variables('networkprofilename'))]"]} |
Create an on-demand SFTP Server with persistent storage | {"type": "microsoft.containerinstance/containergroups", "apiversion": "2019-12-01", "name": "[variables('sftpcontainergroupname')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[variables('sftpcontainername')]", "properties": {"image": "[variables('sftpcontainerimage')]", "environmentvariables": [{"name": "sftp_users", "value": "[variables('sftpenvvariable')]"}], "resources": {"requests": {"cpu": 2, "memoryingb": 1}}, "ports": [{"port": 22}], "volumemounts": [{"name": "sftpvolume", "mountpath": "[format('/home/{0}/upload", parameters('sftpuser'))]", "readonly": false}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": 22}]}, "restartpolicy": "onfailure", "volumes": [{"name": "sftpvolume", "azurefile": {"readonly": false, "sharename": "[parameters('filesharename')]", "storageaccountname": "[variables('storageaccountname')]", "storageaccountkey": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-04-01').keys[0].value]"}}]}, "dependson": ["[resourceid('microsoft.resources/deploymentscripts", variables('scriptname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]} |
This templates creates an ACI resource and exposes a container through UDP | {"type": "microsoft.containerinstance/containergroups", "name": "[concat(variables('containername'),variables('randomname'),"1')]", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[variables('containername')]", "properties": {"image": "[variables('containeruri')]", "ports": [{"protocol": "[parameters('portprotocol')]", "port": "[variables('port')]"}], "resources": {"requests": {"cpu": "[variables('numbercores')]", "memoryingb": "[variables('memory')]"}}}}], "ostype": "[variables('ostype')]", "ipaddress": {"type": "public", "ports": [{"protocol": "[parameters('portprotocol')]", "port": "[variables('port')]"}]}}} |
This template demonstrates how to create a container group with a Linux container that has a secret volume using Azure Container Instances. | {"type": "microsoft.containerinstance/containergroups", "apiversion": "2020-11-01", "name": "[parameters('name')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername')]", "properties": {"image": "[parameters('imagename')]", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/mnt/secrets", "readonly": false}]}}], "ostype": "linux", "ipaddress": {"type": "public", "dnsnamelabel": "[parameters('dnsnamelabel')]", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}, "volumes": [{"name": "[parameters('volumename')]", "secret": {"sslcertificatedata": "[parameters('sslcertificatedata')]", "sslcertificatepwd": "[base64(parameters('sslcertificatepwd'))]"}}]}} |
This template demonstrates how to create a container group with a Linux container that has a health probe using Azure Container Instances. | {"name": "[parameters('containergroupname')]", "type": "microsoft.containerinstance/containergroups", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername')]", "properties": {"command": ["/bin/sh", "-c", "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"], "image": "[parameters('imagename')]", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "livenessprobe": {"exec": {"command": ["cat", "/tmp/healthy"]}, "periodseconds": 5}}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}}} |
This template demonstrates how to create a container group with a single Linux container and a public IP address using Azure Container Instances. | {"type": "microsoft.containerinstance/containergroups", "apiversion": "2019-12-01", "name": "[parameters('name')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('name')]", "properties": {"image": "[parameters('image')]", "ports": [{"port": "[parameters('port')]", "protocol": "tcp"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}}}], "ostype": "linux", "restartpolicy": "[parameters('restartpolicy')]", "ipaddress": {"type": "public", "ports": [{"port": "[parameters('port')]", "protocol": "tcp"}]}}} |
This template demonstrates how to create a container group with a Linux container that has a secure environment variable using Azure Container Instances. | {"name": "[parameters('containergroupname')]", "type": "microsoft.containerinstance/containergroups", "apiversion": "2019-12-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername')]", "properties": {"image": "[parameters('imagename')]", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "environmentvariables": [{"name": "[parameters('environmentvariablename')]", "securevalue": "[parameters('environmentvariablevalue')]"}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}}} |
This template demonstrates how to create a container group with two Linux containers that share an emptyDir volume using Azure Container Instances. | {"name": "[parameters('containergroupname')]", "type": "microsoft.containerinstance/containergroups", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername1')]", "properties": {"image": "nginx", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/var/log/nginx", "readonly": false}]}}, {"name": "[parameters('containername2')]", "properties": {"command": ["bin/bash", "-c", "while sleep 5; do cat /mnt/input/access.log; done"], "image": "[parameters('image')]", "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/mnt/input", "readonly": true}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}, "volumes": [{"name": "[parameters('volumename')]", "emptydir": {}}]}} |
This template demonstrates how to create a container group with a gitRepo volume using Azure Container Instances. | {"name": "[parameters('containergroupname')]", "type": "microsoft.containerinstance/containergroups", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername')]", "properties": {"image": "nginx", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/mnt/gitrepos/", "readonly": false}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}, "volumes": [{"name": "[parameters('volumename')]", "gitrepo": {"repository": "https://github.com/azure-samples/aci-helloworld.git"}}]}} |
Create an on-demand SFTP Server with persistent storage using an existing storage account | {"type": "microsoft.containerinstance/containergroups", "name": "[variables('sftpcontainergroupname')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[variables('sftpcontainername')]", "properties": {"image": "[variables('sftpcontainerimage')]", "environmentvariables": [{"name": "sftp_users", "value": "[variables('sftpenvvariable')]"}], "resources": {"requests": {"cpu": 2, "memoryingb": 1}}, "ports": [{"port": 22}], "volumemounts": [{"mountpath": "[concat('/home/", parameters('sftpuser'), "/upload')]", "name": "sftpvolume", "readonly": false}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": 22}]}, "restartpolicy": "onfailure", "volumes": [{"name": "sftpvolume", "azurefile": {"readonly": false, "sharename": "[parameters('existingfilesharename')]", "storageaccountname": "[parameters('existingstorageaccountname')]", "storageaccountkey": "[listkeys(variables('storageaccountid'),"2018-02-01').keys[0].value]"}}]}} |
This template creates an Azure Container Registry with policies, diagnostics along with other configurable options such as identities, IP rules, etc. | {"type": "microsoft.containerregistry/registries", "apiversion": "2021-06-01-preview", "name": "[parameters('acrname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('acrsku')]"}, "identity": "[if(parameters('enablesystemidentity'), createobject('type", "systemassigned'), if(not(empty(parameters('userassignedidentities'))), createobject('type", "userassigned", "userassignedidentities", parameters('userassignedidentities')), null()))]", "properties": {"adminuserenabled": "[parameters('enableadminuser')]", "publicnetworkaccess": "[parameters('publicnetworkaccess')]", "zoneredundancy": "[parameters('zoneredundancy')]", "networkrulebypassoptions": "[parameters('networkrulebypassoptions')]", "networkruleset": "[if(not(empty(parameters('iprules'))), createobject('defaultaction", parameters('iprules').defaultaction, "iprules", parameters('iprules').iprules), createobject())]", "policies": "[parameters('policies')]"}} |
This template creates an Azure Relay namespace and a WCF Relay | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.relay/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('wcfrelayname')]", "type": "wcfrelays", "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('namespacename'))]"], "properties": {"relaytype": "[parameters('wcfrelaytype')]", "requiresclientauthorization": "false", "requirestransportsecurity": "false", "usermetadata": "meta data supplied by user for wcfrelays"}}]} |
This template creates an Azure Relay namespace with a Standard SKU. | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespace')]", "type": "microsoft.relay/namespaces", "location": "[parameters('location')]", "kind": "relay", "properties": {}} |
This template creates an Azure Relay namespace, a WcfRealy and authorization rules for both the namespace and WcfRealy. | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.relay/namespaces", "location": "[variables('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "[variables('apiversion')]", "name": "[parameters('wcfrelayname')]", "type": "wcfrelays", "dependson": ["[resourceid('microsoft.relay/namespaces/", parameters('namespacename'))]"], "properties": {"relaytype": "[parameters('wcfrelaytype')]", "requiresclientauthorization": "false", "requirestransportsecurity": "false", "usermetadata": "meta data supplied by user for wcfrelays"}, "resources": [{"apiversion": "[variables('apiversion')]", "name": "[parameters('wcfrelayauthorizationrulename')]", "type": "authorizationrules", "dependson": ["[parameters('wcfrelayname')]"], "properties": {"rights": ["listen"]}}]}, {"apiversion": "[variables('apiversion')]", "name": "[variables('namespaceauthrulename')]", "type": "microsoft.relay/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.relay/namespaces/", parameters('namespacename'))]"], "properties": {"rights": ["send"]}}]} |
This template creates an Azure Relay namespace and HybridConnection. | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.relay/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('hybridconnectionname')]", "type": "hybridconnections", "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('namespacename'))]"], "properties": {"requiresclientauthorization": "true", "usermetadata": "meta data supplied by user for hybridconnections"}}]} |
This template creates an Azure Relay namespace, a WCF Relay and a HybridConnection. | {"apiversion": "2017-04-01", "name": "[parameters('namespacename')]", "type": "microsoft.relay/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('wcfrelayname')]", "type": "wcfrelays", "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('namespacename'))]"], "properties": {"relaytype": "[parameters('wcfrelaytype')]", "requiresclientauthorization": "false", "requirestransportsecurity": "false", "usermetadata": "meta data supplied by user for wcfrelays"}}, {"apiversion": "2017-04-01", "name": "[parameters('hybridconnectionname')]", "type": "hybridconnections", "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('namespacename'))]"], "properties": {"requiresclientauthorization": "true", "usermetadata": "meta data supplied by user hybridconnections"}}]} |
This template configures protection for an existing File Share present in an existing Storage Account. | {"condition": "[parameters('isnewvault')]", "type": "microsoft.recoveryservices/vaults", "apiversion": "2020-02-02", "name": "[parameters('vaultname')]", "location": "[parameters('location')]", "sku": {"name": "rs0", "tier": "standard"}, "properties": {}}{"condition": "[parameters('isnewpolicy')]", "type": "microsoft.recoveryservices/vaults/backuppolicies", "apiversion": "2020-02-02", "name": "[concat(parameters('vaultname'), "/", parameters('policyname'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"], "properties": {"backupmanagementtype": "[variables('backupmanagementtype')]", "schedulepolicy": {"schedulerunfrequency": "daily", "scheduleruntimes": "[variables('scheduleruntimes')]", "schedulepolicytype": "simpleschedulepolicy"}, "retentionpolicy": {"dailyschedule": {"retentiontimes": "[variables('scheduleruntimes')]", "retentionduration": {"count": "[parameters('dailyretentiondurationcount')]", "durationtype": "days"}}, "weeklyschedule": {"daysoftheweek": "[parameters('daysoftheweek')]", "retentiontimes": "[variables('scheduleruntimes')]", "retentionduration": {"count": "[parameters('weeklyretentiondurationcount')]", "durationtype": "weeks"}}, "monthlyschedule": {"retentionscheduleformattype": "daily", "retentionscheduledaily": {"daysofthemonth": [{"date": 1, "islast": false}]}, "retentiontimes": "[variables('scheduleruntimes')]", "retentionduration": {"count": "[parameters('monthlyretentiondurationcount')]", "durationtype": "months"}}, "yearlyschedule": {"retentionscheduleformattype": "daily", "monthsofyear": "[parameters('monthsofyear')]", "retentionscheduledaily": {"daysofthemonth": [{"date": 1, "islast": false}]}, "retentiontimes": "[variables('scheduleruntimes')]", "retentionduration": {"count": "[parameters('yearlyretentiondurationcount')]", "durationtype": "years"}}, "retentionpolicytype": "longtermretentionpolicy"}, "timezone": "[parameters('timezone')]", "workloadtype": "azurefileshare"}}{"condition": "[parameters('registerstorageaccount')]", "type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers", "apiversion": "2020-02-02", "name": "[concat(parameters('vaultname'), "/", variables('backupfabric'), "/storagecontainer;storage;", parameters('existingresourcegroupname'), ";", parameters('existingstorageaccountname'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"], "properties": {"backupmanagementtype": "[variables('backupmanagementtype')]", "containertype": "storagecontainer", "sourceresourceid": "[resourceid(parameters('existingresourcegroupname'), "microsoft.storage/storageaccounts", parameters('existingstorageaccountname'))]"}}{"type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems", "apiversion": "2020-02-02", "name": "[concat(parameters('vaultname'), "/", variables('backupfabric'), "/storagecontainer;storage;", parameters('existingresourcegroupname'), ";", parameters('existingstorageaccountname'), "/azurefileshare;", parameters('existingfilesharename'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers", parameters('vaultname'), variables('backupfabric'), concat('storagecontainer;storage;", parameters('existingresourcegroupname'), ";", parameters('existingstorageaccountname')))]", "[resourceid('microsoft.recoveryservices/vaults/backuppolicies", parameters('vaultname'), parameters('policyname'))]", "[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"], "properties": {"protecteditemtype": "azurefileshareprotecteditem", "sourceresourceid": "[resourceid(parameters('existingresourcegroupname'), "microsoft.storage/storageaccounts", parameters('existingstorageaccountname'))]", "policyid": "[resourceid('microsoft.recoveryservices/vaults/backuppolicies", parameters('vaultname'), parameters('policyname'))]", "isinlineinquiry": true}} |
This template creates a Recovery Services vault that will be used further for Backup and Site Recovery. | {"type": "microsoft.recoveryservices/vaults", "apiversion": "2020-02-02", "name": "[parameters('vaultname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('skuname')]", "tier": "[variables('skutier')]"}, "properties": {}}{"type": "microsoft.recoveryservices/vaults/backupstorageconfig", "apiversion": "2020-02-02", "name": "[format('{0}/{1}", parameters('vaultname'), "vaultstorageconfig')]", "properties": {"storagemodeltype": "[parameters('vaultstoragetype')]", "crossregionrestoreflag": "[parameters('enablecrr')]"}, "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"]} |
This template creates a Recovery Services Vault without any advanced features or additional resources. | {"type": "microsoft.recoveryservices/vaults", "apiversion": "2020-10-01", "name": "[parameters('vaultname')]", "location": "[parameters('location')]", "properties": {}, "sku": {"name": "rs0", "tier": "standard"}} |
This template configures protection for classic and ARM based Azure IaaSVMs. | {"name": "[concat(parameters('existingrecoveryservicesvaultname'), "/", variables('backupfabric'), "/", parameters('existingprotectioncontainers')[copyindex()], "/", parameters('existingprotectableitems')[copyindex()])]", "apiversion": "2016-06-01", "location": "[parameters('location')]", "type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems", "copy": {"name": "protecteditemscopy", "count": "[length(parameters('existingprotectableitems'))]"}, "properties": {"protecteditemtype": "[variables('protecteditemtype')]", "policyid": "[resourceid('microsoft.recoveryservices/vaults/backuppolicies", parameters('existingrecoveryservicesvaultname'), parameters('existingbackuppolicyname'))]", "sourceresourceid": "[parameters('existingsourceresourceids')[copyindex()]]"}} |
This template creates a Recovery Services Vault and a Workload specific Backup Policy. Registers VM with Backup service and Configures Protection | {"condition": "[parameters('isnewvault')]", "type": "microsoft.recoveryservices/vaults", "apiversion": "2018-01-10", "name": "[parameters('vaultname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('skuname')]", "tier": "[variables('skutier')]"}, "properties": {}}{"type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers", "apiversion": "2018-01-10", "name": "[concat(parameters('vaultname'), "/", variables('backupfabric'), "/", variables('containertype'), ";compute;", parameters('vmresourcegroup'),";",parameters('vmname'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults/", parameters('vaultname'))]"], "properties": {"containertype": "[variables('containertype')]", "backupmanagementtype": "[variables('backupmanagementtype')]", "workloadtype": "[parameters('workloadtype')]", "friendlyname": "[parameters('vmname')]", "sourceresourceid": "[resourceid(parameters('vmresourcegroup'),"microsoft.compute/virtualmachines", parameters('vmname'))]"}}{"condition": "[parameters('isnewpolicy')]", "type": "microsoft.recoveryservices/vaults/backuppolicies", "apiversion": "2018-01-10", "name": "[concat(parameters('vaultname'), "/", parameters('policyname'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults/", parameters('vaultname'))]"], "properties": {"backupmanagementtype": "[variables('backupmanagementtype')]", "workloadtype": "[parameters('workloadtype')]", "settings": {"timezone": "utc", "issqlcompression": false, "iscompression": false}, "subprotectionpolicy": [{"policytype": "full", "schedulepolicy": {"schedulepolicytype": "simpleschedulepolicy", "schedulerunfrequency": "daily", "scheduleruntimes": ["2019-03-24t16:00:00z"], "scheduleweeklyfrequency": 0}, "retentionpolicy": {"retentionpolicytype": "longtermretentionpolicy", "dailyschedule": {"retentiontimes": ["2019-03-24t16:00:00z"], "retentionduration": {"count": 30, "durationtype": "days"}}}}, {"policytype": "log", "schedulepolicy": {"schedulepolicytype": "logschedulepolicy", "schedulefrequencyinmins": 60}, "retentionpolicy": {"retentionpolicytype": "simpleretentionpolicy", "retentionduration": {"count": 30, "durationtype": "days"}}}]}}{"type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems", "apiversion": "2018-01-10", "name": "[concat(parameters('vaultname'), "/", variables('backupfabric'), "/", variables('containertype'), ";compute;", parameters('vmresourcegroup'),";",parameters('vmname'), "/", parameters('workloadtype'), ";", parameters('databaseinstancename'), ";", parameters('databasename'))]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]", "[resourceid('microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers", parameters('vaultname'), variables('backupfabric'), concat(variables('containertype'), ";compute;", parameters('vmresourcegroup'),";",parameters('vmname')))]"], "properties": {"backupmanagementtype": "[variables('backupmanagementtype')]", "workloadtype": "[parameters('workloadtype')]", "protecteditemtype": "[parameters('protecteditemtype')]", "friendlyname": "[parameters('databasename')]", "policyid": "[resourceid('microsoft.recoveryservices/vaults/backuppolicies", parameters('vaultname'), parameters('policyname'))]"}} |
This template configures backup of VMs from same Resource Group | {"name": "[concat(parameters('existingrecoveryservicesvault'), "/", variables('backupfabric'), "/", variables('v2vmcontainer'), concat(parameters('existingvirtualmachinesresourcegroup'),";",parameters('existingvirtualmachines')[copyindex()]), "/", variables('v2vm'), concat(parameters('existingvirtualmachinesresourcegroup'),";",parameters('existingvirtualmachines')[copyindex()]))]", "apiversion": "2016-06-01", "location": "[parameters('location')]", "type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems", "copy": {"name": "v2vmscopy", "count": "[length(parameters('existingvirtualmachines'))]"}, "properties": {"protecteditemtype": "[variables('v2vmtype')]", "policyid": "[resourceid('microsoft.recoveryservices/vaults/backuppolicies",parameters('existingrecoveryservicesvault'),parameters('existingbackuppolicy') )]", "sourceresourceid": "[resourceid(subscription().subscriptionid,parameters('existingvirtualmachinesresourcegroup'),"microsoft.compute/virtualmachines",parameters('existingvirtualmachines')[copyindex()])]"}} |
This template takes a minimum amount of parameters and deploys a Windows VM and configures backup protection. | {"type": "microsoft.recoveryservices/vaults", "apiversion": "2020-02-02", "name": "[variables('vaultname')]", "location": "[parameters('location')]", "sku": {"name": "rs0", "tier": "standard"}, "properties": {}}{"type": "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems", "apiversion": "2020-02-02", "name": "[format('{0}/{1}/{2}/{3}", variables('vaultname'), variables('backupfabric'), variables('protectioncontainer'), variables('protecteditem'))]", "properties": {"protecteditemtype": "microsoft.compute/virtualmachines", "policyid": "[format('{0}/backuppolicies/{1}", resourceid('microsoft.recoveryservices/vaults", variables('vaultname')), variables('backuppolicyname'))]", "sourceresourceid": "[resourceid('microsoft.compute/virtualmachines", variables('vmname'))]"}, "dependson": ["[resourceid('microsoft.recoveryservices/vaults", variables('vaultname'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vmname'))]"]} |
This template creates a Recovery Services Vault with backup policies configured | {"type": "microsoft.recoveryservices/vaults", "apiversion": "2021-06-01", "name": "[parameters('vaultname')]", "location": "[parameters('location')]", "identity": {"type": "[if(parameters('enablesystemidentity'), "systemassigned", "none')]"}, "properties": {}, "sku": {"name": "[parameters('sku')]", "tier": "standard"}}{"copy": {"name": "backuppolicy", "count": "[length(parameters('backuppolicies'))]"}, "type": "microsoft.recoveryservices/vaults/backuppolicies", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", parameters('vaultname'), parameters('backuppolicies')[copyindex()].policyname)]", "location": "[parameters('location')]", "properties": "[parameters('backuppolicies')[copyindex()].properties]", "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"]}{"type": "microsoft.recoveryservices/vaults/backupstorageconfig", "apiversion": "2021-04-01", "name": "[format('{0}/vaultstorageconfig", parameters('vaultname'))]", "properties": {"crossregionrestoreflag": "[parameters('enablecrossregionrestore')]", "storagetype": "[parameters('storagetype')]"}, "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"]} |
This template provides a way to deploy an Azure database for MariaDB with VNet integration. | {"type": "microsoft.dbformariadb/servers/virtualnetworkrules", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('servername'), parameters('virtualnetworkrulename'))]", "properties": {"virtualnetworksubnetid": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname'))]", "ignoremissingvnetserviceendpoint": true}, "dependson": ["[resourceid('microsoft.dbformariadb/servers", parameters('servername'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname'))]"]}{"type": "microsoft.dbformariadb/servers", "apiversion": "2018-06-01", "name": "[parameters('servername')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "tier": "[parameters('skutier')]", "capacity": "[parameters('skucapacity')]", "size": "[format('{0}", parameters('skusizemb'))]", "family": "[parameters('skufamily')]"}, "properties": {"createmode": "default", "version": "[parameters('mariadbversion')]", "administratorlogin": "[parameters('administratorlogin')]", "administratorloginpassword": "[parameters('administratorloginpassword')]", "storageprofile": {"storagemb": "[parameters('skusizemb')]", "backupretentiondays": "[parameters('backupretentiondays')]", "georedundantbackup": "[parameters('georedundantbackup')]"}}}{"copy": {"name": "firewallrules", "count": "[length(variables('firewallrules'))]", "mode": "serial", "batchsize": 1}, "type": "microsoft.dbformariadb/servers/firewallrules", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('servername'), variables('firewallrules')[copyindex()].name)]", "properties": {"startipaddress": "[variables('firewallrules')[copyindex()].startipaddress]", "endipaddress": "[variables('firewallrules')[copyindex()].endipaddress]"}, "dependson": ["[resourceid('microsoft.dbformariadb/servers", parameters('servername'))]"]} |
This template uses Confidential Ledger to log to an immutable, tamper-proof ledger. | {"name": "[parameters('ledgername')]", "type": "microsoft.confidentialledger/ledgers", "apiversion": "2020-12-01-preview", "location": "[parameters('location')]", "properties": {"ledgertype": "public", "aadbasedsecurityprincipals": [{"principalid": "[parameters('principalid')]", "ledgerrolename": "administrator"}]}} |
This template creates an Azure API for FHIR®. | {"type": "microsoft.healthcareapis/services", "apiversion": "2020-03-15", "name": "[parameters('servicename')]", "location": "[parameters('location')]", "kind": "fhir-r4", "properties": {"authenticationconfiguration": {"audience": "[concat('https://", parameters('servicename'), ".azurehealthcareapis.com')]", "authority": "[uri(environment().authentication.loginendpoint, subscription().tenantid)]"}}} |
This template creates a Attestation provider that can be used for various attestation types like sgx, vsm enclaves. | {"type": "microsoft.attestation/attestationproviders", "apiversion": "2020-10-01", "name": "[parameters('attestationprovidername')]", "location": "[parameters('location')]", "tags": "[parameters('tags')]", "properties": "[if(empty(parameters('policysigningcertificates')), json('{}'), variables('policysigningcertificates'))]"} |
Create a SQL Server Virtual Machine with performance optimized storage settings, using UltraSSD for SQL Log files | {"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]"], "properties": {"virtualmachineresourceid": "[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]", "sqlmanagement": "full", "sqlserverlicensetype": "payg", "storageconfigurationsettings": {"diskconfigurationtype": "[variables('diskconfigurationtype')]", "storageworkloadtype": "[parameters('storageworkloadtype')]", "sqldatasettings": {"luns": "[variables('datadisksluns')]", "defaultfilepath": "[parameters('datapath')]"}, "sqllogsettings": {"luns": "[variables('logdisksluns')]", "defaultfilepath": "[parameters('logpath')]"}, "sqltempdbsettings": {"defaultfilepath": "[variables('tempdbpath')]"}}}} |
Deploy SQL Always ON setup with existing SQL Virtual Machines. | {"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[trim(variables('existingvmlistarray')[copyindex()])]", "location": "[parameters('location')]", "copy": {"name": "sqlvirtualmachineloop", "count": "[length(variables('existingvmlistarray'))]"}, "properties": {"virtualmachineresourceid": "[resourceid(parameters('existingvmresourcegroup'), "microsoft.compute/virtualmachines", trim(variables('existingvmlistarray')[copyindex()]))]", "sqlserverlicensetype": "[parameters('sqlserverlicensetype')]"}}{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachinegroups", "apiversion": "2017-03-01-preview", "name": "[parameters('failoverclustername')]", "location": "[parameters('location')]", "properties": {"sqlimageoffer": "[parameters('sqlserverimagetype')]", "sqlimagesku": "enterprise", "wsfcdomainprofile": {"domainfqdn": "[parameters('existingfullyqualifieddomainname')]", "oupath": "[parameters('existingoupath')]", "clusterbootstrapaccount": "[parameters('existingdomainaccount')]", "clusteroperatoraccount": "[parameters('existingdomainaccount')]", "sqlserviceaccount": "[parameters('existingsqlserviceaccount')]", "storageaccounturl": "[reference(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').primaryendpoints["blob"]]", "storageaccountprimarykey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').keys[0].value]"}}} |
Create a SQL Server Virtual Machine with performance optimized storage settings on PremiumSSD | {"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]"], "properties": {"virtualmachineresourceid": "[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]", "sqlmanagement": "full", "sqlserverlicensetype": "payg", "storageconfigurationsettings": {"diskconfigurationtype": "[variables('diskconfigurationtype')]", "storageworkloadtype": "[parameters('storageworkloadtype')]", "sqldatasettings": {"luns": "[variables('datadisksluns')]", "defaultfilepath": "[parameters('datapath')]"}, "sqllogsettings": {"luns": "[variables('logdisksluns')]", "defaultfilepath": "[parameters('logpath')]"}, "sqltempdbsettings": {"defaultfilepath": "[variables('tempdbpath')]"}}}} |
Create new Azure NetApp Files resource with SMB volume | {"type": "microsoft.netapp/netappaccounts", "apiversion": "2020-06-01", "name": "[parameters('netappaccountname')]", "location": "[parameters('location')]", "properties": {"activedirectories": [{"username": "[parameters('adusername')]", "password": "[parameters('adpassword')]", "domain": "[parameters('domainname')]", "dns": "[parameters('dnsipaddress')]", "smbservername": "[parameters('smbservername')]"}]}}{"type": "microsoft.netapp/netappaccounts/capacitypools", "apiversion": "2020-06-01", "name": "[concat(parameters('netappaccountname'),"/",parameters('netapppoolname'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.netapp/netappaccounts", parameters('netappaccountname'))]"], "properties": {"servicelevel": "[parameters('servicelevel')]", "size": "[parameters('poolsizebytes')]"}}{"type": "microsoft.netapp/netappaccounts/capacitypools/volumes", "apiversion": "2020-06-01", "name": "[concat(parameters('netappaccountname'),"/",parameters('netapppoolname'),"/", parameters('netappvolumename'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.netapp/netappaccounts/capacitypools", parameters('netappaccountname'), parameters('netapppoolname'))]", "addsubnet"], "properties": {"servicelevel": "[parameters('servicelevel')]", "creationtoken": "[parameters('netappvolumename')]", "usagethreshold": "[parameters('volsizebytes')]", "subnetid": "[resourceid(parameters('virtualnetworksubscriptionid'), parameters('virtualnetworkresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('anfsubnetname'))]"}} |
Create new Azure NetApp Files resource with NFSV3 or NFSv4.1 volume | {"type": "microsoft.netapp/netappaccounts", "apiversion": "2020-06-01", "name": "[parameters('netappaccountname')]", "location": "[parameters('location')]", "properties": {}}{"type": "microsoft.netapp/netappaccounts/capacitypools", "apiversion": "2020-06-01", "name": "[variables('capacitypoolname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.netapp/netappaccounts", parameters('netappaccountname'))]"], "properties": {"servicelevel": "[parameters('servicelevel')]", "size": "[parameters('poolsizebytes')]"}}{"type": "microsoft.netapp/netappaccounts/capacitypools/volumes", "apiversion": "2020-06-01", "name": "[variables('volumename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.netapp/netappaccounts/capacitypools", parameters('netappaccountname'), parameters('netapppoolname'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"], "properties": {"servicelevel": "[parameters('servicelevel')]", "creationtoken": "[parameters('netappvolumename')]", "usagethreshold": "[parameters('volsizebytes')]", "exportpolicy": {"rules": [{"ruleindex": 1, "unixreadonly": "[parameters('unixreadonly')]", "unixreadwrite": "[parameters('unixreadwrite')]", "cifs": false, "nfsv3": "[if(equals( parameters('protocoltypes'), "nfsv3'),bool('true'),bool('false'))]", "nfsv41": "[if(equals(parameters('protocoltypes'), "nfsv4.1'),bool('true'),bool('false'))]", "allowedclients": "[parameters('allowedclients')]"}]}, "protocoltypes": ["[parameters('protocoltypes')]"], "subnetid": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname'))]", "snapshotdirectoryvisible": "[parameters('snapshotdirectoryvisible')]"}} |
This template creates a vnet and a subnet hosting a Linux virtual machine that accesses a Event Hubs namespace with a private endpoint. | {"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubsnamespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "[parameters('eventhubsnamespacesku')]", "tier": "[parameters('eventhubsnamespacesku')]", "capacity": "[parameters('eventhubsnamespacecapacity')]"}, "properties": {"zoneredundant": "[parameters('eventhubsnamespacezoneredundant')]"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[variables('eventhubsnamespaceid')]"], "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('consumergroupname')]", "type": "consumergroups", "dependson": ["[parameters('eventhubname')]"], "properties": {"usermetadata": "user metadata goes here"}}]}]} |
This template creates a EventHub Basic/Standard namespace. | {"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubnamespacenamesecondary')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('locationsecondarynamepsace')]", "sku": {"name": "[parameters('eventhubsku')]", "tier": "[parameters('eventhubsku')]", "capacity": "[parameters('skucapacity')]"}, "tags": {"tag1": "value1", "tag2": "value2"}}{"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubnamespacenameprimary')]", "type": "microsoft.eventhub/namespaces", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('eventhubnamespacenamesecondary'))]"], "location": "[parameters('locationprimarynamepsace')]", "sku": {"name": "[parameters('eventhubsku')]", "tier": "[parameters('eventhubsku')]", "capacity": "[parameters('skucapacity')]"}, "tags": {"tag1": "value1", "tag2": "value2"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('aliasname')]", "type": "disasterrecoveryconfigs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('eventhubnamespacenameprimary'))]"], "properties": {"partnernamespace": "[resourceid('microsoft.eventhub/namespaces", parameters('eventhubnamespacenamesecondary'))]"}}]} |
Creates a Event Hub cluster and namesapce in the cluster | {"type": "microsoft.eventhub/clusters", "apiversion": "2018-01-01-preview", "name": "[parameters('clustername')]", "location": "[parameters('location')]", "sku": {"name": "dedicated", "capacity": 1}}{"type": "microsoft.eventhub/namespaces", "apiversion": "2021-01-01-preview", "name": "[parameters('namespacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.eventhub/clusters", parameters('clustername'))]"], "sku": {"name": "standard", "tier": "standard", "capacity": 1}, "properties": {"isautoinflateenabled": false, "maximumthroughputunits": 0, "clusterarmid": "[resourceid('microsoft.eventhub/clusters", parameters('clustername'))]"}} |
This template creates an Event Hubs namespace, an Event Hub, and a consumer group. | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "[parameters('eventhubsku')]", "tier": "[parameters('eventhubsku')]", "capacity": "[parameters('skucapacity')]"}, "tags": {"tag1": "value1", "tag2": "value2"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('consumergroupname')]", "type": "consumergroups", "dependson": ["[parameters('eventhubname')]"], "properties": {"usermetadata": "user metadata goes here"}}]}]} |
Creates a EventHubs namespace, and an event hub. | {"type": "microsoft.eventhub/namespaces", "apiversion": "2018-01-01-preview", "name": "[variables('eventhubnamespacename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('eventhubsku')]", "tier": "[parameters('eventhubsku')]", "capacity": 1}, "properties": {"isautoinflateenabled": false, "maximumthroughputunits": 0}}{"type": "microsoft.eventhub/namespaces/eventhubs", "apiversion": "2017-04-01", "name": "[concat(variables('eventhubnamespacename'), "/", variables('eventhubname'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.eventhub/namespaces", variables('eventhubnamespacename'))]"], "properties": {"messageretentionindays": 7, "partitioncount": 1}} |
Turn on the auto-inflate on your namespace to automatically scale-up your throughput units | {"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "standard"}, "properties": {"isautoinflateenabled": "[parameters('isautoinflateenabled')]", "maximumthroughputunits": "[parameters('maximumthroughputunits')]"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {"messageretentionindays": "[parameters('messageretentionindays')]", "partitioncount": "[parameters('partitioncount')]"}}]} |
Creates a Event Hub cluster, namesapce and eventhub in the cluster | {"type": "microsoft.eventhub/clusters", "apiversion": "2018-01-01-preview", "name": "[parameters('clustername')]", "location": "[parameters('location')]", "sku": {"name": "dedicated", "capacity": 1}}{"type": "microsoft.eventhub/namespaces", "apiversion": "2021-01-01-preview", "name": "[parameters('namespacename')]", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "standard", "capacity": 1}, "dependson": ["[resourceid('microsoft.eventhub/clusters", parameters('clustername'))]"], "properties": {"isautoinflateenabled": false, "maximumthroughputunits": 0, "clusterarmid": "[resourceid('microsoft.eventhub/clusters", parameters('clustername'))]"}}{"apiversion": "2021-01-01-preview", "type": "microsoft.eventhub/namespaces/eventhubs", "name": "[concat(parameters('namespacename'), "/", parameters('eventhubname'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.eventhub/namespaces", parameters('namespacename'))]"], "properties": {"messageretentionindays": 7, "partitioncount": 1}} |
Creates a EventHubs namespace, an Event Hub with Capture enabled on it for Azure Storage as destination. Existing storage account resource id and container details are to be specified in the template. | {"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubnamespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "[parameters('eventhubsku')]", "tier": "[parameters('eventhubsku')]", "capacity": "[parameters('skucapacity')]"}, "tags": {"tag1": "value1", "tag2": "value2"}, "properties": {"isautoinflateenabled": "[parameters('isautoinflateenabled')]", "maximumthroughputunits": "[parameters('maximumthroughputunits')]"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('eventhubnamespacename'))]"], "properties": {"messageretentionindays": "[parameters('messageretentionindays')]", "partitioncount": "[parameters('partitioncount')]", "capturedescription": {"enabled": "[parameters('captureenabled')]", "skipemptyarchives": false, "encoding": "[parameters('captureencodingformat')]", "intervalinseconds": "[parameters('capturetime')]", "sizelimitinbytes": "[parameters('capturesize')]", "destination": {"name": "eventhubarchive.azureblockblob", "properties": {"storageaccountresourceid": "[parameters('existingstorageacctresourceid')]", "blobcontainer": "[parameters('blobcontainername')]", "archivenameformat": "[parameters('capturenameformat')]"}}}}}]} |
Creates a EventHubs namespace, an Event Hub with Capture enabled on it for Azure Data Lake Store as destination. | {"apiversion": "2017-04-01", "name": "[parameters('eventhubnamespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[resourcegroup().location]", "sku": {"name": "standard", "tier": "standard"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[concat('microsoft.eventhub/namespaces/", parameters('eventhubnamespacename'))]"], "properties": {"path": "[parameters('eventhubname')]", "capturedescription": {"enabled": true, "skipemptyarchives": false, "encoding": "[parameters('captureencodingformat')]", "intervalinseconds": "[parameters('capturetime')]", "sizelimitinbytes": "[parameters('capturesize')]", "destination": {"name": "eventhubarchive.azuredatalake", "properties": {"datalakesubscriptionid": "[parameters('subscriptionid')]", "datalakeaccountname": "[parameters('datalakeaccountname')]", "datalakefolderpath": "[parameters('datalakefolderpath')]", "archivenameformat": "[parameters('capturenameformat')]"}}}}}]} |
This template creates a Event Hubs namespace and virtual network rule | {"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubnamespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "standard"}, "properties": {}}{"apiversion": "2018-01-01-preview", "name": "[variables('namespacevirtualnetworkrulename')]", "type": "microsoft.eventhub/namespaces/virtualnetworkrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('eventhubnamespacename'))]"], "properties": {"virtualnetworksubnetid": "[variables('subnetid')]"}} |
Creates an Azure Storage account and a blob container that can be accessed using SFTP protocol. Access can be password or public-key based. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2", "properties": {"ishnsenabled": true, "islocaluserenabled": true, "issftpenabled": true}}{"type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('homedirectory'))]", "properties": {"publicaccess": "none"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}{"type": "microsoft.storage/storageaccounts/localusers", "apiversion": "2021-04-01", "name": "[format('{0}/{1}", parameters('storageaccountname'), parameters('username'))]", "properties": {"permissionscopes": [{"permissions": "rcwdl", "service": "blob", "resourcename": "[parameters('homedirectory')]"}], "homedirectory": "[parameters('homedirectory')]", "sshauthorizedkeys": "[if(empty(parameters('publickey')), null(), createarray(createobject('description", format('{0} public key", parameters('username')), "key", parameters('publickey'))))]", "hassharedkey": false}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
This template creates an Azure storage account and multiple blob containers. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}{"copy": {"name": "containers", "count": "[length(range(0, 3))]"}, "type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}{2}", parameters('storageaccountname'), parameters('containerprefix'), range(0, 3)[copyindex()])]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
This template creates an Azure Storage account and a blob container. Template originally authored by John Downs. (bicep) | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"accesstier": "hot"}}{"type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-06-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('containername'))]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
Create a Storage Account with Storage Service Encryption for Data at Rest | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storage", "properties": {"encryption": {"keysource": "microsoft.storage", "services": {"blob": {"enabled": "[parameters('blobencryptionenabled')]"}}}}} |
Create a Standard Storage Account (bicep) | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2", "properties": {}} |
Deploys a static website with a backing storage account | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "[parameters('storagesku')]"}} |
Deploy an Azure Storage account with Advanced Threat Protection enabled. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccountreplication')]"}, "kind": "storagev2", "properties": {}} |
This template creates a vnet and a subnet hosting a Linux virtual machine that accesses a storage account using a system-assigned managed identity with a contributor role and a private endpoint. | {"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('adlsstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_ragrs"}, "kind": "storagev2"}{"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('blobstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"} |
This template creates an Azure storage account and multiple file shares. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}{"copy": {"name": "fileshares", "count": "[length(range(0, parameters('sharecopy')))]"}, "type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}{2}", parameters('storageaccountname'), parameters('shareprefix'), range(0, parameters('sharecopy'))[copyindex()])]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
This template creates an Azure storage account with file share. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}{"type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('filesharename'))]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
This template deploys a Storage Account with a customer-managed key for encryption that's generated and placed inside a Key Vault. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "identity": {"type": "userassigned", "userassignedidentities": {"[format('{0}", resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname')))]": {}}}, "properties": {"accesstier": "hot", "supportshttpstrafficonly": true, "minimumtlsversion": "tls1_2", "encryption": {"identity": {"userassignedidentity": "[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"}, "services": {"blob": {"enabled": true}}, "keysource": "microsoft.keyvault", "keyvaultproperties": {"keyname": "[parameters('keyvaultkeyname')]", "keyvaulturi": "[if(endswith(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi, "/'), substring(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi, 0, sub(length(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi), 1)), reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi)]"}}}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.keyvault/vaults/keys", parameters('keyvaultname'), parameters('keyvaultkeyname'))]", "[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]} |
This sample will go into detail on how to extend existing Azure resources and Resource Manager templates to add in custom workloads. | {"type": "microsoft.customproviders/associations", "apiversion": "2018-09-01-preview", "name": "[parameters('associationname')]", "location": "global", "dependson": ["customproviderinfrastructuretemplate"], "properties": {"targetresourceid": "[if(empty(parameters('customresourceproviderid')), reference('customproviderinfrastructuretemplate').outputs.customproviderresourceid.value, parameters('customresourceproviderid'))]", "mycustominputproperty": "mycustominputvalue", "mycustominputobject": {"property1": "value1"}}} |
This sample shows how to add custom resources to Resource Manager Templates using custom providers and logic apps. | {"type": "microsoft.customproviders/resourceproviders", "apiversion": "2018-09-01-preview", "name": "[parameters('customresourceprovidername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.logic/workflows", parameters('logicappname'))]"], "properties": {"resourcetypes": [{"name": "customresources", "mode": "secure", "routingtype": "webhook,cache", "endpoint": "[listcallbackurl(resourceid('microsoft.logic/workflows/triggers", parameters('logicappname'), "customproviderwebhook'), "2019-05-01').value]"}]}}{"type": "microsoft.customproviders/resourceproviders/customresources", "apiversion": "2018-09-01-preview", "name": "[concat(parameters('customresourceprovidername'), "/", parameters('customresourcename'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.customproviders/resourceproviders", parameters('customresourceprovidername'))]"], "properties": {"mycustominputproperty": "mycustominputvalue", "mycustominputobject": {"property1": "value1"}}} |
This template deploys a simple Setup for Azure Blockchain Service. | {"type": "microsoft.blockchain/blockchainmembers", "apiversion": "2018-06-01-preview", "name": "[parameters('bcmembername')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "tier": "[parameters('skutier')]"}, "tags": {"consortium": "consortium"}, "properties": {"protocol": "quorum", "consensus": "default", "password": "[parameters('memberpassword')]", "validatornodessku": {"capacity": 1}, "consortium": "[parameters('consortiumname')]", "consortiummanagementaccountpassword": "[parameters('consortiummanagementaccountpassword')]", "firewallrules": [{"rulename": "allowall", "startipaddress": "0.0.0.0", "endipaddress": "255.255.255.255"}]}} |
This sample creates and deploys a templateSpec. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "[format('{0}-{1}-deployment", parameters('templatespecname'), parameters('templatespecversion'))]", "properties": {"mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "diskname": {"value": "disk-from-templatespec"}}, "templatelink": {"id": "[resourceid(parameters('templatespecsubscriptionid'), parameters('templatespecresourcegroupname'), "microsoft.resources/templatespecs/versions", parameters('templatespecname'), parameters('templatespecversion'))]"}}} |
This template uses the deploymentScript resource to generate ssh keys and stores the private key in keyVault. | {"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "[variables('scriptname')]", "location": "[parameters('location')]", "dependson": ["[variables('roledefinitionname')]"], "identity": {"type": "userassigned", "userassignedidentities": {"[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]": {}}}, "kind": "azurecli", "properties": {"forceupdatetag": "[parameters('newguid')]", "azcliversion": "2.0.80", "timeout": "pt30m", "retentioninterval": "p1d", "cleanuppreference": "onsuccess", "arguments": "[parameters('passphrase')]", "primaryscripturi": "[uri(parameters('_artifactslocation'), concat('new-key.sh", parameters('_artifactslocationsastoken')))]"}}{"apiversion": "2019-09-01", "name": "storesshkeys", "type": "microsoft.resources/deployments", "resourcegroup": "[parameters('vaultresourcegroup')]", "subscriptionid": "[parameters('vaultsubscriptionid')]", "properties": {"mode": "incremental", "expressionevaluationoptions": {"scope": "inner"}, "parameters": {"keys": {"value": "[reference(variables('scriptname')).outputs.keyinfo]"}, "vaultname": {"value": "[parameters('vaultname')]"}, "secretname": {"value": "[parameters('secretname')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": {"keys": {"type": "secureobject"}, "vaultname": {"type": "string"}, "secretname": {"type": "string"}}, "resources": [{"name": "[concat(parameters('vaultname'), "/", parameters('secretname'))]", "type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "properties": {"value": "[parameters('keys').privatekey]"}}]}}} |
Create a Power BI Embedded capacity | {"type": "microsoft.powerbidedicated/capacities", "apiversion": "2018-09-01-preview", "name": "[parameters('name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"administration": {"members": ["[parameters('admin')]"]}}} |
This template creates an account that provides public DNS record and allows to make REST API calls to Data Plane. | {"type": "microsoft.deviceupdate/accounts", "apiversion": "2020-03-01-preview", "name": "[parameters('accountname')]", "location": "[parameters('location')]"} |
This template creates an account, and an instance and a hub to link the instance with. | {"type": "microsoft.deviceupdate/accounts", "apiversion": "2020-03-01-preview", "name": "[parameters('accountname')]", "location": "[parameters('location')]"}{"type": "microsoft.deviceupdate/accounts/instances", "apiversion": "2020-03-01-preview", "name": "[format('{0}/{1}", parameters('accountname'), parameters('instancename'))]", "location": "[parameters('location')]", "properties": {"iothubs": [{"resourceid": "[variables('iothubresourceid')]", "iothubconnectionstring": "[format('hostname={0};sharedaccesskeyname={1};sharedaccesskey={2}", reference(variables('iothubresourceid'), "2021-03-31').hostname, variables('iothubkeyname'), listkeys(variables('iothubresourceid'), "2021-03-31').value[variables('iothubkeyindex')].primarykey)]", "eventhubconnectionstring": "[format('endpoint={0};sharedaccesskeyname={1};sharedaccesskey={2};entitypath={3}", reference(variables('iothubresourceid'), "2021-03-31').eventhubendpoints.events.endpoint, variables('iothubkeyname'), listkeys(variables('iothubresourceid'), "2021-03-31').value[variables('iothubkeyindex')].primarykey, reference(variables('iothubresourceid'), "2021-03-31').eventhubendpoints.events.path)]"}]}, "dependson": ["[resourceid('microsoft.deviceupdate/accounts", parameters('accountname'))]", "[resourceid('microsoft.devices/iothubs", parameters('iothubname'))]"]} |
Create a Batch Account using a template and a storage account associated with the batch account. | {"type": "microsoft.batch/batchaccounts", "apiversion": "2020-05-01", "name": "[parameters('batchaccountname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "tags": {"objectname": "[parameters('batchaccountname')]"}, "properties": {"autostorage": {"storageaccountid": "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"}}} |
Deploy a new Data Lake Analytics account on a new Data Lake Store account. | {"name": "[parameters('adlstorename')]", "type": "microsoft.datalakestore/accounts", "location": "[parameters('location')]", "apiversion": "2016-11-01", "properties": {}} |
Deploy Azure Data Lake Store accounts with no data encryption. | {"type": "microsoft.datalakestore/accounts", "name": "[parameters('accountname')]", "location": "[parameters('location')]", "apiversion": "2016-11-01", "properties": {"newtier": "consumption", "encryptionstate": "disabled"}} |
Deploy an Azure Data Lake Store account with data encryption using Data Lake for encryption key management. | {"type": "microsoft.datalakestore/accounts", "apiversion": "2016-11-01", "name": "[parameters('accountname')]", "location": "[parameters('location')]", "properties": {"newtier": "consumption", "encryptionstate": "enabled", "encryptionconfig": {"type": "servicemanaged"}}} |
Deploy an Azure Data Lake Store account with data encryption using Azure Key Vault for encryption key management. | {"apiversion": "2016-11-01", "name": "[parameters('datalakestorename')]", "location": "[parameters('location')]", "type": "microsoft.datalakestore/accounts", "properties": {"encryptionstate": "enabled", "encryptionconfig": {"type": "usermanaged", "keyvaultmetainfo": {"keyvaultresourceid": "[resourceid(parameters('keyvaultresourcegroupname'), "microsoft.keyvault/vaults", parameters('keyvaultname'))]", "encryptionkeyname": "[parameters('keyname')]", "encryptionkeyversion": "[parameters('keyversion')]"}}}, "identity": {"type": "systemassigned"}} |
Create a new SQL logical server with Azure AD-only authentication and an Azure AD Administrator. | {"type": "microsoft.sql/servers", "apiversion": "2020-11-01-preview", "name": "[parameters('server')]", "location": "[parameters('location')]", "properties": {"administrators": {"login": "[parameters('aad_admin_name')]", "sid": "[parameters('aad_admin_objectid')]", "tenantid": "[parameters('aad_admin_tenantid')]", "principaltype": "[parameters('aad_admin_type')]", "azureadonlyauthentication": "[parameters('aad_only_auth')]"}}} |
This template allows you to deploy an Azure SQL server with Auditing enabled to write audit logs to Event Hub | {"type": "microsoft.sql/servers", "apiversion": "2019-06-01-preview", "location": "[parameters('location')]", "name": "[parameters('sqlservername')]", "properties": {"administratorlogin": "[parameters('sqladministratorlogin')]", "administratorloginpassword": "[parameters('sqladministratorloginpassword')]", "version": "12.0"}, "tags": {"displayname": "[parameters('sqlservername')]"}, "resources": [{"type": "databases", "apiversion": "2019-06-01-preview", "location": "[parameters('location')]", "dependson": ["[parameters('sqlservername')]"], "name": "master", "properties": {}}, {"type": "databases/providers/diagnosticsettings", "name": "[concat('master/microsoft.insights/",variables('diagnosticsettingsname'))]", "dependson": ["[parameters('sqlservername')]", "[resourceid('microsoft.eventhub/namespaces", parameters('eventhubnamespacename'))]", "[resourceid('microsoft.sql/servers/databases", parameters('sqlservername'), "master')]"], "apiversion": "2017-05-01-preview", "properties": {"name": "[variables('diagnosticsettingsname')]", "eventhubauthorizationruleid": "[resourceid('microsoft.eventhub/namespaces/authorizationrules", parameters('eventhubnamespacename'), parameters('eventhubauthorizationrulename'))]", "eventhubname": "[parameters('eventhubname')]", "logs": [{"category": "sqlsecurityauditevents", "enabled": true, "retentionpolicy": {"days": 0, "enabled": false}}, {"condition": "[parameters('ismsdevopsauditenabled')]", "category": "devopsoperationsaudit", "enabled": true, "retentionpolicy": {"days": 0, "enabled": false}}]}}, {"apiversion": "2017-03-01-preview", "type": "auditingsettings", "name": "defaultauditingsettings", "dependson": ["[parameters('sqlservername')]"], "properties": {"state": "enabled", "isazuremonitortargetenabled": true}}, {"condition": "[parameters('ismsdevopsauditenabled')]", "type": "devopsauditingsettings", "apiversion": "2020-08-01-preview", "name": "default", "dependson": ["[parameters('sqlservername')]"], "properties": {"state": "enabled", "isazuremonitortargetenabled": true}}]} |