published on Friday, Sep 25, 2026 by OVHcloud
published on Friday, Sep 25, 2026 by OVHcloud
Creates an L7 policy on a load balancer listener in a public cloud project. The policy’s rules are managed inline with the policy.
Example Usage
Redirect to a Pool
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
api:
type: ovh:CloudLoadbalancerL7policy
properties:
serviceName: xxxxxxxxxx
loadbalancerId: ${lb.id}
listenerId: ${http.id}
name: api-to-api-pool
action: REDIRECT_TO_POOL
redirectPoolId: ${apiOvhCloudLoadbalancerPool.id}
position: 1
rules:
- type: PATH
compare_type: STARTS_WITH
value: /api
- type: HEADER
compare_type: EQUAL_TO
key: X-Version
value: v2
Example coming soon!
Redirect to a URL
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
httpsRedirect:
type: ovh:CloudLoadbalancerL7policy
name: https_redirect
properties:
serviceName: xxxxxxxxxx
loadbalancerId: ${lb.id}
listenerId: ${http.id}
action: REDIRECT_TO_URL
redirectUrl: https://www.example.com
redirectHttpCode: 301
rules:
- type: HOST_NAME
compare_type: EQUAL_TO
value: example.com
Example coming soon!
Create CloudLoadbalancerL7policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudLoadbalancerL7policy(name: string, args: CloudLoadbalancerL7policyArgs, opts?: CustomResourceOptions);@overload
def CloudLoadbalancerL7policy(resource_name: str,
args: CloudLoadbalancerL7policyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudLoadbalancerL7policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
listener_id: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
service_name: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
position: Optional[int] = None,
redirect_http_code: Optional[int] = None,
redirect_pool_id: Optional[str] = None,
redirect_prefix: Optional[str] = None,
redirect_url: Optional[str] = None,
rules: Optional[Sequence[CloudLoadbalancerL7policyRuleArgs]] = None)func NewCloudLoadbalancerL7policy(ctx *Context, name string, args CloudLoadbalancerL7policyArgs, opts ...ResourceOption) (*CloudLoadbalancerL7policy, error)public CloudLoadbalancerL7policy(string name, CloudLoadbalancerL7policyArgs args, CustomResourceOptions? opts = null)
public CloudLoadbalancerL7policy(String name, CloudLoadbalancerL7policyArgs args)
public CloudLoadbalancerL7policy(String name, CloudLoadbalancerL7policyArgs args, CustomResourceOptions options)
type: ovh:CloudLoadbalancerL7policy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ovh_cloud_loadbalancer_l7policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CloudLoadbalancerL7policyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CloudLoadbalancerL7policyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CloudLoadbalancerL7policyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudLoadbalancerL7policyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudLoadbalancerL7policyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cloudLoadbalancerL7policyResource = new Ovh.CloudLoadbalancerL7policy("cloudLoadbalancerL7policyResource", new()
{
Action = "string",
ListenerId = "string",
LoadbalancerId = "string",
ServiceName = "string",
Description = "string",
Name = "string",
Position = 0,
RedirectHttpCode = 0,
RedirectPoolId = "string",
RedirectPrefix = "string",
RedirectUrl = "string",
Rules = new[]
{
new Ovh.Inputs.CloudLoadbalancerL7policyRuleArgs
{
CompareType = "string",
Type = "string",
Value = "string",
Invert = false,
Key = "string",
},
},
});
example, err := ovh.NewCloudLoadbalancerL7policy(ctx, "cloudLoadbalancerL7policyResource", &ovh.CloudLoadbalancerL7policyArgs{
Action: pulumi.String("string"),
ListenerId: pulumi.String("string"),
LoadbalancerId: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Position: pulumi.Int(0),
RedirectHttpCode: pulumi.Int(0),
RedirectPoolId: pulumi.String("string"),
RedirectPrefix: pulumi.String("string"),
RedirectUrl: pulumi.String("string"),
Rules: ovh.CloudLoadbalancerL7policyRuleArray{
&ovh.CloudLoadbalancerL7policyRuleArgs{
CompareType: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
Invert: pulumi.Bool(false),
Key: pulumi.String("string"),
},
},
})
resource "ovh_cloud_loadbalancer_l7policy" "cloudLoadbalancerL7policyResource" {
lifecycle {
create_before_destroy = true
}
action = "string"
listener_id = "string"
loadbalancer_id = "string"
service_name = "string"
description = "string"
name = "string"
position = 0
redirect_http_code = 0
redirect_pool_id = "string"
redirect_prefix = "string"
redirect_url = "string"
rules {
compare_type = "string"
type = "string"
value = "string"
invert = false
key = "string"
}
}
var cloudLoadbalancerL7policyResource = new CloudLoadbalancerL7policy("cloudLoadbalancerL7policyResource", CloudLoadbalancerL7policyArgs.builder()
.action("string")
.listenerId("string")
.loadbalancerId("string")
.serviceName("string")
.description("string")
.name("string")
.position(0)
.redirectHttpCode(0)
.redirectPoolId("string")
.redirectPrefix("string")
.redirectUrl("string")
.rules(CloudLoadbalancerL7policyRuleArgs.builder()
.compareType("string")
.type("string")
.value("string")
.invert(false)
.key("string")
.build())
.build());
cloud_loadbalancer_l7policy_resource = ovh.CloudLoadbalancerL7policy("cloudLoadbalancerL7policyResource",
action="string",
listener_id="string",
loadbalancer_id="string",
service_name="string",
description="string",
name="string",
position=0,
redirect_http_code=0,
redirect_pool_id="string",
redirect_prefix="string",
redirect_url="string",
rules=[{
"compare_type": "string",
"type": "string",
"value": "string",
"invert": False,
"key": "string",
}])
const cloudLoadbalancerL7policyResource = new ovh.CloudLoadbalancerL7policy("cloudLoadbalancerL7policyResource", {
action: "string",
listenerId: "string",
loadbalancerId: "string",
serviceName: "string",
description: "string",
name: "string",
position: 0,
redirectHttpCode: 0,
redirectPoolId: "string",
redirectPrefix: "string",
redirectUrl: "string",
rules: [{
compareType: "string",
type: "string",
value: "string",
invert: false,
key: "string",
}],
});
type: ovh:CloudLoadbalancerL7policy
properties:
action: string
description: string
listenerId: string
loadbalancerId: string
name: string
position: 0
redirectHttpCode: 0
redirectPoolId: string
redirectPrefix: string
redirectUrl: string
rules:
- compareType: string
invert: false
key: string
type: string
value: string
serviceName: string
CloudLoadbalancerL7policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CloudLoadbalancerL7policy resource accepts the following input properties:
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Listener
Id string - ID of the listener. Changing this value recreates the resource.
- Loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- Service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- Description string
- Description of the L7 policy.
- Name string
- Name of the L7 policy.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Rules
List<Cloud
Loadbalancer L7policy Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Listener
Id string - ID of the listener. Changing this value recreates the resource.
- Loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- Service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- Description string
- Description of the L7 policy.
- Name string
- Name of the L7 policy.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Rules
[]Cloud
Loadbalancer L7policy Rule Args - List of L7 rules for this policy. All rules must match for the policy to apply:
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - listener_
id string - ID of the listener. Changing this value recreates the resource.
- loadbalancer_
id string - ID of the load balancer. Changing this value recreates the resource.
- service_
name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- description string
- Description of the L7 policy.
- name string
- Name of the L7 policy.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect_
http_ numbercode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ stringid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url string - Redirect URL for
REDIRECT_TO_URLaction. - rules list(object)
- List of L7 rules for this policy. All rules must match for the policy to apply:
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - listener
Id String - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id String - ID of the load balancer. Changing this value recreates the resource.
- service
Name String - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- description String
- Description of the L7 policy.
- name String
- Name of the L7 policy.
- position Integer
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http IntegerCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - rules
List<Cloud
Loadbalancer L7policy Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - listener
Id string - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- description string
- Description of the L7 policy.
- name string
- Name of the L7 policy.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http numberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - rules
Cloud
Loadbalancer L7policy Rule[] - List of L7 rules for this policy. All rules must match for the policy to apply:
- action str
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - listener_
id str - ID of the listener. Changing this value recreates the resource.
- loadbalancer_
id str - ID of the load balancer. Changing this value recreates the resource.
- service_
name str - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- description str
- Description of the L7 policy.
- name str
- Name of the L7 policy.
- position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect_
http_ intcode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ strid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix str - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url str - Redirect URL for
REDIRECT_TO_URLaction. - rules
Sequence[Cloud
Loadbalancer L7policy Rule Args] - List of L7 rules for this policy. All rules must match for the policy to apply:
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - listener
Id String - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id String - ID of the load balancer. Changing this value recreates the resource.
- service
Name String - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- description String
- Description of the L7 policy.
- name String
- Name of the L7 policy.
- position Number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http NumberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - rules List<Property Map>
- List of L7 rules for this policy. All rules must match for the policy to apply:
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudLoadbalancerL7policy resource produces the following output properties:
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the L7 policy.
- Current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Updated
At string - Last update date of the L7 policy.
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the L7 policy.
- Current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Updated
At string - Last update date of the L7 policy.
- checksum string
- Computed hash representing the current target specification value.
- created_
at string - Creation date of the L7 policy.
- current_
state object - Current state of the L7 policy:
- id string
- The provider-assigned unique ID for this managed resource.
- resource_
status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated_
at string - Last update date of the L7 policy.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the L7 policy.
- current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Status String - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At String - Last update date of the L7 policy.
- checksum string
- Computed hash representing the current target specification value.
- created
At string - Creation date of the L7 policy.
- current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At string - Last update date of the L7 policy.
- checksum str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the L7 policy.
- current_
state CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
status str - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated_
at str - Last update date of the L7 policy.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the L7 policy.
- current
State Property Map - Current state of the L7 policy:
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Status String - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At String - Last update date of the L7 policy.
Look up Existing CloudLoadbalancerL7policy Resource
Get an existing CloudLoadbalancerL7policy 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?: CloudLoadbalancerL7policyState, opts?: CustomResourceOptions): CloudLoadbalancerL7policy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
checksum: Optional[str] = None,
created_at: Optional[str] = None,
current_state: Optional[CloudLoadbalancerL7policyCurrentStateArgs] = None,
description: Optional[str] = None,
listener_id: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
position: Optional[int] = None,
redirect_http_code: Optional[int] = None,
redirect_pool_id: Optional[str] = None,
redirect_prefix: Optional[str] = None,
redirect_url: Optional[str] = None,
resource_status: Optional[str] = None,
rules: Optional[Sequence[CloudLoadbalancerL7policyRuleArgs]] = None,
service_name: Optional[str] = None,
updated_at: Optional[str] = None) -> CloudLoadbalancerL7policyfunc GetCloudLoadbalancerL7policy(ctx *Context, name string, id IDInput, state *CloudLoadbalancerL7policyState, opts ...ResourceOption) (*CloudLoadbalancerL7policy, error)public static CloudLoadbalancerL7policy Get(string name, Input<string> id, CloudLoadbalancerL7policyState? state, CustomResourceOptions? opts = null)public static CloudLoadbalancerL7policy get(String name, Output<String> id, CloudLoadbalancerL7policyState state, CustomResourceOptions options)resources: _: type: ovh:CloudLoadbalancerL7policy get: id: ${id}import {
to = ovh_cloud_loadbalancer_l7policy.example
id = "${id}"
}
- 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.
- 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.
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the L7 policy.
- Current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- Description string
- Description of the L7 policy.
- Listener
Id string - ID of the listener. Changing this value recreates the resource.
- Loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- Name string
- Name of the L7 policy.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Rules
List<Cloud
Loadbalancer L7policy Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- Service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- Updated
At string - Last update date of the L7 policy.
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the L7 policy.
- Current
State CloudLoadbalancer L7policy Current State Args - Current state of the L7 policy:
- Description string
- Description of the L7 policy.
- Listener
Id string - ID of the listener. Changing this value recreates the resource.
- Loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- Name string
- Name of the L7 policy.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Rules
[]Cloud
Loadbalancer L7policy Rule Args - List of L7 rules for this policy. All rules must match for the policy to apply:
- Service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- Updated
At string - Last update date of the L7 policy.
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - checksum string
- Computed hash representing the current target specification value.
- created_
at string - Creation date of the L7 policy.
- current_
state object - Current state of the L7 policy:
- description string
- Description of the L7 policy.
- listener_
id string - ID of the listener. Changing this value recreates the resource.
- loadbalancer_
id string - ID of the load balancer. Changing this value recreates the resource.
- name string
- Name of the L7 policy.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect_
http_ numbercode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ stringid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url string - Redirect URL for
REDIRECT_TO_URLaction. - resource_
status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules list(object)
- List of L7 rules for this policy. All rules must match for the policy to apply:
- service_
name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- updated_
at string - Last update date of the L7 policy.
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the L7 policy.
- current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- description String
- Description of the L7 policy.
- listener
Id String - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id String - ID of the load balancer. Changing this value recreates the resource.
- name String
- Name of the L7 policy.
- position Integer
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http IntegerCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - resource
Status String - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
List<Cloud
Loadbalancer L7policy Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- service
Name String - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- updated
At String - Last update date of the L7 policy.
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - checksum string
- Computed hash representing the current target specification value.
- created
At string - Creation date of the L7 policy.
- current
State CloudLoadbalancer L7policy Current State - Current state of the L7 policy:
- description string
- Description of the L7 policy.
- listener
Id string - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id string - ID of the load balancer. Changing this value recreates the resource.
- name string
- Name of the L7 policy.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http numberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - resource
Status string - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
Cloud
Loadbalancer L7policy Rule[] - List of L7 rules for this policy. All rules must match for the policy to apply:
- service
Name string - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- updated
At string - Last update date of the L7 policy.
- action str
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - checksum str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the L7 policy.
- current_
state CloudLoadbalancer L7policy Current State Args - Current state of the L7 policy:
- description str
- Description of the L7 policy.
- listener_
id str - ID of the listener. Changing this value recreates the resource.
- loadbalancer_
id str - ID of the load balancer. Changing this value recreates the resource.
- name str
- Name of the L7 policy.
- position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect_
http_ intcode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ strid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix str - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url str - Redirect URL for
REDIRECT_TO_URLaction. - resource_
status str - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
Sequence[Cloud
Loadbalancer L7policy Rule Args] - List of L7 rules for this policy. All rules must match for the policy to apply:
- service_
name str - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- updated_
at str - Last update date of the L7 policy.
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the L7 policy.
- current
State Property Map - Current state of the L7 policy:
- description String
- Description of the L7 policy.
- listener
Id String - ID of the listener. Changing this value recreates the resource.
- loadbalancer
Id String - ID of the load balancer. Changing this value recreates the resource.
- name String
- Name of the L7 policy.
- position Number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- redirect
Http NumberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - resource
Status String - L7 policy readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules List<Property Map>
- List of L7 rules for this policy. All rules must match for the policy to apply:
- service
Name String - Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
- updated
At String - Last update date of the L7 policy.
Supporting Types
CloudLoadbalancerL7policyCurrentState, CloudLoadbalancerL7policyCurrentStateArgs
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Description string
- Description of the L7 policy.
- Name string
- Name of the L7 policy.
- Operating
Status string - Operating status of the rule.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Provisioning
Status string - Provisioning status of the rule.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Rules
List<Cloud
Loadbalancer L7policy Current State Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- Action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - Description string
- Description of the L7 policy.
- Name string
- Name of the L7 policy.
- Operating
Status string - Operating status of the rule.
- Position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- Provisioning
Status string - Provisioning status of the rule.
- Redirect
Http intCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - Redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - Redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - Redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - Rules
[]Cloud
Loadbalancer L7policy Current State Rule - List of L7 rules for this policy. All rules must match for the policy to apply:
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - description string
- Description of the L7 policy.
- name string
- Name of the L7 policy.
- operating_
status string - Operating status of the rule.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- provisioning_
status string - Provisioning status of the rule.
- redirect_
http_ numbercode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ stringid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url string - Redirect URL for
REDIRECT_TO_URLaction. - rules list(object)
- List of L7 rules for this policy. All rules must match for the policy to apply:
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - description String
- Description of the L7 policy.
- name String
- Name of the L7 policy.
- operating
Status String - Operating status of the rule.
- position Integer
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- provisioning
Status String - Provisioning status of the rule.
- redirect
Http IntegerCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - rules
List<Cloud
Loadbalancer L7policy Current State Rule> - List of L7 rules for this policy. All rules must match for the policy to apply:
- action string
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - description string
- Description of the L7 policy.
- name string
- Name of the L7 policy.
- operating
Status string - Operating status of the rule.
- position number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- provisioning
Status string - Provisioning status of the rule.
- redirect
Http numberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool stringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix string - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url string - Redirect URL for
REDIRECT_TO_URLaction. - rules
Cloud
Loadbalancer L7policy Current State Rule[] - List of L7 rules for this policy. All rules must match for the policy to apply:
- action str
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - description str
- Description of the L7 policy.
- name str
- Name of the L7 policy.
- operating_
status str - Operating status of the rule.
- position int
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- provisioning_
status str - Provisioning status of the rule.
- redirect_
http_ intcode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect_
pool_ strid - ID of the pool for
REDIRECT_TO_POOLaction. - redirect_
prefix str - Redirect prefix for
REDIRECT_PREFIXaction. - redirect_
url str - Redirect URL for
REDIRECT_TO_URLaction. - rules
Sequence[Cloud
Loadbalancer L7policy Current State Rule] - List of L7 rules for this policy. All rules must match for the policy to apply:
- action String
- Action of the L7 policy (
REDIRECT_PREFIX,REDIRECT_TO_POOL,REDIRECT_TO_URL,REJECT). - description String
- Description of the L7 policy.
- name String
- Name of the L7 policy.
- operating
Status String - Operating status of the rule.
- position Number
- Position of the L7 policy in the listener's policy list. If omitted, the value assigned by the API is stored in the state.
- provisioning
Status String - Provisioning status of the rule.
- redirect
Http NumberCode - HTTP redirect code (
301,302,303,307,308) for theREDIRECT_PREFIXandREDIRECT_TO_URLactions. If omitted, the value assigned by the API (302) is stored in the state. - redirect
Pool StringId - ID of the pool for
REDIRECT_TO_POOLaction. - redirect
Prefix String - Redirect prefix for
REDIRECT_PREFIXaction. - redirect
Url String - Redirect URL for
REDIRECT_TO_URLaction. - rules List<Property Map>
- List of L7 rules for this policy. All rules must match for the policy to apply:
CloudLoadbalancerL7policyCurrentStateRule, CloudLoadbalancerL7policyCurrentStateRuleArgs
- Compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - Id string
- Rule ID.
- Invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- Key string
- Key for
COOKIEandHEADERrule types. - Operating
Status string - Operating status of the rule.
- Provisioning
Status string - Provisioning status of the rule.
- Type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - Value string
- Value to compare against.
- Compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - Id string
- Rule ID.
- Invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- Key string
- Key for
COOKIEandHEADERrule types. - Operating
Status string - Operating status of the rule.
- Provisioning
Status string - Provisioning status of the rule.
- Type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - Value string
- Value to compare against.
- compare_
type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - id string
- Rule ID.
- invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key string
- Key for
COOKIEandHEADERrule types. - operating_
status string - Operating status of the rule.
- provisioning_
status string - Provisioning status of the rule.
- type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value string
- Value to compare against.
- compare
Type String - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - id String
- Rule ID.
- invert Boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key String
- Key for
COOKIEandHEADERrule types. - operating
Status String - Operating status of the rule.
- provisioning
Status String - Provisioning status of the rule.
- type String
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value String
- Value to compare against.
- compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - id string
- Rule ID.
- invert boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key string
- Key for
COOKIEandHEADERrule types. - operating
Status string - Operating status of the rule.
- provisioning
Status string - Provisioning status of the rule.
- type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value string
- Value to compare against.
- compare_
type str - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - id str
- Rule ID.
- invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key str
- Key for
COOKIEandHEADERrule types. - operating_
status str - Operating status of the rule.
- provisioning_
status str - Provisioning status of the rule.
- type str
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value str
- Value to compare against.
- compare
Type String - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - id String
- Rule ID.
- invert Boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key String
- Key for
COOKIEandHEADERrule types. - operating
Status String - Operating status of the rule.
- provisioning
Status String - Provisioning status of the rule.
- type String
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value String
- Value to compare against.
CloudLoadbalancerL7policyRule, CloudLoadbalancerL7policyRuleArgs
- Compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - Type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - Value string
- Value to compare against.
- Invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- Key string
- Key for
COOKIEandHEADERrule types.
- Compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - Type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - Value string
- Value to compare against.
- Invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- Key string
- Key for
COOKIEandHEADERrule types.
- compare_
type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value string
- Value to compare against.
- invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key string
- Key for
COOKIEandHEADERrule types.
- compare
Type String - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - type String
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value String
- Value to compare against.
- invert Boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key String
- Key for
COOKIEandHEADERrule types.
- compare
Type string - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - type string
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value string
- Value to compare against.
- invert boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key string
- Key for
COOKIEandHEADERrule types.
- compare_
type str - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - type str
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value str
- Value to compare against.
- invert bool
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key str
- Key for
COOKIEandHEADERrule types.
- compare
Type String - Comparison type (
CONTAINS,ENDS_WITH,EQUAL_TO,REGEX,STARTS_WITH). - type String
- Type of the L7 rule (
COOKIE,FILE_TYPE,HEADER,HOST_NAME,PATH). - value String
- Value to compare against.
- invert Boolean
- Whether to invert the rule match. Defaults to the value assigned by the API.
- key String
- Key for
COOKIEandHEADERrule types.
Import
A cloud load balancer L7 policy can be imported using the service_name, loadbalancer_id, listener_id, and l7policy_id, separated by /:
terraform
import {
to = ovh_cloud_loadbalancer_l7policy.api
id = “<service_name>/<loadbalancer_id>/<listener_id>/<l7policy_id>”
}
bash
$ pulumi import ovh:index/cloudLoadbalancerL7policy:CloudLoadbalancerL7policy api service_name/loadbalancer_id/listener_id/l7policy_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
published on Friday, Sep 25, 2026 by OVHcloud