Skip to content

Commit

Permalink
removing info
Browse files Browse the repository at this point in the history
  • Loading branch information
donovm4 committed Oct 25, 2024
1 parent ae5e925 commit 6d323ff
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 404 deletions.
436 changes: 218 additions & 218 deletions examples/auto_heal_enabled/README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/auto_heal_enabled/_footer.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
6 changes: 3 additions & 3 deletions examples/auto_heal_enabled/_header.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Default example

This deploys the module as a Linux Web App utilizing auto heal settings.
# Default example

This deploys the module as a Linux Web App utilizing auto heal settings.
10 changes: 5 additions & 5 deletions examples/auto_heal_enabled/locals.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
azure_regions = [
"eastus",
"westus"
]
locals {
azure_regions = [
"eastus",
"westus"
]
}
179 changes: 87 additions & 92 deletions examples/auto_heal_enabled/main.tf
Original file line number Diff line number Diff line change
@@ -1,92 +1,87 @@
## Section to provide a random Azure region for the resource group
# This allows us to randomize the region for the resource group.
module "regions" {
source = "Azure/regions/azurerm"
version = ">= 0.3.0"
}

# This allows us to randomize the region for the resource group.
resource "random_integer" "region_index" {
max = length(local.azure_regions) - 1
min = 0
}
## End of section to provide a random Azure region for the resource group

# This ensures we have unique CAF compliant names for our resources.
module "naming" {
source = "Azure/naming/azurerm"
version = ">= 0.3.0"
}

module "avm_res_resources_resourcegroup" {
source = "Azure/avm-res-resources-resourcegroup/azurerm"
version = "0.1.0"

location = local.azure_regions[random_integer.region_index.result]
name = module.naming.resource_group.name_unique
}

module "avm_res_web_serverfarm" {
source = "Azure/avm-res-web-serverfarm/azurerm"
version = "0.2.0"

enable_telemetry = var.enable_telemetry

name = module.naming.app_service_plan.name_unique
resource_group_name = module.avm_res_resources_resourcegroup.name
location = module.avm_res_resources_resourcegroup.resource.location
os_type = "Linux"

}

module "avm_res_web_site" {
source = "../../"

# source = "Azure/avm-res-web-site/azurerm"
# version = "0.11.0"

enable_telemetry = var.enable_telemetry

name = "${module.naming.function_app.name_unique}-auto-heal"
resource_group_name = module.avm_res_resources_resourcegroup.name
location = module.avm_res_resources_resourcegroup.resource.location

kind = "webapp"

os_type = module.avm_res_web_serverfarm.resource.os_type
service_plan_resource_id = module.avm_res_web_serverfarm.resource_id

site_config = {
auto_heal_enabled = true # `auto_heal_enabled` deprecated in azurerm 4.x
}
auto_heal_setting = { # auto_heal_setting should only be specified if auto_heal_enabled is set to `true`
setting_1 = {
action = {
action_type = "Recycle"
minimum_process_execution_time = "00:01:00"
}
trigger = {
requests = {
count = 100
interval = "00:00:30"
}
status_code = {
status_5000 = {
count = 5000
interval = "00:05:00"
path = "/HealthCheck"
status_code_range = 500
sub_status = 0
}
status_6000 = {
count = 6000
interval = "00:05:00"
path = "/Get"
status_code_range = 500
sub_status = 0
}
}
}
}
}
}
## Section to provide a random Azure region for the resource group
# This allows us to randomize the region for the resource group.
module "regions" {
source = "Azure/regions/azurerm"
version = ">= 0.3.0"
}

# This allows us to randomize the region for the resource group.
resource "random_integer" "region_index" {
max = length(local.azure_regions) - 1
min = 0
}
## End of section to provide a random Azure region for the resource group

# This ensures we have unique CAF compliant names for our resources.
module "naming" {
source = "Azure/naming/azurerm"
version = ">= 0.3.0"
}

resource "azurerm_resource_group" "example" {
location = local.azure_regions[random_integer.region_index.result]
name = module.naming.resource_group.name_unique
}

resource "azurerm_service_plan" "example" {
name = module.naming.app_service_plan.name_unique
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
os_type = "Linux"
sku_name = "P1v2"
tags = {
app = "${module.naming.function_app.name_unique}-default"
}
}

module "avm_res_web_site" {
source = "../../"

# source = "Azure/avm-res-web-site/azurerm"
# version = "0.11.0"

enable_telemetry = var.enable_telemetry

name = "${module.naming.function_app.name_unique}-auto-heal"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location

kind = "webapp"

os_type = azurerm_service_plan.example.os_type
service_plan_resource_id = azurerm_service_plan.example.id

site_config = {

}
auto_heal_setting = { # auto_heal_setting should only be specified if auto_heal_enabled is set to `true`
setting_1 = {
action = {
action_type = "Recycle"
minimum_process_execution_time = "00:01:00"
}
trigger = {
requests = {
count = 100
interval = "00:00:30"
}
status_code = {
status_5000 = {
count = 5000
interval = "00:05:00"
path = "/HealthCheck"
status_code_range = 500
sub_status = 0
}
status_6000 = {
count = 6000
interval = "00:05:00"
path = "/Get"
status_code_range = 500
sub_status = 0
}
}
}
}
}
}
102 changes: 51 additions & 51 deletions examples/auto_heal_enabled/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
output "active_slot" {
description = "ID of active slot"
value = module.avm_res_web_site.web_app_active_slot
}

output "deployment_slots" {
description = "Full output of deployment slots created"
sensitive = true
value = module.avm_res_web_site.web_app_deployment_slots
}

output "location" {
description = "This is the full output for the resource."
value = module.avm_res_web_site.location
}

output "name" {
description = "This is the full output for the resource."
value = module.avm_res_web_site.name
}

output "resource_id" {
description = "This is the full output for the resource."
sensitive = true
value = module.avm_res_web_site.resource_id
}

output "service_plan_id" {
description = "The ID of the app service"
value = module.avm_res_web_serverfarm.resource_id
}

output "service_plan_name" {
description = "Full output of service plan created"
value = module.avm_res_web_serverfarm.name
}

output "sku_name" {
description = "The number of workers"
value = module.avm_res_web_serverfarm.resource.sku_name
}

output "worker_count" {
description = "The number of workers"
value = module.avm_res_web_serverfarm.resource.worker_count
}

output "zone_redundant" {
description = "The number of workers"
value = module.avm_res_web_serverfarm.resource.zone_balancing_enabled
}
output "active_slot" {
description = "ID of active slot"
value = module.avm_res_web_site.web_app_active_slot
}

output "deployment_slots" {
description = "Full output of deployment slots created"
sensitive = true
value = module.avm_res_web_site.web_app_deployment_slots
}

output "location" {
description = "This is the full output for the resource."
value = module.avm_res_web_site.location
}

output "name" {
description = "This is the full output for the resource."
value = module.avm_res_web_site.name
}

output "resource_id" {
description = "This is the full output for the resource."
sensitive = true
value = module.avm_res_web_site.resource_id
}

output "service_plan_id" {
description = "The ID of the app service"
value = azurerm_service_plan.example.id
}

output "service_plan_name" {
description = "Full output of service plan created"
value = azurerm_service_plan.example.name
}

output "sku_name" {
description = "The number of workers"
value = azurerm_service_plan.example.sku_name
}

output "worker_count" {
description = "The number of workers"
value = azurerm_service_plan.example.worker_count
}

output "zone_redundant" {
description = "The number of workers"
value = azurerm_service_plan.example.zone_balancing_enabled
}
45 changes: 24 additions & 21 deletions examples/auto_heal_enabled/terraform.tf
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
terraform {
required_version = ">= 1.6.1"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.7.0, < 4.0.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.5.0, < 4.0.0"
}
}
}

# tflint-ignore: terraform_module_provider_declaration, terraform_output_separate, terraform_variable_separate
provider "azurerm" {
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
terraform {
required_version = ">= 1.9.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.5.0, < 4.0.0"
}
}
}

# tflint-ignore: terraform_module_provider_declaration, terraform_output_separate, terraform_variable_separate
provider "azurerm" {
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}

subscription_id = ""

}
18 changes: 9 additions & 9 deletions examples/auto_heal_enabled/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "enable_telemetry" {
type = bool
default = true
description = <<DESCRIPTION
This variable controls whether or not telemetry is enabled for the module.
For more information see <https://aka.ms/avm/telemetryinfo>.
If it is set to false, then no telemetry will be collected.
DESCRIPTION
}
variable "enable_telemetry" {
type = bool
default = true
description = <<DESCRIPTION
This variable controls whether or not telemetry is enabled for the module.
For more information see <https://aka.ms/avm/telemetryinfo>.
If it is set to false, then no telemetry will be collected.
DESCRIPTION
}
4 changes: 3 additions & 1 deletion examples/default/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ provider "azurerm" {
prevent_deletion_if_contains_resources = false
}
}
subscription_id = "d717cc8e-8af6-4764-bb9a-c86a529be857"

subscription_id = ""

}

0 comments on commit 6d323ff

Please sign in to comment.