-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
54 lines (47 loc) · 1.27 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
resource "azurerm_windows_web_app" "webapp" {
name = var.web_app_name
resource_group_name = var.resource_group_name
location = var.location
service_plan_id = var.service_plan_id
client_affinity_enabled = false
https_only = true
site_config {
application_stack {
dotnet_version = "v8.0"
}
ftps_state = "Disabled"
minimum_tls_version = "1.2"
scm_minimum_tls_version = "1.2"
}
}
resource "azurerm_resource_group_template_deployment" "siteextension" {
name = "siteextension-deploy"
resource_group_name = var.resource_group_name
deployment_mode = "Incremental"
depends_on = [
azurerm_windows_web_app.webapp
]
parameters_content = jsonencode({
"webAppName" = {
value = var.web_app_name
}
})
template_content = <<TEMPLATE
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Web/sites/siteextensions",
"apiVersion": "2022-09-01",
"name": "[format('{0}/{1}', variables('webAppName'), 'AppServiceProxy.SiteExtension')]"
}
]
}
TEMPLATE
}