consul_config_entry_service_router (Resource)

The consul_config_entry_service_router resource configures a service router to redirect a traffic request for a service to one or more specific service instances.

Example Usage

resource "consul_config_entry_service_defaults" "admin_service_defaults" {
  name     = "web"
  protocol = "http"
}

resource "consul_config_entry_service_defaults" "admin_service_defaults" {
  name     = "dashboard"
  protocol = "http"
}


resource "consul_config_entry_service_router" "foo" {
  name = consul_config_entry.web.name

  routes {
    match {
      http {
        path_prefix = "/admin"
      }
    }

    destination {
      service = consul_config_entry.admin_service.name
    }
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for routes

Optional:

Nested Schema for routes.destination

Optional:

Nested Schema for routes.destination.request_headers

Optional:

Nested Schema for routes.destination.response_headers

Optional:

Nested Schema for routes.match

Optional:

Nested Schema for routes.match.http

Optional:

Nested Schema for routes.match.http.header

Optional:

Nested Schema for routes.match.http.query_param

Optional: