AWS Classic

v5.16.2 published on Tuesday, Oct 4, 2022 by Pulumi

SslNegotiationPolicy

Deprecated:

aws.elasticloadbalancing.SslNegotiationPolicy has been deprecated in favor of aws.elb.SslNegotiationPolicy

Provides a load balancer SSL negotiation policy, which allows an ELB to control the ciphers and protocols that are supported during SSL negotiations between a client and a load balancer.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var lb = new Aws.Elb.LoadBalancer("lb", new()
    {
        AvailabilityZones = new[]
        {
            "us-east-1a",
        },
        Listeners = new[]
        {
            new Aws.Elb.Inputs.LoadBalancerListenerArgs
            {
                InstancePort = 8000,
                InstanceProtocol = "https",
                LbPort = 443,
                LbProtocol = "https",
                SslCertificateId = "arn:aws:iam::123456789012:server-certificate/certName",
            },
        },
    });

    var foo = new Aws.Elb.SslNegotiationPolicy("foo", new()
    {
        LoadBalancer = lb.Id,
        LbPort = 443,
        Attributes = new[]
        {
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "Protocol-TLSv1",
                Value = "false",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "Protocol-TLSv1.1",
                Value = "false",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "Protocol-TLSv1.2",
                Value = "true",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "Server-Defined-Cipher-Order",
                Value = "true",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "ECDHE-RSA-AES128-GCM-SHA256",
                Value = "true",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "AES128-GCM-SHA256",
                Value = "true",
            },
            new Aws.Elb.Inputs.SslNegotiationPolicyAttributeArgs
            {
                Name = "EDH-RSA-DES-CBC3-SHA",
                Value = "false",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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(8000),
					InstanceProtocol: pulumi.String("https"),
					LbPort:           pulumi.Int(443),
					LbProtocol:       pulumi.String("https"),
					SslCertificateId: pulumi.String("arn:aws:iam::123456789012:server-certificate/certName"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = elb.NewSslNegotiationPolicy(ctx, "foo", &elb.SslNegotiationPolicyArgs{
			LoadBalancer: lb.ID(),
			LbPort:       pulumi.Int(443),
			Attributes: elb.SslNegotiationPolicyAttributeArray{
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("Protocol-TLSv1"),
					Value: pulumi.String("false"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("Protocol-TLSv1.1"),
					Value: pulumi.String("false"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("Protocol-TLSv1.2"),
					Value: pulumi.String("true"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("Server-Defined-Cipher-Order"),
					Value: pulumi.String("true"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("ECDHE-RSA-AES128-GCM-SHA256"),
					Value: pulumi.String("true"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("AES128-GCM-SHA256"),
					Value: pulumi.String("true"),
				},
				&elb.SslNegotiationPolicyAttributeArgs{
					Name:  pulumi.String("EDH-RSA-DES-CBC3-SHA"),
					Value: pulumi.String("false"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elb.LoadBalancer;
import com.pulumi.aws.elb.LoadBalancerArgs;
import com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;
import com.pulumi.aws.elb.SslNegotiationPolicy;
import com.pulumi.aws.elb.SslNegotiationPolicyArgs;
import com.pulumi.aws.elb.inputs.SslNegotiationPolicyAttributeArgs;
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 lb = new LoadBalancer("lb", LoadBalancerArgs.builder()        
            .availabilityZones("us-east-1a")
            .listeners(LoadBalancerListenerArgs.builder()
                .instancePort(8000)
                .instanceProtocol("https")
                .lbPort(443)
                .lbProtocol("https")
                .sslCertificateId("arn:aws:iam::123456789012:server-certificate/certName")
                .build())
            .build());

        var foo = new SslNegotiationPolicy("foo", SslNegotiationPolicyArgs.builder()        
            .loadBalancer(lb.id())
            .lbPort(443)
            .attributes(            
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("Protocol-TLSv1")
                    .value("false")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("Protocol-TLSv1.1")
                    .value("false")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("Protocol-TLSv1.2")
                    .value("true")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("Server-Defined-Cipher-Order")
                    .value("true")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("ECDHE-RSA-AES128-GCM-SHA256")
                    .value("true")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("AES128-GCM-SHA256")
                    .value("true")
                    .build(),
                SslNegotiationPolicyAttributeArgs.builder()
                    .name("EDH-RSA-DES-CBC3-SHA")
                    .value("false")
                    .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

lb = aws.elb.LoadBalancer("lb",
    availability_zones=["us-east-1a"],
    listeners=[aws.elb.LoadBalancerListenerArgs(
        instance_port=8000,
        instance_protocol="https",
        lb_port=443,
        lb_protocol="https",
        ssl_certificate_id="arn:aws:iam::123456789012:server-certificate/certName",
    )])
foo = aws.elb.SslNegotiationPolicy("foo",
    load_balancer=lb.id,
    lb_port=443,
    attributes=[
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="Protocol-TLSv1",
            value="false",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="Protocol-TLSv1.1",
            value="false",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="Protocol-TLSv1.2",
            value="true",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="Server-Defined-Cipher-Order",
            value="true",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="ECDHE-RSA-AES128-GCM-SHA256",
            value="true",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="AES128-GCM-SHA256",
            value="true",
        ),
        aws.elb.SslNegotiationPolicyAttributeArgs(
            name="EDH-RSA-DES-CBC3-SHA",
            value="false",
        ),
    ])
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: 8000,
        instanceProtocol: "https",
        lbPort: 443,
        lbProtocol: "https",
        sslCertificateId: "arn:aws:iam::123456789012:server-certificate/certName",
    }],
});
const foo = new aws.elb.SslNegotiationPolicy("foo", {
    loadBalancer: lb.id,
    lbPort: 443,
    attributes: [
        {
            name: "Protocol-TLSv1",
            value: "false",
        },
        {
            name: "Protocol-TLSv1.1",
            value: "false",
        },
        {
            name: "Protocol-TLSv1.2",
            value: "true",
        },
        {
            name: "Server-Defined-Cipher-Order",
            value: "true",
        },
        {
            name: "ECDHE-RSA-AES128-GCM-SHA256",
            value: "true",
        },
        {
            name: "AES128-GCM-SHA256",
            value: "true",
        },
        {
            name: "EDH-RSA-DES-CBC3-SHA",
            value: "false",
        },
    ],
});
resources:
  lb:
    type: aws:elb:LoadBalancer
    properties:
      availabilityZones:
        - us-east-1a
      listeners:
        - instancePort: 8000
          instanceProtocol: https
          lbPort: 443
          lbProtocol: https
          sslCertificateId: arn:aws:iam::123456789012:server-certificate/certName
  foo:
    type: aws:elb:SslNegotiationPolicy
    properties:
      loadBalancer: ${lb.id}
      lbPort: 443
      attributes:
        - name: Protocol-TLSv1
          value: false
        - name: Protocol-TLSv1.1
          value: false
        - name: Protocol-TLSv1.2
          value: true
        - name: Server-Defined-Cipher-Order
          value: true
        - name: ECDHE-RSA-AES128-GCM-SHA256
          value: true
        - name: AES128-GCM-SHA256
          value: true
        - name: EDH-RSA-DES-CBC3-SHA
          value: false

Create a SslNegotiationPolicy Resource

new SslNegotiationPolicy(name: string, args: SslNegotiationPolicyArgs, opts?: CustomResourceOptions);
@overload
def SslNegotiationPolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         attributes: Optional[Sequence[SslNegotiationPolicyAttributeArgs]] = None,
                         lb_port: Optional[int] = None,
                         load_balancer: Optional[str] = None,
                         name: Optional[str] = None)
@overload
def SslNegotiationPolicy(resource_name: str,
                         args: SslNegotiationPolicyArgs,
                         opts: Optional[ResourceOptions] = None)
func NewSslNegotiationPolicy(ctx *Context, name string, args SslNegotiationPolicyArgs, opts ...ResourceOption) (*SslNegotiationPolicy, error)
public SslNegotiationPolicy(string name, SslNegotiationPolicyArgs args, CustomResourceOptions? opts = null)
public SslNegotiationPolicy(String name, SslNegotiationPolicyArgs args)
public SslNegotiationPolicy(String name, SslNegotiationPolicyArgs args, CustomResourceOptions options)
type: aws:elasticloadbalancing:SslNegotiationPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SslNegotiationPolicyArgs
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 SslNegotiationPolicyArgs
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 SslNegotiationPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SslNegotiationPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SslNegotiationPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SslNegotiationPolicy Resource Properties

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

Inputs

The SslNegotiationPolicy resource accepts the following input properties:

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Attributes List<SslNegotiationPolicyAttributeArgs>

An SSL Negotiation policy attribute. Each has two properties:

Name string

The name of the attribute

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Attributes []SslNegotiationPolicyAttributeArgs

An SSL Negotiation policy attribute. Each has two properties:

Name string

The name of the attribute

lbPort Integer

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer String

The load balancer to which the policy should be attached.

attributes List<SslNegotiationPolicyAttributeArgs>

An SSL Negotiation policy attribute. Each has two properties:

name String

The name of the attribute

lbPort number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer string

The load balancer to which the policy should be attached.

attributes SslNegotiationPolicyAttributeArgs[]

An SSL Negotiation policy attribute. Each has two properties:

name string

The name of the attribute

lb_port int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

load_balancer str

The load balancer to which the policy should be attached.

attributes Sequence[SslNegotiationPolicyAttributeArgs]

An SSL Negotiation policy attribute. Each has two properties:

name str

The name of the attribute

lbPort Number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer String

The load balancer to which the policy should be attached.

attributes List<Property Map>

An SSL Negotiation policy attribute. Each has two properties:

name String

The name of the attribute

Outputs

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

Get an existing SslNegotiationPolicy 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?: SslNegotiationPolicyState, opts?: CustomResourceOptions): SslNegotiationPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attributes: Optional[Sequence[SslNegotiationPolicyAttributeArgs]] = None,
        lb_port: Optional[int] = None,
        load_balancer: Optional[str] = None,
        name: Optional[str] = None) -> SslNegotiationPolicy
func GetSslNegotiationPolicy(ctx *Context, name string, id IDInput, state *SslNegotiationPolicyState, opts ...ResourceOption) (*SslNegotiationPolicy, error)
public static SslNegotiationPolicy Get(string name, Input<string> id, SslNegotiationPolicyState? state, CustomResourceOptions? opts = null)
public static SslNegotiationPolicy get(String name, Output<String> id, SslNegotiationPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
Attributes List<SslNegotiationPolicyAttributeArgs>

An SSL Negotiation policy attribute. Each has two properties:

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Name string

The name of the attribute

Attributes []SslNegotiationPolicyAttributeArgs

An SSL Negotiation policy attribute. Each has two properties:

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Name string

The name of the attribute

attributes List<SslNegotiationPolicyAttributeArgs>

An SSL Negotiation policy attribute. Each has two properties:

lbPort Integer

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer String

The load balancer to which the policy should be attached.

name String

The name of the attribute

attributes SslNegotiationPolicyAttributeArgs[]

An SSL Negotiation policy attribute. Each has two properties:

lbPort number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer string

The load balancer to which the policy should be attached.

name string

The name of the attribute

attributes Sequence[SslNegotiationPolicyAttributeArgs]

An SSL Negotiation policy attribute. Each has two properties:

lb_port int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

load_balancer str

The load balancer to which the policy should be attached.

name str

The name of the attribute

attributes List<Property Map>

An SSL Negotiation policy attribute. Each has two properties:

lbPort Number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer String

The load balancer to which the policy should be attached.

name String

The name of the attribute

Supporting Types

SslNegotiationPolicyAttribute

Name string

The name of the attribute

Value string

The value of the attribute

Name string

The name of the attribute

Value string

The value of the attribute

name String

The name of the attribute

value String

The value of the attribute

name string

The name of the attribute

value string

The value of the attribute

name str

The name of the attribute

value str

The value of the attribute

name String

The name of the attribute

value String

The value of the attribute

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.