Skip to content

saif-resources / webapp-route

Composes a Front Door origin group, origin (with Private Link), and route for a web application. Used by saif-web-service to wire a web app into the org-level Front Door profile.

Usage

module "webapp_route" {
  source  = "app.terraform.io/SAIFCorp/resources/saif//modules/webapp-route"
  version = "~> 3.5.0"

  context          = module.environment.context
  application_name = var.application_name
  webapp_hostname  = module.webapp.web_app_default_hostname
  webapp_id        = module.webapp.web_app_id
  is_external_app  = var.is_external_app
}

Inputs

Name Description Type Required
context Platform context from the environment module any yes
application_name Application name used for origin group/origin naming and route path string yes
webapp_hostname The web app's default hostname string yes
webapp_id The web app's resource ID (for Private Link) string yes
is_external_app Whether this app routes through the external Front Door endpoint bool no
private_link_location Azure region for the Private Link connection string no
origin_path Origin path prefix. Defaults to /{application_name}/ string no

Outputs

Name Description
origin_group_id The Front Door origin group resource ID
origin_id The Front Door origin resource ID
route_id The Front Door route resource ID

Providers

Name Version
azurerm >= 4.0, < 5.0

Inputs

Name Description Type Default Required
application_name Application name used for origin group/origin naming and route path string n/a yes
context Platform context from the environment module any n/a yes
is_external_app Whether this app routes through the external Front Door endpoint (vs internal) bool false no
origin_path Origin path prefix appended to the route (e.g. '/appname/'). Defaults to '/{application_name}/'. string null no
private_link_location Azure region for the Private Link connection (must match the region where the origin resource is deployed, typically westus3 for SAIF) string "westus3" no
webapp_hostname The web app's default hostname (from module.webapp output) string n/a yes
webapp_id The web app's resource ID (for Private Link connectivity) string n/a yes

Outputs

Name Description
origin_group_id The Front Door origin group resource ID
origin_id The Front Door origin resource ID
route_id The Front Door route resource ID

Resources

  • resource.azurerm_cdn_frontdoor_custom_domain_association.main (/terraform-docs/modules/webapp-route/main.tf#83)
  • resource.azurerm_cdn_frontdoor_origin.origin (/terraform-docs/modules/webapp-route/main.tf#44)
  • resource.azurerm_cdn_frontdoor_origin_group.origin_group (/terraform-docs/modules/webapp-route/main.tf#29)

View source on GitHub