ProxyProtocolPolicy
Provides a proxy protocol policy, which allows an ELB to carry a client connection information to a backend.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var lb = new Aws.Elb.LoadBalancer("lb", new Aws.Elb.LoadBalancerArgs
{
AvailabilityZones =
{
"us-east-1a",
},
Listeners =
{
new Aws.Elb.Inputs.LoadBalancerListenerArgs
{
InstancePort = 25,
InstanceProtocol = "tcp",
LbPort = 25,
LbProtocol = "tcp",
},
new Aws.Elb.Inputs.LoadBalancerListenerArgs
{
InstancePort = 587,
InstanceProtocol = "tcp",
LbPort = 587,
LbProtocol = "tcp",
},
},
});
var smtp = new Aws.Ec2.ProxyProtocolPolicy("smtp", new Aws.Ec2.ProxyProtocolPolicyArgs
{
InstancePorts =
{
"25",
"587",
},
LoadBalancer = lb.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/elb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
lb, err := elb.NewLoadBalancer(ctx, "lb", &elb.LoadBalancerArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
Listeners: elb.LoadBalancerListenerArray{
&elb.LoadBalancerListenerArgs{
InstancePort: pulumi.Int(25),
InstanceProtocol: pulumi.String("tcp"),
LbPort: pulumi.Int(25),
LbProtocol: pulumi.String("tcp"),
},
&elb.LoadBalancerListenerArgs{
InstancePort: pulumi.Int(587),
InstanceProtocol: pulumi.String("tcp"),
LbPort: pulumi.Int(587),
LbProtocol: pulumi.String("tcp"),
},
},
})
if err != nil {
return err
}
_, err = ec2.NewProxyProtocolPolicy(ctx, "smtp", &ec2.ProxyProtocolPolicyArgs{
InstancePorts: pulumi.StringArray{
pulumi.String("25"),
pulumi.String("587"),
},
LoadBalancer: lb.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
lb = aws.elb.LoadBalancer("lb",
availability_zones=["us-east-1a"],
listeners=[
{
"instance_port": 25,
"instanceProtocol": "tcp",
"lb_port": 25,
"lbProtocol": "tcp",
},
{
"instance_port": 587,
"instanceProtocol": "tcp",
"lb_port": 587,
"lbProtocol": "tcp",
},
])
smtp = aws.ec2.ProxyProtocolPolicy("smtp",
instance_ports=[
"25",
"587",
],
load_balancer=lb.name)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const lb = new aws.elb.LoadBalancer("lb", {
availabilityZones: ["us-east-1a"],
listeners: [
{
instancePort: 25,
instanceProtocol: "tcp",
lbPort: 25,
lbProtocol: "tcp",
},
{
instancePort: 587,
instanceProtocol: "tcp",
lbPort: 587,
lbProtocol: "tcp",
},
],
});
const smtp = new aws.ec2.ProxyProtocolPolicy("smtp", {
instancePorts: [
"25",
"587",
],
loadBalancer: lb.name,
});Create a ProxyProtocolPolicy Resource
new ProxyProtocolPolicy(name: string, args: ProxyProtocolPolicyArgs, opts?: CustomResourceOptions);def ProxyProtocolPolicy(resource_name, opts=None, instance_ports=None, load_balancer=None, __props__=None);func NewProxyProtocolPolicy(ctx *Context, name string, args ProxyProtocolPolicyArgs, opts ...ResourceOption) (*ProxyProtocolPolicy, error)public ProxyProtocolPolicy(string name, ProxyProtocolPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ProxyProtocolPolicyArgs
- 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 ProxyProtocolPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProxyProtocolPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ProxyProtocolPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ProxyProtocolPolicy resource accepts the following input properties:
- Instance
Ports List<string> List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- Load
Balancer string The load balancer to which the policy should be attached.
- Instance
Ports []string List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- Load
Balancer string The load balancer to which the policy should be attached.
- instance
Ports string[] List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- load
Balancer string The load balancer to which the policy should be attached.
- instance_
ports List[str] List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- load_
balancer str The load balancer to which the policy should be attached.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProxyProtocolPolicy resource produces the following output properties:
Look up an Existing ProxyProtocolPolicy Resource
Get an existing ProxyProtocolPolicy 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?: ProxyProtocolPolicyState, opts?: CustomResourceOptions): ProxyProtocolPolicystatic get(resource_name, id, opts=None, instance_ports=None, load_balancer=None, __props__=None);func GetProxyProtocolPolicy(ctx *Context, name string, id IDInput, state *ProxyProtocolPolicyState, opts ...ResourceOption) (*ProxyProtocolPolicy, error)public static ProxyProtocolPolicy Get(string name, Input<string> id, ProxyProtocolPolicyState? 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:
- Instance
Ports List<string> List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- Load
Balancer string The load balancer to which the policy should be attached.
- Instance
Ports []string List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- Load
Balancer string The load balancer to which the policy should be attached.
- instance
Ports string[] List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- load
Balancer string The load balancer to which the policy should be attached.
- instance_
ports List[str] List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
- load_
balancer str The load balancer to which the policy should be attached.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.