Google App Engine Application URL Dispatch Rules

This page shows how to write Terraform for App Engine Application URL Dispatch Rules and write them securely.

google_app_engine_application_url_dispatch_rules (Terraform)

The Application URL Dispatch Rules in App Engine can be configured in Terraform with the resource name google_app_engine_application_url_dispatch_rules. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "google_app_engine_application_url_dispatch_rules" "dispatch_rules" {
  dispatch_rules {
    domain  = var.domain
    path    = var.path
    service = var.service
  }
main.tf#L1
resource "google_app_engine_application_url_dispatch_rules" "application_url_dispatch_rules" {
  count   = length(var.application_url_dispatch_rules)
  project = var.project

  dynamic "dispatch_rules" {
    for_each = lookup(var.application_url_dispatch_rules[count.index], "dispatch_rules")
main.tf#L7
resource "google_app_engine_application_url_dispatch_rules" "this" {
  project = var.project

  dynamic "dispatch_rules" {
    for_each = var.dispatch_rules
    content {
main.tf#L33
resource "google_app_engine_application_url_dispatch_rules" "app" {
  project = var.project_id

  dispatch_rules {
    path    = "/*"
    domain  = var.services.app_engine_standard.domain

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

  • id optional computed - string
  • project optional computed - string
  • dispatch_rules list block

    Domain name to match against. The wildcard "" is supported if specified before a period: ".". Defaults to matching all domains: "*".

    Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.

    Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.

  • timeouts single block

Explanation in Terraform Registry

Rules to match an HTTP request and dispatch that request to a service. To get more information about ApplicationUrlDispatchRules, see:

Frequently asked questions

What is Google App Engine Application URL Dispatch Rules?

Google App Engine Application URL Dispatch Rules is a resource for App Engine of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google App Engine Application URL Dispatch Rules?

For Terraform, the bhidalto/terraform-appengine, mikamakusa/terraform and niveklabs/google source code examples are useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.