Skip to content

Commit

Permalink
Add example for Microsoft.Web_sites_siteextensions@2022-09-01 (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei authored Feb 7, 2025
1 parent b1cbabb commit 90a17d3
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions examples/Microsoft.Web_sites_siteextensions@2022-09-01/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "resource_name" {
type = string
default = "acctest0001"
}

variable "resource_site_name" {
type = string
default = "acctestsite0001"
}

variable "location" {
type = string
default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}

resource "azapi_resource" "serverfarm" {
type = "Microsoft.Web/serverfarms@2022-09-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
hyperV = false
perSiteScaling = false
reserved = false
zoneRedundant = false
}
sku = {
name = "S1"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}

resource "azapi_resource" "site" {
type = "Microsoft.Web/sites@2022-09-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_site_name
location = var.location
body = {
properties = {
clientAffinityEnabled = false
clientCertEnabled = false
clientCertMode = "Required"
enabled = true
httpsOnly = false
publicNetworkAccess = "Enabled"
serverFarmId = azapi_resource.serverfarm.id
siteConfig = {
acrUseManagedIdentityCreds = false
alwaysOn = true
autoHealEnabled = false
ftpsState = "Disabled"
http20Enabled = false
loadBalancing = "LeastRequests"
localMySqlEnabled = false
managedPipelineMode = "Integrated"
minTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
remoteDebuggingEnabled = false
scmIpSecurityRestrictionsUseMain = false
scmMinTlsVersion = "1.2"
use32BitWorkerProcess = true
vnetRouteAllEnabled = false
webSocketsEnabled = false
windowsFxVersion = ""
}
vnetRouteAllEnabled = false
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}

resource "azapi_resource" "dynatraceSiteExtension" {
type = "Microsoft.Web/sites/siteextensions@2022-09-01"
parent_id = azapi_resource.site.id
name = "Dynatrace"
location = var.location
schema_validation_enabled = false
response_export_values = ["*"]
}

0 comments on commit 90a17d3

Please sign in to comment.