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
        {
            LoadBalancer = lb.Name,
            InstancePorts = 
            {
                "25",
                "587",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/elb"
	"github.com/pulumi/pulumi/sdk/v3/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{
			LoadBalancer: lb.Name,
			InstancePorts: pulumi.StringArray{
				pulumi.String("25"),
				pulumi.String("587"),
			},
		})
		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=[
        aws.elb.LoadBalancerListenerArgs(
            instance_port=25,
            instance_protocol="tcp",
            lb_port=25,
            lb_protocol="tcp",
        ),
        aws.elb.LoadBalancerListenerArgs(
            instance_port=587,
            instance_protocol="tcp",
            lb_port=587,
            lb_protocol="tcp",
        ),
    ])
smtp = aws.ec2.ProxyProtocolPolicy("smtp",
    load_balancer=lb.name,
    instance_ports=[
        "25",
        "587",
    ])
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", {
    loadBalancer: lb.name,
    instancePorts: [
        "25",
        "587",
    ],
});

Create a ProxyProtocolPolicy Resource

new ProxyProtocolPolicy(name: string, args: ProxyProtocolPolicyArgs, opts?: CustomResourceOptions);
@overload
def ProxyProtocolPolicy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_ports: Optional[Sequence[str]] = None,
                        load_balancer: Optional[str] = None)
@overload
def ProxyProtocolPolicy(resource_name: str,
                        args: ProxyProtocolPolicyArgs,
                        opts: Optional[ResourceOptions] = 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.
args ProxyProtocolPolicyArgs
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 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:

InstancePorts List<string>
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
LoadBalancer string
The load balancer to which the policy should be attached.
InstancePorts []string
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
LoadBalancer string
The load balancer to which the policy should be attached.
instancePorts string[]
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
loadBalancer string
The load balancer to which the policy should be attached.
instance_ports Sequence[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:

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.

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): ProxyProtocolPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instance_ports: Optional[Sequence[str]] = None,
        load_balancer: Optional[str] = None) -> ProxyProtocolPolicy
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:

InstancePorts List<string>
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
LoadBalancer string
The load balancer to which the policy should be attached.
InstancePorts []string
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
LoadBalancer string
The load balancer to which the policy should be attached.
instancePorts string[]
List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.
loadBalancer string
The load balancer to which the policy should be attached.
instance_ports Sequence[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 aws Terraform Provider.