ionoscloud.alb.ForwardingRule
Explore with Pulumi AI
Manages an Application Load Balancer Forwarding Rule on IonosCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.compute.Datacenter("example", {
name: "Datacenter Example",
location: "us/las",
description: "datacenter description",
secAuthProtection: false,
});
const example1 = new ionoscloud.compute.Lan("example_1", {
datacenterId: example.id,
"public": true,
name: "Lan Example",
});
const example2 = new ionoscloud.compute.Lan("example_2", {
datacenterId: example.id,
"public": true,
name: "Lan Example",
});
const exampleBalancer = new ionoscloud.alb.Balancer("example", {
datacenterId: example.id,
name: "ALB Example",
listenerLan: example1.id,
ips: ["10.12.118.224"],
targetLan: example2.id,
lbPrivateIps: ["10.13.72.225/24"],
});
//optionally you can add a certificate to the application load balancer
const cert = new ionoscloud.cert.Certificate("cert", {
name: "add_name_here",
certificate: "your_certificate",
certificateChain: "your_certificate_chain",
privateKey: "your_private_key",
});
const exampleForwardingRule = new ionoscloud.alb.ForwardingRule("example", {
datacenterId: example.id,
applicationLoadbalancerId: exampleBalancer.id,
name: "ALB FR Example",
protocol: "HTTP",
listenerIp: "10.12.118.224",
listenerPort: 8080,
clientTimeout: 1000,
httpRules: [
{
name: "http_rule",
type: "REDIRECT",
dropQuery: true,
location: "www.ionos.com",
statusCode: 301,
conditions: [{
type: "HEADER",
condition: "EQUALS",
negate: true,
key: "key",
value: "10.12.120.224/24",
}],
},
{
name: "http_rule_2",
type: "STATIC",
dropQuery: false,
statusCode: 303,
responseMessage: "Response",
contentType: "text/plain",
conditions: [{
type: "QUERY",
condition: "MATCHES",
negate: false,
key: "key",
value: "10.12.120.224/24",
}],
},
],
serverCertificates: [cert.id],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.compute.Datacenter("example",
name="Datacenter Example",
location="us/las",
description="datacenter description",
sec_auth_protection=False)
example1 = ionoscloud.compute.Lan("example_1",
datacenter_id=example.id,
public=True,
name="Lan Example")
example2 = ionoscloud.compute.Lan("example_2",
datacenter_id=example.id,
public=True,
name="Lan Example")
example_balancer = ionoscloud.alb.Balancer("example",
datacenter_id=example.id,
name="ALB Example",
listener_lan=example1.id,
ips=["10.12.118.224"],
target_lan=example2.id,
lb_private_ips=["10.13.72.225/24"])
#optionally you can add a certificate to the application load balancer
cert = ionoscloud.cert.Certificate("cert",
name="add_name_here",
certificate="your_certificate",
certificate_chain="your_certificate_chain",
private_key="your_private_key")
example_forwarding_rule = ionoscloud.alb.ForwardingRule("example",
datacenter_id=example.id,
application_loadbalancer_id=example_balancer.id,
name="ALB FR Example",
protocol="HTTP",
listener_ip="10.12.118.224",
listener_port=8080,
client_timeout=1000,
http_rules=[
{
"name": "http_rule",
"type": "REDIRECT",
"drop_query": True,
"location": "www.ionos.com",
"status_code": 301,
"conditions": [{
"type": "HEADER",
"condition": "EQUALS",
"negate": True,
"key": "key",
"value": "10.12.120.224/24",
}],
},
{
"name": "http_rule_2",
"type": "STATIC",
"drop_query": False,
"status_code": 303,
"response_message": "Response",
"content_type": "text/plain",
"conditions": [{
"type": "QUERY",
"condition": "MATCHES",
"negate": False,
"key": "key",
"value": "10.12.120.224/24",
}],
},
],
server_certificates=[cert.id])
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/alb"
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/cert"
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
Name: pulumi.String("Datacenter Example"),
Location: pulumi.String("us/las"),
Description: pulumi.String("datacenter description"),
SecAuthProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
example1, err := compute.NewLan(ctx, "example_1", &compute.LanArgs{
DatacenterId: example.ID(),
Public: pulumi.Bool(true),
Name: pulumi.String("Lan Example"),
})
if err != nil {
return err
}
example2, err := compute.NewLan(ctx, "example_2", &compute.LanArgs{
DatacenterId: example.ID(),
Public: pulumi.Bool(true),
Name: pulumi.String("Lan Example"),
})
if err != nil {
return err
}
exampleBalancer, err := alb.NewBalancer(ctx, "example", &alb.BalancerArgs{
DatacenterId: example.ID(),
Name: pulumi.String("ALB Example"),
ListenerLan: example1.ID(),
Ips: pulumi.StringArray{
pulumi.String("10.12.118.224"),
},
TargetLan: example2.ID(),
LbPrivateIps: pulumi.StringArray{
pulumi.String("10.13.72.225/24"),
},
})
if err != nil {
return err
}
// optionally you can add a certificate to the application load balancer
cert, err := cert.NewCertificate(ctx, "cert", &cert.CertificateArgs{
Name: pulumi.String("add_name_here"),
Certificate: pulumi.String("your_certificate"),
CertificateChain: pulumi.String("your_certificate_chain"),
PrivateKey: pulumi.String("your_private_key"),
})
if err != nil {
return err
}
_, err = alb.NewForwardingRule(ctx, "example", &alb.ForwardingRuleArgs{
DatacenterId: example.ID(),
ApplicationLoadbalancerId: exampleBalancer.ID(),
Name: pulumi.String("ALB FR Example"),
Protocol: pulumi.String("HTTP"),
ListenerIp: pulumi.String("10.12.118.224"),
ListenerPort: pulumi.Int(8080),
ClientTimeout: pulumi.Int(1000),
HttpRules: alb.ForwardingRuleHttpRuleArray{
&alb.ForwardingRuleHttpRuleArgs{
Name: pulumi.String("http_rule"),
Type: pulumi.String("REDIRECT"),
DropQuery: pulumi.Bool(true),
Location: pulumi.String("www.ionos.com"),
StatusCode: pulumi.Int(301),
Conditions: alb.ForwardingRuleHttpRuleConditionArray{
&alb.ForwardingRuleHttpRuleConditionArgs{
Type: pulumi.String("HEADER"),
Condition: pulumi.String("EQUALS"),
Negate: pulumi.Bool(true),
Key: pulumi.String("key"),
Value: pulumi.String("10.12.120.224/24"),
},
},
},
&alb.ForwardingRuleHttpRuleArgs{
Name: pulumi.String("http_rule_2"),
Type: pulumi.String("STATIC"),
DropQuery: pulumi.Bool(false),
StatusCode: pulumi.Int(303),
ResponseMessage: pulumi.String("Response"),
ContentType: pulumi.String("text/plain"),
Conditions: alb.ForwardingRuleHttpRuleConditionArray{
&alb.ForwardingRuleHttpRuleConditionArgs{
Type: pulumi.String("QUERY"),
Condition: pulumi.String("MATCHES"),
Negate: pulumi.Bool(false),
Key: pulumi.String("key"),
Value: pulumi.String("10.12.120.224/24"),
},
},
},
},
ServerCertificates: pulumi.StringArray{
cert.ID(),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Datacenter("example", new()
{
Name = "Datacenter Example",
Location = "us/las",
Description = "datacenter description",
SecAuthProtection = false,
});
var example1 = new Ionoscloud.Compute.Lan("example_1", new()
{
DatacenterId = example.Id,
Public = true,
Name = "Lan Example",
});
var example2 = new Ionoscloud.Compute.Lan("example_2", new()
{
DatacenterId = example.Id,
Public = true,
Name = "Lan Example",
});
var exampleBalancer = new Ionoscloud.Alb.Balancer("example", new()
{
DatacenterId = example.Id,
Name = "ALB Example",
ListenerLan = example1.Id,
Ips = new[]
{
"10.12.118.224",
},
TargetLan = example2.Id,
LbPrivateIps = new[]
{
"10.13.72.225/24",
},
});
//optionally you can add a certificate to the application load balancer
var cert = new Ionoscloud.Cert.IonosCertificate("cert", new()
{
Name = "add_name_here",
Certificate = "your_certificate",
CertificateChain = "your_certificate_chain",
PrivateKey = "your_private_key",
});
var exampleForwardingRule = new Ionoscloud.Alb.ForwardingRule("example", new()
{
DatacenterId = example.Id,
ApplicationLoadbalancerId = exampleBalancer.Id,
Name = "ALB FR Example",
Protocol = "HTTP",
ListenerIp = "10.12.118.224",
ListenerPort = 8080,
ClientTimeout = 1000,
HttpRules = new[]
{
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleArgs
{
Name = "http_rule",
Type = "REDIRECT",
DropQuery = true,
Location = "www.ionos.com",
StatusCode = 301,
Conditions = new[]
{
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleConditionArgs
{
Type = "HEADER",
Condition = "EQUALS",
Negate = true,
Key = "key",
Value = "10.12.120.224/24",
},
},
},
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleArgs
{
Name = "http_rule_2",
Type = "STATIC",
DropQuery = false,
StatusCode = 303,
ResponseMessage = "Response",
ContentType = "text/plain",
Conditions = new[]
{
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleConditionArgs
{
Type = "QUERY",
Condition = "MATCHES",
Negate = false,
Key = "key",
Value = "10.12.120.224/24",
},
},
},
},
ServerCertificates = new[]
{
cert.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.ionoscloud.alb.Balancer;
import com.pulumi.ionoscloud.alb.BalancerArgs;
import com.pulumi.ionoscloud.cert.Certificate;
import com.pulumi.ionoscloud.cert.CertificateArgs;
import com.pulumi.ionoscloud.alb.ForwardingRule;
import com.pulumi.ionoscloud.alb.ForwardingRuleArgs;
import com.pulumi.ionoscloud.alb.inputs.ForwardingRuleHttpRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Datacenter("example", DatacenterArgs.builder()
.name("Datacenter Example")
.location("us/las")
.description("datacenter description")
.secAuthProtection(false)
.build());
var example1 = new Lan("example1", LanArgs.builder()
.datacenterId(example.id())
.public_(true)
.name("Lan Example")
.build());
var example2 = new Lan("example2", LanArgs.builder()
.datacenterId(example.id())
.public_(true)
.name("Lan Example")
.build());
var exampleBalancer = new Balancer("exampleBalancer", BalancerArgs.builder()
.datacenterId(example.id())
.name("ALB Example")
.listenerLan(example1.id())
.ips("10.12.118.224")
.targetLan(example2.id())
.lbPrivateIps("10.13.72.225/24")
.build());
//optionally you can add a certificate to the application load balancer
var cert = new Certificate("cert", CertificateArgs.builder()
.name("add_name_here")
.certificate("your_certificate")
.certificateChain("your_certificate_chain")
.privateKey("your_private_key")
.build());
var exampleForwardingRule = new ForwardingRule("exampleForwardingRule", ForwardingRuleArgs.builder()
.datacenterId(example.id())
.applicationLoadbalancerId(exampleBalancer.id())
.name("ALB FR Example")
.protocol("HTTP")
.listenerIp("10.12.118.224")
.listenerPort(8080)
.clientTimeout(1000)
.httpRules(
ForwardingRuleHttpRuleArgs.builder()
.name("http_rule")
.type("REDIRECT")
.dropQuery(true)
.location("www.ionos.com")
.statusCode(301)
.conditions(ForwardingRuleHttpRuleConditionArgs.builder()
.type("HEADER")
.condition("EQUALS")
.negate(true)
.key("key")
.value("10.12.120.224/24")
.build())
.build(),
ForwardingRuleHttpRuleArgs.builder()
.name("http_rule_2")
.type("STATIC")
.dropQuery(false)
.statusCode(303)
.responseMessage("Response")
.contentType("text/plain")
.conditions(ForwardingRuleHttpRuleConditionArgs.builder()
.type("QUERY")
.condition("MATCHES")
.negate(false)
.key("key")
.value("10.12.120.224/24")
.build())
.build())
.serverCertificates(cert.id())
.build());
}
}
resources:
example:
type: ionoscloud:compute:Datacenter
properties:
name: Datacenter Example
location: us/las
description: datacenter description
secAuthProtection: false
example1:
type: ionoscloud:compute:Lan
name: example_1
properties:
datacenterId: ${example.id}
public: true
name: Lan Example
example2:
type: ionoscloud:compute:Lan
name: example_2
properties:
datacenterId: ${example.id}
public: true
name: Lan Example
exampleBalancer:
type: ionoscloud:alb:Balancer
name: example
properties:
datacenterId: ${example.id}
name: ALB Example
listenerLan: ${example1.id}
ips:
- 10.12.118.224
targetLan: ${example2.id}
lbPrivateIps:
- 10.13.72.225/24
exampleForwardingRule:
type: ionoscloud:alb:ForwardingRule
name: example
properties:
datacenterId: ${example.id}
applicationLoadbalancerId: ${exampleBalancer.id}
name: ALB FR Example
protocol: HTTP
listenerIp: 10.12.118.224
listenerPort: 8080
clientTimeout: 1000
httpRules:
- name: http_rule
type: REDIRECT
dropQuery: true
location: www.ionos.com
statusCode: 301
conditions:
- type: HEADER
condition: EQUALS
negate: true
key: key
value: 10.12.120.224/24
- name: http_rule_2
type: STATIC
dropQuery: false
statusCode: 303
responseMessage: Response
contentType: text/plain
conditions:
- type: QUERY
condition: MATCHES
negate: false
key: key
value: 10.12.120.224/24
serverCertificates:
- ${cert.id}
#optionally you can add a certificate to the application load balancer
cert:
type: ionoscloud:cert:Certificate
properties:
name: add_name_here
certificate: your_certificate
certificateChain: your_certificate_chain
privateKey: your_private_key
Create ForwardingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ForwardingRule(name: string, args: ForwardingRuleArgs, opts?: CustomResourceOptions);
@overload
def ForwardingRule(resource_name: str,
args: ForwardingRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ForwardingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_loadbalancer_id: Optional[str] = None,
datacenter_id: Optional[str] = None,
listener_ip: Optional[str] = None,
listener_port: Optional[int] = None,
protocol: Optional[str] = None,
client_timeout: Optional[int] = None,
http_rules: Optional[Sequence[ForwardingRuleHttpRuleArgs]] = None,
name: Optional[str] = None,
server_certificates: Optional[Sequence[str]] = None)
func NewForwardingRule(ctx *Context, name string, args ForwardingRuleArgs, opts ...ResourceOption) (*ForwardingRule, error)
public ForwardingRule(string name, ForwardingRuleArgs args, CustomResourceOptions? opts = null)
public ForwardingRule(String name, ForwardingRuleArgs args)
public ForwardingRule(String name, ForwardingRuleArgs args, CustomResourceOptions options)
type: ionoscloud:alb:ForwardingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ForwardingRuleArgs
- 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 ForwardingRuleArgs
- 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 ForwardingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ForwardingRuleArgs
- 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 forwardingRuleResource = new Ionoscloud.Alb.ForwardingRule("forwardingRuleResource", new()
{
ApplicationLoadbalancerId = "string",
DatacenterId = "string",
ListenerIp = "string",
ListenerPort = 0,
Protocol = "string",
ClientTimeout = 0,
HttpRules = new[]
{
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleArgs
{
Name = "string",
Type = "string",
Conditions = new[]
{
new Ionoscloud.Alb.Inputs.ForwardingRuleHttpRuleConditionArgs
{
Type = "string",
Condition = "string",
Key = "string",
Negate = false,
Value = "string",
},
},
ContentType = "string",
DropQuery = false,
Location = "string",
ResponseMessage = "string",
StatusCode = 0,
TargetGroup = "string",
},
},
Name = "string",
ServerCertificates = new[]
{
"string",
},
});
example, err := alb.NewForwardingRule(ctx, "forwardingRuleResource", &alb.ForwardingRuleArgs{
ApplicationLoadbalancerId: pulumi.String("string"),
DatacenterId: pulumi.String("string"),
ListenerIp: pulumi.String("string"),
ListenerPort: pulumi.Int(0),
Protocol: pulumi.String("string"),
ClientTimeout: pulumi.Int(0),
HttpRules: alb.ForwardingRuleHttpRuleArray{
&alb.ForwardingRuleHttpRuleArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Conditions: alb.ForwardingRuleHttpRuleConditionArray{
&alb.ForwardingRuleHttpRuleConditionArgs{
Type: pulumi.String("string"),
Condition: pulumi.String("string"),
Key: pulumi.String("string"),
Negate: pulumi.Bool(false),
Value: pulumi.String("string"),
},
},
ContentType: pulumi.String("string"),
DropQuery: pulumi.Bool(false),
Location: pulumi.String("string"),
ResponseMessage: pulumi.String("string"),
StatusCode: pulumi.Int(0),
TargetGroup: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
ServerCertificates: pulumi.StringArray{
pulumi.String("string"),
},
})
var forwardingRuleResource = new com.ionoscloud.pulumi.ionoscloud.alb.ForwardingRule("forwardingRuleResource", com.ionoscloud.pulumi.ionoscloud.alb.ForwardingRuleArgs.builder()
.applicationLoadbalancerId("string")
.datacenterId("string")
.listenerIp("string")
.listenerPort(0)
.protocol("string")
.clientTimeout(0)
.httpRules(ForwardingRuleHttpRuleArgs.builder()
.name("string")
.type("string")
.conditions(ForwardingRuleHttpRuleConditionArgs.builder()
.type("string")
.condition("string")
.key("string")
.negate(false)
.value("string")
.build())
.contentType("string")
.dropQuery(false)
.location("string")
.responseMessage("string")
.statusCode(0)
.targetGroup("string")
.build())
.name("string")
.serverCertificates("string")
.build());
forwarding_rule_resource = ionoscloud.alb.ForwardingRule("forwardingRuleResource",
application_loadbalancer_id="string",
datacenter_id="string",
listener_ip="string",
listener_port=0,
protocol="string",
client_timeout=0,
http_rules=[{
"name": "string",
"type": "string",
"conditions": [{
"type": "string",
"condition": "string",
"key": "string",
"negate": False,
"value": "string",
}],
"content_type": "string",
"drop_query": False,
"location": "string",
"response_message": "string",
"status_code": 0,
"target_group": "string",
}],
name="string",
server_certificates=["string"])
const forwardingRuleResource = new ionoscloud.alb.ForwardingRule("forwardingRuleResource", {
applicationLoadbalancerId: "string",
datacenterId: "string",
listenerIp: "string",
listenerPort: 0,
protocol: "string",
clientTimeout: 0,
httpRules: [{
name: "string",
type: "string",
conditions: [{
type: "string",
condition: "string",
key: "string",
negate: false,
value: "string",
}],
contentType: "string",
dropQuery: false,
location: "string",
responseMessage: "string",
statusCode: 0,
targetGroup: "string",
}],
name: "string",
serverCertificates: ["string"],
});
type: ionoscloud:alb:ForwardingRule
properties:
applicationLoadbalancerId: string
clientTimeout: 0
datacenterId: string
httpRules:
- conditions:
- condition: string
key: string
negate: false
type: string
value: string
contentType: string
dropQuery: false
location: string
name: string
responseMessage: string
statusCode: 0
targetGroup: string
type: string
listenerIp: string
listenerPort: 0
name: string
protocol: string
serverCertificates:
- string
ForwardingRule 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 ForwardingRule resource accepts the following input properties:
- Application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Listener
Ip string - [string] Listening (inbound) IP.
- Listener
Port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- Protocol string
- [string] Balancing protocol.
- Client
Timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- Http
Rules List<Ionoscloud.Forwarding Rule Http Rule> - [list] Array of items in that collection
- Name string
- [string] The name of the Application Load Balancer forwarding rule.
- Server
Certificates List<string> - [list] Array of certificate ids. You can create certificates with the certificate resource.
- Application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Listener
Ip string - [string] Listening (inbound) IP.
- Listener
Port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- Protocol string
- [string] Balancing protocol.
- Client
Timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- Http
Rules []ForwardingRule Http Rule Args - [list] Array of items in that collection
- Name string
- [string] The name of the Application Load Balancer forwarding rule.
- Server
Certificates []string - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer StringId - [string] The ID of Application Load Balancer.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- listener
Ip String - [string] Listening (inbound) IP.
- listener
Port Integer - [int] Listening (inbound) port number; valid range is 1 to 65535.
- protocol String
- [string] Balancing protocol.
- client
Timeout Integer - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- http
Rules List<ForwardingRule Http Rule> - [list] Array of items in that collection
- name String
- [string] The name of the Application Load Balancer forwarding rule.
- server
Certificates List<String> - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- listener
Ip string - [string] Listening (inbound) IP.
- listener
Port number - [int] Listening (inbound) port number; valid range is 1 to 65535.
- protocol string
- [string] Balancing protocol.
- client
Timeout number - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- http
Rules ForwardingRule Http Rule[] - [list] Array of items in that collection
- name string
- [string] The name of the Application Load Balancer forwarding rule.
- server
Certificates string[] - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application_
loadbalancer_ strid - [string] The ID of Application Load Balancer.
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- listener_
ip str - [string] Listening (inbound) IP.
- listener_
port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- protocol str
- [string] Balancing protocol.
- client_
timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- http_
rules Sequence[ForwardingRule Http Rule Args] - [list] Array of items in that collection
- name str
- [string] The name of the Application Load Balancer forwarding rule.
- server_
certificates Sequence[str] - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer StringId - [string] The ID of Application Load Balancer.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- listener
Ip String - [string] Listening (inbound) IP.
- listener
Port Number - [int] Listening (inbound) port number; valid range is 1 to 65535.
- protocol String
- [string] Balancing protocol.
- client
Timeout Number - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- http
Rules List<Property Map> - [list] Array of items in that collection
- name String
- [string] The name of the Application Load Balancer forwarding rule.
- server
Certificates List<String> - [list] Array of certificate ids. You can create certificates with the certificate resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ForwardingRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ForwardingRule Resource
Get an existing ForwardingRule 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?: ForwardingRuleState, opts?: CustomResourceOptions): ForwardingRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_loadbalancer_id: Optional[str] = None,
client_timeout: Optional[int] = None,
datacenter_id: Optional[str] = None,
http_rules: Optional[Sequence[ForwardingRuleHttpRuleArgs]] = None,
listener_ip: Optional[str] = None,
listener_port: Optional[int] = None,
name: Optional[str] = None,
protocol: Optional[str] = None,
server_certificates: Optional[Sequence[str]] = None) -> ForwardingRule
func GetForwardingRule(ctx *Context, name string, id IDInput, state *ForwardingRuleState, opts ...ResourceOption) (*ForwardingRule, error)
public static ForwardingRule Get(string name, Input<string> id, ForwardingRuleState? state, CustomResourceOptions? opts = null)
public static ForwardingRule get(String name, Output<String> id, ForwardingRuleState state, CustomResourceOptions options)
resources: _: type: ionoscloud:alb:ForwardingRule get: 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.
- Application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- Client
Timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Http
Rules List<Ionoscloud.Forwarding Rule Http Rule> - [list] Array of items in that collection
- Listener
Ip string - [string] Listening (inbound) IP.
- Listener
Port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- Name string
- [string] The name of the Application Load Balancer forwarding rule.
- Protocol string
- [string] Balancing protocol.
- Server
Certificates List<string> - [list] Array of certificate ids. You can create certificates with the certificate resource.
- Application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- Client
Timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Http
Rules []ForwardingRule Http Rule Args - [list] Array of items in that collection
- Listener
Ip string - [string] Listening (inbound) IP.
- Listener
Port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- Name string
- [string] The name of the Application Load Balancer forwarding rule.
- Protocol string
- [string] Balancing protocol.
- Server
Certificates []string - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer StringId - [string] The ID of Application Load Balancer.
- client
Timeout Integer - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- http
Rules List<ForwardingRule Http Rule> - [list] Array of items in that collection
- listener
Ip String - [string] Listening (inbound) IP.
- listener
Port Integer - [int] Listening (inbound) port number; valid range is 1 to 65535.
- name String
- [string] The name of the Application Load Balancer forwarding rule.
- protocol String
- [string] Balancing protocol.
- server
Certificates List<String> - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer stringId - [string] The ID of Application Load Balancer.
- client
Timeout number - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- http
Rules ForwardingRule Http Rule[] - [list] Array of items in that collection
- listener
Ip string - [string] Listening (inbound) IP.
- listener
Port number - [int] Listening (inbound) port number; valid range is 1 to 65535.
- name string
- [string] The name of the Application Load Balancer forwarding rule.
- protocol string
- [string] Balancing protocol.
- server
Certificates string[] - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application_
loadbalancer_ strid - [string] The ID of Application Load Balancer.
- client_
timeout int - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- http_
rules Sequence[ForwardingRule Http Rule Args] - [list] Array of items in that collection
- listener_
ip str - [string] Listening (inbound) IP.
- listener_
port int - [int] Listening (inbound) port number; valid range is 1 to 65535.
- name str
- [string] The name of the Application Load Balancer forwarding rule.
- protocol str
- [string] Balancing protocol.
- server_
certificates Sequence[str] - [list] Array of certificate ids. You can create certificates with the certificate resource.
- application
Loadbalancer StringId - [string] The ID of Application Load Balancer.
- client
Timeout Number - [int] The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds).
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- http
Rules List<Property Map> - [list] Array of items in that collection
- listener
Ip String - [string] Listening (inbound) IP.
- listener
Port Number - [int] Listening (inbound) port number; valid range is 1 to 65535.
- name String
- [string] The name of the Application Load Balancer forwarding rule.
- protocol String
- [string] Balancing protocol.
- server
Certificates List<String> - [list] Array of certificate ids. You can create certificates with the certificate resource.
Supporting Types
ForwardingRuleHttpRule, ForwardingRuleHttpRuleArgs
- Name string
- [string] The unique name of the Application Load Balancer HTTP rule.
- Type string
- [string] Type of the Http Rule.
- Conditions
List<Ionoscloud.
Forwarding Rule Http Rule Condition> - [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- Content
Type string - [string] Valid only for STATIC actions.
- Drop
Query bool - [bool] Default is false; valid only for REDIRECT actions.
- Location string
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- Response
Message string - [string] The response message of the request; mandatory for STATIC action.
- Status
Code int - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- Target
Group string - [string] The UUID of the target group; mandatory for FORWARD action.
- Name string
- [string] The unique name of the Application Load Balancer HTTP rule.
- Type string
- [string] Type of the Http Rule.
- Conditions
[]Forwarding
Rule Http Rule Condition - [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- Content
Type string - [string] Valid only for STATIC actions.
- Drop
Query bool - [bool] Default is false; valid only for REDIRECT actions.
- Location string
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- Response
Message string - [string] The response message of the request; mandatory for STATIC action.
- Status
Code int - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- Target
Group string - [string] The UUID of the target group; mandatory for FORWARD action.
- name String
- [string] The unique name of the Application Load Balancer HTTP rule.
- type String
- [string] Type of the Http Rule.
- conditions
List<Forwarding
Rule Http Rule Condition> - [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- content
Type String - [string] Valid only for STATIC actions.
- drop
Query Boolean - [bool] Default is false; valid only for REDIRECT actions.
- location String
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- response
Message String - [string] The response message of the request; mandatory for STATIC action.
- status
Code Integer - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- target
Group String - [string] The UUID of the target group; mandatory for FORWARD action.
- name string
- [string] The unique name of the Application Load Balancer HTTP rule.
- type string
- [string] Type of the Http Rule.
- conditions
Forwarding
Rule Http Rule Condition[] - [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- content
Type string - [string] Valid only for STATIC actions.
- drop
Query boolean - [bool] Default is false; valid only for REDIRECT actions.
- location string
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- response
Message string - [string] The response message of the request; mandatory for STATIC action.
- status
Code number - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- target
Group string - [string] The UUID of the target group; mandatory for FORWARD action.
- name str
- [string] The unique name of the Application Load Balancer HTTP rule.
- type str
- [string] Type of the Http Rule.
- conditions
Sequence[Forwarding
Rule Http Rule Condition] - [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- content_
type str - [string] Valid only for STATIC actions.
- drop_
query bool - [bool] Default is false; valid only for REDIRECT actions.
- location str
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- response_
message str - [string] The response message of the request; mandatory for STATIC action.
- status_
code int - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- target_
group str - [string] The UUID of the target group; mandatory for FORWARD action.
- name String
- [string] The unique name of the Application Load Balancer HTTP rule.
- type String
- [string] Type of the Http Rule.
- conditions List<Property Map>
- [list] - An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed.
- content
Type String - [string] Valid only for STATIC actions.
- drop
Query Boolean - [bool] Default is false; valid only for REDIRECT actions.
- location String
- [string] The location for redirecting; mandatory and valid only for REDIRECT actions.
- response
Message String - [string] The response message of the request; mandatory for STATIC action.
- status
Code Number - [int] Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599.
- target
Group String - [string] The UUID of the target group; mandatory for FORWARD action.
ForwardingRuleHttpRuleCondition, ForwardingRuleHttpRuleConditionArgs
- Type string
- [string] Type of the Http Rule condition.
- Condition string
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- Key string
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- Negate bool
- [bool] Specifies whether the condition is negated or not; the default is False.
- Value string
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
- Type string
- [string] Type of the Http Rule condition.
- Condition string
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- Key string
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- Negate bool
- [bool] Specifies whether the condition is negated or not; the default is False.
- Value string
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
- type String
- [string] Type of the Http Rule condition.
- condition String
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- key String
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- negate Boolean
- [bool] Specifies whether the condition is negated or not; the default is False.
- value String
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
- type string
- [string] Type of the Http Rule condition.
- condition string
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- key string
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- negate boolean
- [bool] Specifies whether the condition is negated or not; the default is False.
- value string
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
- type str
- [string] Type of the Http Rule condition.
- condition str
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- key str
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- negate bool
- [bool] Specifies whether the condition is negated or not; the default is False.
- value str
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
- type String
- [string] Type of the Http Rule condition.
- condition String
- [string] Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP.
- key String
- [string] Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY.
- negate Boolean
- [bool] Specifies whether the condition is negated or not; the default is False.
- value String
- [string] Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP.
Import
Resource Application Load Balancer Forwarding Rule can be imported using the resource id
, alb id
and datacenter id
, e.g.
$ pulumi import ionoscloud:alb/forwardingRule:ForwardingRule my_application_loadbalancer_forwardingrule datacenter uuid/application_loadbalancer uuid/application_loadbalancer_forwardingrule uuid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.