LoadBalancerBackendServerPolicy

Attaches a load balancer policy to an ELB backend server.

Example Usage

using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var wu_tang = new Aws.Elb.LoadBalancer("wu-tang", new Aws.Elb.LoadBalancerArgs
        {
            AvailabilityZones = 
            {
                "us-east-1a",
            },
            Listeners = 
            {
                new Aws.Elb.Inputs.LoadBalancerListenerArgs
                {
                    InstancePort = 443,
                    InstanceProtocol = "http",
                    LbPort = 443,
                    LbProtocol = "https",
                    SslCertificateId = "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
                },
            },
            Tags = 
            {
                { "Name", "wu-tang" },
            },
        });
        var wu_tang_ca_pubkey_policy = new Aws.Elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy", new Aws.Elb.LoadBalancerPolicyArgs
        {
            LoadBalancerName = wu_tang.Name,
            PolicyAttributes = 
            {
                new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
                {
                    Name = "PublicKey",
                    Value = File.ReadAllText("wu-tang-pubkey"),
                },
            },
            PolicyName = "wu-tang-ca-pubkey-policy",
            PolicyTypeName = "PublicKeyPolicyType",
        });
        var wu_tang_root_ca_backend_auth_policy = new Aws.Elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", new Aws.Elb.LoadBalancerPolicyArgs
        {
            LoadBalancerName = wu_tang.Name,
            PolicyAttributes = 
            {
                new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
                {
                    Name = "PublicKeyPolicyName",
                    Value = aws_load_balancer_policy.Wu_tang_root_ca_pubkey_policy.Policy_name,
                },
            },
            PolicyName = "wu-tang-root-ca-backend-auth-policy",
            PolicyTypeName = "BackendServerAuthenticationPolicyType",
        });
        var wu_tang_backend_auth_policies_443 = new Aws.Elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", new Aws.Elb.LoadBalancerBackendServerPolicyArgs
        {
            InstancePort = 443,
            LoadBalancerName = wu_tang.Name,
            PolicyNames = 
            {
                wu_tang_root_ca_backend_auth_policy.PolicyName,
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        return nil
    })
}
import pulumi
import pulumi_aws as aws

wu_tang = aws.elb.LoadBalancer("wu-tang",
    availability_zones=["us-east-1a"],
    listeners=[{
        "instance_port": 443,
        "instanceProtocol": "http",
        "lb_port": 443,
        "lbProtocol": "https",
        "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
    }],
    tags={
        "Name": "wu-tang",
    })
wu_tang_ca_pubkey_policy = aws.elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy",
    load_balancer_name=wu_tang.name,
    policy_attributes=[{
        "name": "PublicKey",
        "value": (lambda path: open(path).read())("wu-tang-pubkey"),
    }],
    policy_name="wu-tang-ca-pubkey-policy",
    policy_type_name="PublicKeyPolicyType")
wu_tang_root_ca_backend_auth_policy = aws.elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy",
    load_balancer_name=wu_tang.name,
    policy_attributes=[{
        "name": "PublicKeyPolicyName",
        "value": aws_load_balancer_policy["wu-tang-root-ca-pubkey-policy"]["policy_name"],
    }],
    policy_name="wu-tang-root-ca-backend-auth-policy",
    policy_type_name="BackendServerAuthenticationPolicyType")
wu_tang_backend_auth_policies_443 = aws.elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443",
    instance_port=443,
    load_balancer_name=wu_tang.name,
    policy_names=[wu_tang_root_ca_backend_auth_policy.policy_name])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";

const wu_tang = new aws.elb.LoadBalancer("wu-tang", {
    availabilityZones: ["us-east-1a"],
    listeners: [{
        instancePort: 443,
        instanceProtocol: "http",
        lbPort: 443,
        lbProtocol: "https",
        sslCertificateId: "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
    }],
    tags: {
        Name: "wu-tang",
    },
});
const wu_tang_ca_pubkey_policy = new aws.elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy", {
    loadBalancerName: wu_tang.name,
    policyAttributes: [{
        name: "PublicKey",
        value: fs.readFileSync("wu-tang-pubkey", "utf-8"),
    }],
    policyName: "wu-tang-ca-pubkey-policy",
    policyTypeName: "PublicKeyPolicyType",
});
const wu_tang_root_ca_backend_auth_policy = new aws.elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", {
    loadBalancerName: wu_tang.name,
    policyAttributes: [{
        name: "PublicKeyPolicyName",
        value: aws_load_balancer_policy_wu_tang_root_ca_pubkey_policy.policyName,
    }],
    policyName: "wu-tang-root-ca-backend-auth-policy",
    policyTypeName: "BackendServerAuthenticationPolicyType",
});
const wu_tang_backend_auth_policies_443 = new aws.elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", {
    instancePort: 443,
    loadBalancerName: wu_tang.name,
    policyNames: [wu_tang_root_ca_backend_auth_policy.policyName],
});

Deprecated: aws.elasticloadbalancing.LoadBalancerBackendServerPolicy has been deprecated in favor of aws.elb.LoadBalancerBackendServerPolicy

Create a LoadBalancerBackendServerPolicy Resource

def LoadBalancerBackendServerPolicy(resource_name, opts=None, instance_port=None, load_balancer_name=None, policy_names=None, __props__=None);
name string
The unique name of the resource.
args LoadBalancerBackendServerPolicyArgs
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 LoadBalancerBackendServerPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerBackendServerPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancerBackendServerPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LoadBalancerBackendServerPolicy resource accepts the following input properties:

InstancePort int

The instance port to apply the policy to.

LoadBalancerName string

The load balancer to attach the policy to.

PolicyNames List<string>

List of Policy Names to apply to the backend server.

InstancePort int

The instance port to apply the policy to.

LoadBalancerName string

The load balancer to attach the policy to.

PolicyNames []string

List of Policy Names to apply to the backend server.

instancePort number

The instance port to apply the policy to.

loadBalancerName string

The load balancer to attach the policy to.

policyNames string[]

List of Policy Names to apply to the backend server.

instance_port float

The instance port to apply the policy to.

load_balancer_name str

The load balancer to attach the policy to.

policy_names List[str]

List of Policy Names to apply to the backend server.

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancerBackendServerPolicy 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 LoadBalancerBackendServerPolicy Resource

Get an existing LoadBalancerBackendServerPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, instance_port=None, load_balancer_name=None, policy_names=None, __props__=None);
func GetLoadBalancerBackendServerPolicy(ctx *Context, name string, id IDInput, state *LoadBalancerBackendServerPolicyState, opts ...ResourceOption) (*LoadBalancerBackendServerPolicy, error)
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:

InstancePort int

The instance port to apply the policy to.

LoadBalancerName string

The load balancer to attach the policy to.

PolicyNames List<string>

List of Policy Names to apply to the backend server.

InstancePort int

The instance port to apply the policy to.

LoadBalancerName string

The load balancer to attach the policy to.

PolicyNames []string

List of Policy Names to apply to the backend server.

instancePort number

The instance port to apply the policy to.

loadBalancerName string

The load balancer to attach the policy to.

policyNames string[]

List of Policy Names to apply to the backend server.

instance_port float

The instance port to apply the policy to.

load_balancer_name str

The load balancer to attach the policy to.

policy_names List[str]

List of Policy Names to apply to the backend server.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.