@@ -24,69 +24,76 @@ module "naming" {
2424 version = ">= 0.3.0"
2525}
2626
27- # This is required for resource modules
28- resource "azurerm_resource_group" "example" {
27+ module "avm_res_resources_resourcegroup" {
28+ source = "Azure/avm-res-resources-resourcegroup/azurerm"
29+ version = "0.1.0"
30+
2931 location = local.azure_regions[random_integer.region_index.result]
3032 name = module.naming.resource_group.name_unique
3133}
3234
33- module "test" {
35+ module "avm_res_web_serverfarm" {
36+ source = "Azure/avm-res-web-serverfarm/azurerm"
37+ version = "0.2.0"
38+
39+ enable_telemetry = var.enable_telemetry
40+
41+ name = module.naming.app_service_plan.name_unique
42+ resource_group_name = module.avm_res_resources_resourcegroup.name
43+ location = module.avm_res_resources_resourcegroup.resource.location
44+ os_type = "Linux"
45+
46+ }
47+
48+ module "avm_res_web_site" {
3449 source = "../../"
3550
3651 # source = "Azure/avm-res-web-site/azurerm"
37- # version = "0.10.1 "
52+ # version = "0.11.0 "
3853
3954 enable_telemetry = var.enable_telemetry
4055
41- name = "${module.naming.function_app.name_unique}-slots "
42- resource_group_name = azurerm_resource_group.example .name
43- location = azurerm_resource_group.example .location
56+ name = "${module.naming.function_app.name_unique}-auto-heal "
57+ resource_group_name = module.avm_res_resources_resourcegroup .name
58+ location = module.avm_res_resources_resourcegroup.resource .location
4459
45- kind = "webapp"
46- os_type = "Linux"
60+ kind = "webapp"
4761
48- site_config = {
49- # auto_heal_enabled = true
50- # auto_heal_enabled = false # This will throw a module and provider error.
51- auto_heal_enabled = null # `auto_heal_setting` cannot be set if `auto_heal_enabled` is set to `null`. `null` is the default value for `auto_heal_enabled`
62+ os_type = module.avm_res_web_serverfarm.resource.os_type
63+ service_plan_resource_id = module.avm_res_web_serverfarm.resource_id
5264
65+ site_config = {
66+ auto_heal_enabled = true # `auto_heal_enabled` deprecated in azurerm 4.x
5367 }
5468 auto_heal_setting = { # auto_heal_setting should only be specified if auto_heal_enabled is set to `true`
55- # setting_1 = {
56- # action = {
57- # action_type = "Recycle"
58- # minimum_process_execution_time = "00:01:00"
59- # }
60- # trigger = {
61- # requests = {
62- # count = 100
63- # interval = "00:00:30"
64- # }
65- # status_code = {
66- # status_5000 = {
67- # count = 5000
68- # interval = "00:05:00"
69- # path = "/HealthCheck"
70- # status_code_range = 500
71- # sub_status = 0
72- # }
73- # status_6000 = {
74- # count = 6000
75- # interval = "00:05:00"
76- # path = "/Get"
77- # status_code_range = 500
78- # sub_status = 0
79- # }
80- # }
81- # }
82- # }
83- }
84-
85- # Creates a new app service plan
86- create_service_plan = true
87- new_service_plan = {
88- sku_name = var.sku_for_testing
89- zone_balancing_enabled = var.redundancy_for_testing
69+ setting_1 = {
70+ action = {
71+ action_type = "Recycle"
72+ minimum_process_execution_time = "00:01:00"
73+ }
74+ trigger = {
75+ requests = {
76+ count = 100
77+ interval = "00:00:30"
78+ }
79+ status_code = {
80+ status_5000 = {
81+ count = 5000
82+ interval = "00:05:00"
83+ path = "/HealthCheck"
84+ status_code_range = 500
85+ sub_status = 0
86+ }
87+ status_6000 = {
88+ count = 6000
89+ interval = "00:05:00"
90+ path = "/Get"
91+ status_code_range = 500
92+ sub_status = 0
93+ }
94+ }
95+ }
96+ }
9097 }
9198}
9299```
@@ -106,7 +113,6 @@ The following requirements are needed by this module:
106113
107114The following resources are used by this module:
108115
109- - [ azurerm_resource_group.example] ( https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group ) (resource)
110116- [ random_integer.region_index] ( https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer ) (resource)
111117
112118<!-- markdownlint-disable MD013 -->
@@ -128,22 +134,6 @@ Type: `bool`
128134
129135Default: ` true `
130136
131- ### <a name =" input_redundancy_for_testing " ></a > [ redundancy\_ for\_ testing] ( #input\_ redundancy\_ for\_ testing )
132-
133- Description: n/a
134-
135- Type: ` string `
136-
137- Default: ` "false" `
138-
139- ### <a name =" input_sku_for_testing " ></a > [ sku\_ for\_ testing] ( #input\_ sku\_ for\_ testing )
140-
141- Description: n/a
142-
143- Type: ` string `
144-
145- Default: ` "S1" `
146-
147137## Outputs
148138
149139The following outputs are exported:
@@ -156,22 +146,60 @@ Description: ID of active slot
156146
157147Description: Full output of deployment slots created
158148
149+ ### <a name =" output_location " ></a > [ location] ( #output\_ location )
150+
151+ Description: This is the full output for the resource.
152+
159153### <a name =" output_name " ></a > [ name] ( #output\_ name )
160154
161155Description: This is the full output for the resource.
162156
163- ### <a name =" output_resource " ></a > [ resource] ( #output\_ resource )
157+ ### <a name =" output_resource_id " ></a > [ resource\_ id ] ( #output\_ resource\_ id )
164158
165159Description: This is the full output for the resource.
166160
167- ### <a name =" output_storage_account " ></a > [ storage\_ account] ( #output\_ storage\_ account )
161+ ### <a name =" output_service_plan_id " ></a > [ service\_ plan\_ id] ( #output\_ service\_ plan\_ id )
162+
163+ Description: The ID of the app service
168164
169- Description: Full output of storage account created
165+ ### <a name =" output_service_plan_name " ></a > [ service\_ plan\_ name] ( #output\_ service\_ plan\_ name )
166+
167+ Description: Full output of service plan created
168+
169+ ### <a name =" output_sku_name " ></a > [ sku\_ name] ( #output\_ sku\_ name )
170+
171+ Description: The number of workers
172+
173+ ### <a name =" output_worker_count " ></a > [ worker\_ count] ( #output\_ worker\_ count )
174+
175+ Description: The number of workers
176+
177+ ### <a name =" output_zone_redundant " ></a > [ zone\_ redundant] ( #output\_ zone\_ redundant )
178+
179+ Description: The number of workers
170180
171181## Modules
172182
173183The following Modules are called:
174184
185+ ### <a name =" module_avm_res_resources_resourcegroup " ></a > [ avm\_ res\_ resources\_ resourcegroup] ( #module\_ avm\_ res\_ resources\_ resourcegroup )
186+
187+ Source: Azure/avm-res-resources-resourcegroup/azurerm
188+
189+ Version: 0.1.0
190+
191+ ### <a name =" module_avm_res_web_serverfarm " ></a > [ avm\_ res\_ web\_ serverfarm] ( #module\_ avm\_ res\_ web\_ serverfarm )
192+
193+ Source: Azure/avm-res-web-serverfarm/azurerm
194+
195+ Version: 0.2.0
196+
197+ ### <a name =" module_avm_res_web_site " ></a > [ avm\_ res\_ web\_ site] ( #module\_ avm\_ res\_ web\_ site )
198+
199+ Source: ../../
200+
201+ Version:
202+
175203### <a name =" module_naming " ></a > [ naming] ( #module\_ naming )
176204
177205Source: Azure/naming/azurerm
@@ -184,12 +212,6 @@ Source: Azure/regions/azurerm
184212
185213Version: >= 0.3.0
186214
187- ### <a name =" module_test " ></a > [ test] ( #module\_ test )
188-
189- Source: ../../
190-
191- Version:
192-
193215<!-- markdownlint-disable-next-line MD041 -->
194216## Data Collection
195217
0 commit comments