L7PolicyV2
Manages a Load Balancer L7 Policy 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_POOL",
Description = "test l7 policy",
ListenerId = listener1.Id,
Position = 1,
RedirectPoolId = pool1.Id,
});
}
}
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_POOL",
description="test l7 policy",
listener_id=listener1.id,
position=1,
redirect_pool_id=pool1.id)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_POOL",
description: "test l7 policy",
listenerId: listener1.id,
position: 1,
redirectPoolId: pool1.id,
});Create a L7PolicyV2 Resource
new L7PolicyV2(name: string, args: L7PolicyV2Args, opts?: CustomResourceOptions);def L7PolicyV2(resource_name, opts=None, action=None, admin_state_up=None, description=None, listener_id=None, name=None, position=None, redirect_pool_id=None, redirect_url=None, region=None, tenant_id=None, __props__=None);func NewL7PolicyV2(ctx *Context, name string, args L7PolicyV2Args, opts ...ResourceOption) (*L7PolicyV2, error)public L7PolicyV2(string name, L7PolicyV2Args args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args L7PolicyV2Args
- 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 L7PolicyV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args L7PolicyV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
L7PolicyV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The L7PolicyV2 resource accepts the following input properties:
- Action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Admin
State boolUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
Human-readable description for the L7 Policy.
- Name string
Human-readable name for the L7 Policy. Does not have to be unique.
- Position int
The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- Tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- Action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Admin
State boolUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
Human-readable description for the L7 Policy.
- Name string
Human-readable name for the L7 Policy. Does not have to be unique.
- Position int
The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- Tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin
State booleanUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description string
Human-readable description for the L7 Policy.
- name string
Human-readable name for the L7 Policy. Does not have to be unique.
- position number
The position of this policy on the listener. Positions start at 1.
- redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- action str
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener_
id str The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin_
state_ boolup The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description str
Human-readable description for the L7 Policy.
- name str
Human-readable name for the L7 Policy. Does not have to be unique.
- position float
The position of this policy on the listener. Positions start at 1.
- redirect_
pool_ strid Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect_
url str Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region str
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- tenant_
id str Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the L7PolicyV2 resource produces the following output properties:
Look up an Existing L7PolicyV2 Resource
Get an existing L7PolicyV2 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?: L7PolicyV2State, opts?: CustomResourceOptions): L7PolicyV2static get(resource_name, id, opts=None, action=None, admin_state_up=None, description=None, listener_id=None, name=None, position=None, redirect_pool_id=None, redirect_url=None, region=None, tenant_id=None, __props__=None);func GetL7PolicyV2(ctx *Context, name string, id IDInput, state *L7PolicyV2State, opts ...ResourceOption) (*L7PolicyV2, error)public static L7PolicyV2 Get(string name, Input<string> id, L7PolicyV2State? 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:
- Action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Admin
State boolUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
Human-readable description for the L7 Policy.
- Listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Name string
Human-readable name for the L7 Policy. Does not have to be unique.
- Position int
The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- Tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- Action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Admin
State boolUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
Human-readable description for the L7 Policy.
- Listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Name string
Human-readable name for the L7 Policy. Does not have to be unique.
- Position int
The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- Tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- action string
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin
State booleanUp The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description string
Human-readable description for the L7 Policy.
- listener
Id string The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name string
Human-readable name for the L7 Policy. Does not have to be unique.
- position number
The position of this policy on the listener. Positions start at 1.
- redirect
Pool stringId Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url string Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- tenant
Id string Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
- action str
The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin_
state_ boolup The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description str
Human-readable description for the L7 Policy.
- listener_
id str The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name str
Human-readable name for the L7 Policy. Does not have to be unique.
- position float
The position of this policy on the listener. Positions start at 1.
- redirect_
pool_ strid Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect_
url str Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region str
The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the
regionargument of the provider is used. Changing this creates a new L7 Policy.- tenant_
id str Required for admins. The UUID of the tenant who owns the L7 Policy. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Policy.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.