SslNegotiationPolicy class

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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const lb = new aws.elb.LoadBalancer("lb", {
    listeners: [{
        instancePort: 8000,
        instanceProtocol: "https",
        lbPort: 443,
        lbProtocol: "https",
        sslCertificateId: "arn:aws:iam::123456789012:server-certificate/certName",
    }],
    name: "test-lb",
    availabilityZones: ["us-east-1a"],
});
const foo = new aws.elb.SslNegotiationPolicy("foo", {
    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",
        },
    ],
    name: "foo-policy",
    loadBalancer: lb.id,
    lbPort: 443,
});
import pulumi
import pulumi_aws as aws

lb = aws.elb.LoadBalancer("lb",
    listeners=[{
        "instance_port": 8000,
        "instance_protocol": "https",
        "lb_port": 443,
        "lb_protocol": "https",
        "ssl_certificate_id": "arn:aws:iam::123456789012:server-certificate/certName",
    }],
    name="test-lb",
    availability_zones=["us-east-1a"])
foo = aws.elb.SslNegotiationPolicy("foo",
    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",
        },
    ],
    name="foo-policy",
    load_balancer=lb.id,
    lb_port=443)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

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

    var foo = new Aws.Elb.SslNegotiationPolicy("foo", new()
    {
        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",
            },
        },
        Name = "foo-policy",
        LoadBalancer = lb.Id,
        LbPort = 443,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/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{
			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"),
				},
			},
			Name: pulumi.String("test-lb"),
			AvailabilityZones: pulumi.StringArray{
				pulumi.String("us-east-1a"),
			},
		})
		if err != nil {
			return err
		}
		_, err = elb.NewSslNegotiationPolicy(ctx, "foo", &elb.SslNegotiationPolicyArgs{
			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"),
				},
			},
			Name:         pulumi.String("foo-policy"),
			LoadBalancer: lb.ID().ToIDOutput().ToStringOutput(),
			LbPort:       pulumi.Int(443),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_elb_loadbalancer" "lb" {
  listeners {
    instance_port      = 8000
    instance_protocol  = "https"
    lb_port            = 443
    lb_protocol        = "https"
    ssl_certificate_id = "arn:aws:iam::123456789012:server-certificate/certName"
  }
  name               = "test-lb"
  availability_zones = ["us-east-1a"]
}
resource "aws_elb_sslnegotiationpolicy" "foo" {
  attributes {
    name  = "Protocol-TLSv1"
    value = "false"
  }
  attributes {
    name  = "Protocol-TLSv1.1"
    value = "false"
  }
  attributes {
    name  = "Protocol-TLSv1.2"
    value = "true"
  }
  attributes {
    name  = "Server-Defined-Cipher-Order"
    value = "true"
  }
  attributes {
    name  = "ECDHE-RSA-AES128-GCM-SHA256"
    value = "true"
  }
  attributes {
    name  = "AES128-GCM-SHA256"
    value = "true"
  }
  attributes {
    name  = "EDH-RSA-DES-CBC3-SHA"
    value = "false"
  }
  name          = "foo-policy"
  load_balancer = aws_elb_loadbalancer.lb.id
  lb_port       = 443
}
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.ArrayList;
import java.util.Arrays;
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()
            .listeners(LoadBalancerListenerArgs.builder()
                .instancePort(8000)
                .instanceProtocol("https")
                .lbPort(443)
                .lbProtocol("https")
                .sslCertificateId("arn:aws:iam::123456789012:server-certificate/certName")
                .build())
            .name("test-lb")
            .availabilityZones("us-east-1a")
            .build());

        var foo = new SslNegotiationPolicy("foo", SslNegotiationPolicyArgs.builder()
            .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())
            .name("foo-policy")
            .loadBalancer(lb.id())
            .lbPort(443)
            .build());

    }
}
resources:
  lb:
    type: aws:elb:LoadBalancer
    properties:
      listeners:
        - instancePort: 8000
          instanceProtocol: https
          lbPort: 443
          lbProtocol: https
          sslCertificateId: arn:aws:iam::123456789012:server-certificate/certName
      name: test-lb
      availabilityZones:
        - us-east-1a
  foo:
    type: aws:elb:SslNegotiationPolicy
    properties:
      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'
      name: foo-policy
      loadBalancer: ${lb.id}
      lbPort: 443

Constructors

SslNegotiationPolicy(String name, {SslNegotiationPolicyArgs? args, CustomResourceOptions? options})
Creates a new SslNegotiationPolicy. name The Pulumi resource name. args Arguments used to configure this SslNegotiationPolicy. The set of arguments for SslNegotiationPolicy. options Resource options controlling this resource's behavior.
SslNegotiationPolicy.reference(String urn)
Creates a typed reference to an existing SslNegotiationPolicy resource.

Properties

attributes ↔ Output<List<SslNegotiationPolicyAttribute>?>
An SSL Negotiation policy attribute. Each has two properties:
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
lbPort ↔ Output<int>
The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
latefinal
loadBalancer ↔ Output<String>
The load balancer to which the policy should be attached.
latefinal
name ↔ Output<String>
The name of the SSL negotiation policy.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
triggers ↔ Output<Map<String, String>?>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
latefinal
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {SslNegotiationPolicyState? state, CustomResourceOptions? options}) → SslNegotiationPolicy
Gets an existing SslNegotiationPolicy resource's state with the given name and id.