Skip to content

Latest commit

 

History

History
96 lines (81 loc) · 8.69 KB

README.md

File metadata and controls

96 lines (81 loc) · 8.69 KB

Terraform Module - Azure - Linux Web App

Table of Contents

  1. Usage
  2. Requirements
  3. Inputs
  4. Outputs
  5. Resources
  6. Modules

Usage

This Terraform configuration will create a Linux web app using a container for its runtime. It is able to utilize a subnet optionally and enables the usage of identities.

Once deployed, management is expected to be through another medium, so changes to the application stack will be ignored.

Requirements

Name Version
terraform >= 1.3.0
azurerm ~> 3.0
time ~> 0.7

Inputs

Name Description Type Default Required
name The name of the app service. string n/a yes
allowed_frontdoor_ids A list of allowed frontdoor IDs. list(string) [] no
allowed_ips A list of allowed CIDR ranges. list(string) [] no
allowed_scm_ips A list of SCM allowed CIDR ranges. list(string) [] no
allowed_scm_service_tags A list of SCM allowed service tags. list(string) [] no
allowed_scm_subnet_ids A list of SCM allowed subnet IDs. list(string) [] no
allowed_service_tags A list of allowed service tags. list(string) [] no
allowed_subnet_ids A list of allowed subnet IDs. list(string) [] no
app_settings A map of app settings. map(string) {} no
application_stack A map detailing the application stack. map(string)
{
"docker_image": "mcr.microsoft.com/appsvc/staticsite",
"docker_image_tag": "latest"
}
no
connection_strings A list of connection string objects.
list(object({
name = string
type = string
value = string
}))
[] no
cors Cross origin resource sharing configuration.
object({
allowed_origins = list(string)
support_credentials = optional(bool, null)
})
null no
create_application_insights Create an instance of Log Analytics and Application Insights for the app service. bool true no
default_documents A list of strings for default documents. list(string) null no
identity_ids A list of user identity IDs to use for the app service. list(string) [] no
key_vault_identity_id The user managed identity used for key vault. string null no
location The location of created resources. string "uksouth" no
log_config The log configuration to use with this app service.
object({
detailed_error_messages = optional(bool, false)
failed_request_tracing = optional(bool, false)
retention_in_days = optional(number, 7)
storage_account_name = optional(string)
storage_account_rg = optional(string)
})
{
"detailed_error_messages": false,
"failed_request_tracing": false,
"retention_in_days": 7
}
no
log_level The log level to use with this app service. string "Error" no
plan Object detailing the plan, if creating one with this module.
object({
create = optional(bool, true)
id = optional(string)
name = optional(string)
sku_name = optional(string, "B1")
zone_balancing = optional(bool, false)
})
{} no
resource_group_name The name of the resource group this module will use. string null no
site_config A map with site config values. map(any) {} no
slots Names for slots that are clones of the app. set(string) [] no
sticky_app_settings A list of sticky app_setting values. list(string) [] no
sticky_connection_strings A list of sticky connection_strings values. list(string) [] no
subnet_id The subnet to deploy this app service to. string null no
tags Tags applied to created resources. map(string) null no
zip_deploy_file Path to a zip file to deploy to the app service. string null no

Outputs

Name Description
app_service_plan_id ID of the service plan.
fqdn Default FQDN of the app service.
id ID of the app service.
identity Identity of the app service.
location Location of the app service.
name Name of the app service.
resource_group_name Name of the resource group.
slots Object of objects containing details for the created slots.

Resources

Name Type
azurerm_application_insights.main resource
azurerm_linux_web_app.main resource
azurerm_linux_web_app_slot.main resource
azurerm_log_analytics_workspace.main resource
azurerm_resource_group.main resource
azurerm_service_plan.main resource
azurerm_storage_account.logs resource
azurerm_storage_container.logs resource
time_rotating.logs resource
azurerm_storage_account.logs data source
azurerm_storage_account_blob_container_sas.logs data source

Modules

No modules.


Classified
PUBLIC