google::compute-region-url-map

Creates a region URL map.

Example

google::compute-region-url-map region-url-map-example
    name: "region-url-map-example"
    region: "us-central1"
    description: "Region URL map description."
    default-region-backend-service: $(google::compute-region-backend-service region-backend-service-example-region-url-map)

    host-rule
        hosts: [ "example.com" ]
        path-matcher: "abc-path"
    end

    path-matcher
        name: "abc-path"
        default-region-backend-service: $(google::compute-region-backend-service region-backend-service-example-region-url-map)
        path-rule
            region-backend-service: $(google::compute-region-backend-service region-backend-service-example-region-url-map)
            paths: [ "/abc" ]
        end
    end
end

Attributes

Attribute Description
name The name of the URL map. Must be a string 1-63 characters long and the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Valid values satisfy the regex: [(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))]. (Required)
description An optional description of this URL map.
host-rule list subresource

The list of host rules to use against the URL.

description
An optional description of this host rule.
hosts list
The list of host patterns to match. They must be valid hostnames, except * will match any string of lowercase letters, numbers, -, and .. In that case, * must be the first character and must be followed in the pattern by either - or .. (Required)
path-matcher
The name of the path matcher to use to match the path portion of the URL if the host rule matches the URL’s host portion. (Required)
path-matcher list subresource

The list of named path matchers to use against the URL.

name
The name to which this path matcher is referred by the host rule. (Required)
description
An optional description of this path matcher.
default-backend-bucket
The default backend bucket resource to which traffic is directed if none of the host rules match. Cannot be set if any of default-backend-service or default-region-backend-service is set.
default-backend-service
The default backend service resource to which traffic is directed if none of the host rules match. Cannot be set if any of default-backend-bucket or default-region-backend-service is set.
default-region-backend-service
The default region backend service resource to which traffic is directed if none of the host rules match. Cannot be set if any of default-backend-bucket or default-backend-service is set.
path-rule list subresource

The list of path rules.

backend-bucket
The backend bucket resource to which traffic is directed if this rule is matched. Cannot be set if any of backend-service or region-backend-service is set.
backend-service
The backend service resource to which traffic is directed if this rule is matched. Cannot be set if any of backend-bucket or region-backend-service is set.
region-backend-service
The region backend service resource to which traffic is directed if this rule is matched. Cannot be set if any of backend-bucket or backend-service is set.
paths list
The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #`, and those chars are not allowed here.
url-redirect subresource

The url redirect configuration.

host-redirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
path-redirect
The path that will be used in the redirect response instead of the one that was supplied in the request.
prefix-redirect
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
redirect-response-code
The HTTP Status code to use for this RedirectAction.
https-redirect
If set to true, the URL scheme in the redirected request is set to https.
strip-query
If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
default-url-redirect subresource

The default url redirect configuration.

host-redirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
path-redirect
The path that will be used in the redirect response instead of the one that was supplied in the request.
prefix-redirect
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
redirect-response-code
The HTTP Status code to use for this RedirectAction.
https-redirect
If set to true, the URL scheme in the redirected request is set to https.
strip-query
If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
default-http-redirect-action subresource

The default http redirect action configuration.

host-redirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
path-redirect
The path that will be used in the redirect response instead of the one that was supplied in the request.
prefix-redirect
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
redirect-response-code
The HTTP Status code to use for this RedirectAction.
https-redirect
If set to true, the URL scheme in the redirected request is set to https.
strip-query
If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
region The region for the URL map. (Required)
default-region-backend-service The default region backend service resource to which traffic is directed if none of the host rules match. (Required)

Outputs

Attribute Description
self-link Server-defined URL for the resource.
fingerprint The fingerprint for the URL map, which is a hash of the contents of the resource.