L7RuleV2

Manages a V2 L7 Rule resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
        {
            AdminStateUp = true,
        });
        var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
        {
            Cidr = "192.168.199.0/24",
            IpVersion = 4,
            NetworkId = network1.Id,
        });
        var loadbalancer1 = new OpenStack.LoadBalancer.LoadBalancer("loadbalancer1", new OpenStack.LoadBalancer.LoadBalancerArgs
        {
            VipSubnetId = subnet1.Id,
        });
        var listener1 = new OpenStack.LoadBalancer.Listener("listener1", new OpenStack.LoadBalancer.ListenerArgs
        {
            LoadbalancerId = loadbalancer1.Id,
            Protocol = "HTTP",
            ProtocolPort = 8080,
        });
        var pool1 = new OpenStack.LoadBalancer.Pool("pool1", new OpenStack.LoadBalancer.PoolArgs
        {
            LbMethod = "ROUND_ROBIN",
            LoadbalancerId = loadbalancer1.Id,
            Protocol = "HTTP",
        });
        var l7policy1 = new OpenStack.LoadBalancer.L7PolicyV2("l7policy1", new OpenStack.LoadBalancer.L7PolicyV2Args
        {
            Action = "REDIRECT_TO_URL",
            Description = "test description",
            ListenerId = listener1.Id,
            Position = 1,
            RedirectUrl = "http://www.example.com",
        });
        var l7rule1 = new OpenStack.LoadBalancer.L7RuleV2("l7rule1", new OpenStack.LoadBalancer.L7RuleV2Args
        {
            CompareType = "EQUAL_TO",
            L7policyId = l7policy1.Id,
            Type = "PATH",
            Value = "/api",
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
    cidr="192.168.199.0/24",
    ip_version=4,
    network_id=network1.id)
loadbalancer1 = openstack.loadbalancer.LoadBalancer("loadbalancer1", vip_subnet_id=subnet1.id)
listener1 = openstack.loadbalancer.Listener("listener1",
    loadbalancer_id=loadbalancer1.id,
    protocol="HTTP",
    protocol_port=8080)
pool1 = openstack.loadbalancer.Pool("pool1",
    lb_method="ROUND_ROBIN",
    loadbalancer_id=loadbalancer1.id,
    protocol="HTTP")
l7policy1 = openstack.loadbalancer.L7PolicyV2("l7policy1",
    action="REDIRECT_TO_URL",
    description="test description",
    listener_id=listener1.id,
    position=1,
    redirect_url="http://www.example.com")
l7rule1 = openstack.loadbalancer.L7RuleV2("l7rule1",
    compare_type="EQUAL_TO",
    l7policy_id=l7policy1.id,
    type="PATH",
    value="/api")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    cidr: "192.168.199.0/24",
    ipVersion: 4,
    networkId: network1.id,
});
const loadbalancer1 = new openstack.loadbalancer.LoadBalancer("loadbalancer_1", {
    vipSubnetId: subnet1.id,
});
const listener1 = new openstack.loadbalancer.Listener("listener_1", {
    loadbalancerId: loadbalancer1.id,
    protocol: "HTTP",
    protocolPort: 8080,
});
const pool1 = new openstack.loadbalancer.Pool("pool_1", {
    lbMethod: "ROUND_ROBIN",
    loadbalancerId: loadbalancer1.id,
    protocol: "HTTP",
});
const l7policy1 = new openstack.loadbalancer.L7PolicyV2("l7policy_1", {
    action: "REDIRECT_TO_URL",
    description: "test description",
    listenerId: listener1.id,
    position: 1,
    redirectUrl: "http://www.example.com",
});
const l7rule1 = new openstack.loadbalancer.L7RuleV2("l7rule_1", {
    compareType: "EQUAL_TO",
    l7policyId: l7policy1.id,
    type: "PATH",
    value: "/api",
});

Create a L7RuleV2 Resource

def L7RuleV2(resource_name, opts=None, admin_state_up=None, compare_type=None, invert=None, key=None, l7policy_id=None, region=None, tenant_id=None, type=None, value=None, __props__=None);
func NewL7RuleV2(ctx *Context, name string, args L7RuleV2Args, opts ...ResourceOption) (*L7RuleV2, error)
public L7RuleV2(string name, L7RuleV2Args args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args L7RuleV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args L7RuleV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args L7RuleV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

L7RuleV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The L7RuleV2 resource accepts the following input properties:

CompareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

L7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

Type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

Value string

The value to use for the comparison. For example, the file type to compare.

AdminStateUp bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

Invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

Key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

TenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

CompareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

L7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

Type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

Value string

The value to use for the comparison. For example, the file type to compare.

AdminStateUp bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

Invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

Key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

TenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

compareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

l7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

value string

The value to use for the comparison. For example, the file type to compare.

adminStateUp boolean

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

invert boolean

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

tenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

compare_type str

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

l7policy_id str

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

type str

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

value str

The value to use for the comparison. For example, the file type to compare.

admin_state_up bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

key str

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

tenant_id str

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the L7RuleV2 resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ListenerId string

The ID of the Listener owning this resource.

Id string
The provider-assigned unique ID for this managed resource.
ListenerId string

The ID of the Listener owning this resource.

id string
The provider-assigned unique ID for this managed resource.
listenerId string

The ID of the Listener owning this resource.

id str
The provider-assigned unique ID for this managed resource.
listener_id str

The ID of the Listener owning this resource.

Look up an Existing L7RuleV2 Resource

Get an existing L7RuleV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: L7RuleV2State, opts?: CustomResourceOptions): L7RuleV2
static get(resource_name, id, opts=None, admin_state_up=None, compare_type=None, invert=None, key=None, l7policy_id=None, listener_id=None, region=None, tenant_id=None, type=None, value=None, __props__=None);
func GetL7RuleV2(ctx *Context, name string, id IDInput, state *L7RuleV2State, opts ...ResourceOption) (*L7RuleV2, error)
public static L7RuleV2 Get(string name, Input<string> id, L7RuleV2State? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AdminStateUp bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

CompareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

Invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

Key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

L7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

ListenerId string

The ID of the Listener owning this resource.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

TenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

Type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

Value string

The value to use for the comparison. For example, the file type to compare.

AdminStateUp bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

CompareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

Invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

Key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

L7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

ListenerId string

The ID of the Listener owning this resource.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

TenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

Type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

Value string

The value to use for the comparison. For example, the file type to compare.

adminStateUp boolean

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

compareType string

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

invert boolean

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

key string

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

l7policyId string

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

listenerId string

The ID of the Listener owning this resource.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

tenantId string

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

type string

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

value string

The value to use for the comparison. For example, the file type to compare.

admin_state_up bool

The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).

compare_type str

The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX

invert bool

When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.

key str

The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.

l7policy_id str

The ID of the L7 Policy to query. Changing this creates a new L7 Rule.

listener_id str

The ID of the Listener owning this resource.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.

tenant_id str

Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

type str

The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.

value str

The value to use for the comparison. For example, the file type to compare.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.