oci_load_balancer_rule_set

This resource provides the Rule Set resource in Oracle Cloud Infrastructure Load Balancer service.

Creates a new rule set associated with the specified load balancer. For more information, see Managing Rule Sets.

Example Usage

resource "oci_load_balancer_rule_set" "test_rule_set" {
    #Required
    items {
        #Required
        action = var.rule_set_items_action

        #Optional
        allowed_methods = var.rule_set_items_allowed_methods
        are_invalid_characters_allowed = var.rule_set_items_are_invalid_characters_allowed
        conditions {
            #Required
            attribute_name = var.rule_set_items_conditions_attribute_name
            attribute_value = var.rule_set_items_conditions_attribute_value

            #Optional
            operator = var.rule_set_items_conditions_operator
        }
        default_max_connections = var.rule_set_items_default_max_connections
        description = var.rule_set_items_description
        header = var.rule_set_items_header
        http_large_header_size_in_kb = var.rule_set_items_http_large_header_size_in_kb
        ip_max_connections {

            #Optional
            ip_addresses = var.rule_set_items_ip_max_connections_ip_addresses
            max_connections = var.rule_set_items_ip_max_connections_max_connections
        }
        prefix = var.rule_set_items_prefix
        redirect_uri {

            #Optional
            host = var.rule_set_items_redirect_uri_host
            path = var.rule_set_items_redirect_uri_path
            port = var.rule_set_items_redirect_uri_port
            protocol = var.rule_set_items_redirect_uri_protocol
            query = var.rule_set_items_redirect_uri_query
        }
        response_code = var.rule_set_items_response_code
        status_code = var.rule_set_items_status_code
        suffix = var.rule_set_items_suffix
        value = var.rule_set_items_value
    }
    load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id
    name = var.rule_set_name
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported: md5-47de5f1d572359bca42ae9c1deaa4c6c

Example: example_prefix_value

  • redirect_uri - An object that defines the redirect URI applied to the original request. The object property values compose the redirect URI.

    NOTE: The Load Balancing service cannot automatically detect or avoid infinite redirects. Be sure to provide meaningful, complete, and correct field values. If any component field of this object has no value, the system retains the value from the incoming HTTP request URI.

    For example, if you specify only the protocol field https, and the incoming request URI is http://example.com:8080, the resulting runtime redirect URI is https://example.com:8080. The system retains the host and port from the incoming URI and does not automatically change the port setting from 8080 to 443.

    Be sure to configure valid percent-encoding (URL encoding) when needed.

    In addition to static string values, you can use the following tokens to construct the redirect URI. These tokens extract values from the incoming HTTP request URI.

    The tokens are case sensitive. For example, {host} is a valid token, but {HOST} is not.

    You can retain the literal characters of a token when you specify values for the path and query properties of the redirect URI. Use a backslash (\) as the escape character for the \, {, and } characters. For example, if the incoming HTTP request URI is /video, the path property value:

    /example{path}123\{path\}

    appears in the constructed redirect URI as:

    /example/video123{path}

  • response_code - The HTTP status code to return when the incoming request is redirected.

    The status line returned with the code is mapped from the standard HTTP specification. Valid response codes for redirection are:

    The default value is 302 (Found).

    Example: 301

  • status_code - The HTTP status code to return when the requested HTTP method is not in the list of allowed methods. The associated status line returned with the code is mapped from the standard HTTP specification. The default value is 405 (Method Not Allowed). Example: 403
  • suffix - A string to append to the header value. The resulting header value must still conform to RFC 7230. With the following exceptions:

    Example: example_suffix_value

  • value - A header value that conforms to RFC 7230. With the following exceptions:

    Example: example_value

  • name - The name for this set of rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_rule_set
  • Timeouts

    The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Rule Set * update - (Defaults to 20 minutes), when updating the Rule Set * delete - (Defaults to 20 minutes), when destroying the Rule Set

    Import

    RuleSets can be imported using the id, e.g.

    $ terraform import oci_load_balancer_rule_set.test_rule_set "loadBalancers/{loadBalancerId}/ruleSets/{ruleSetName}"