Module elb
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
- AppCookieStickinessPolicy
- Attachment
- ListenerPolicy
- LoadBalancer
- LoadBalancerBackendServerPolicy
- LoadBalancerCookieStickinessPolicy
- LoadBalancerPolicy
- SslNegotiationPolicy
Functions
Others
- AppCookieStickinessPolicyArgs
- AppCookieStickinessPolicyState
- AttachmentArgs
- AttachmentState
- GetHostedZoneIdArgs
- GetHostedZoneIdResult
- GetLoadBalancerArgs
- GetLoadBalancerResult
- GetServiceAccountArgs
- GetServiceAccountResult
- ListenerPolicyArgs
- ListenerPolicyState
- LoadBalancerArgs
- LoadBalancerBackendServerPolicyArgs
- LoadBalancerBackendServerPolicyState
- LoadBalancerCookieStickinessPolicyArgs
- LoadBalancerCookieStickinessPolicyState
- LoadBalancerPolicyArgs
- LoadBalancerPolicyState
- LoadBalancerState
- SslNegotiationPolicyArgs
- SslNegotiationPolicyState
Resources
Resource AppCookieStickinessPolicy
class AppCookieStickinessPolicy extends CustomResourceProvides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie’s expiration to a cookie generated by your application.
Example Usage
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: "http",
lbPort: 80,
lbProtocol: "http",
}],
});
const foo = new aws.elb.AppCookieStickinessPolicy("foo", {
cookieName: "MyAppCookie",
lbPort: 80,
loadBalancer: lb.name,
});constructor
new AppCookieStickinessPolicy(name: string, args: AppCookieStickinessPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a AppCookieStickinessPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AppCookieStickinessPolicyState, opts?: pulumi.CustomResourceOptions): AppCookieStickinessPolicyGet an existing AppCookieStickinessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AppCookieStickinessPolicyReturns true if the given object is an instance of AppCookieStickinessPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cookieName
public cookieName: pulumi.Output<string>;The application cookie whose lifetime the ELB’s cookie should follow.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lbPort
public lbPort: pulumi.Output<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
public loadBalancer: pulumi.Output<string>;The name of load balancer to which the policy should be attached.
property name
public name: pulumi.Output<string>;The name of the stickiness policy.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Attachment
class Attachment extends CustomResourceAttaches an EC2 instance to an Elastic Load Balancer (ELB). For attaching resources with Application Load Balancer (ALB) or Network Load Balancer (NLB), see the aws.lb.TargetGroupAttachment resource.
NOTE on ELB Instances and ELB Attachments: This provider currently provides both a standalone ELB Attachment resource (describing an instance attached to an ELB), and an Elastic Load Balancer resource with
instancesdefined in-line. At this time you cannot use an ELB with in-line instances in conjunction with an ELB Attachment resource. Doing so will cause a conflict and will overwrite attachments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new load balancer attachment
const baz = new aws.elb.Attachment("baz", {
elb: aws_elb_bar.id,
instance: aws_instance_foo.id,
});constructor
new Attachment(name: string, args: AttachmentArgs, opts?: pulumi.CustomResourceOptions)Create a Attachment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AttachmentState, opts?: pulumi.CustomResourceOptions): AttachmentGet an existing Attachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AttachmentReturns true if the given object is an instance of Attachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property elb
public elb: pulumi.Output<string>;The name of the ELB.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instance
public instance: pulumi.Output<string>;Instance ID to place in the ELB pool.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ListenerPolicy
class ListenerPolicy extends CustomResourceAttaches a load balancer policy to an ELB Listener.
Example Usage
Custom Policy
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
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_ssl = new aws.elb.LoadBalancerPolicy("wu-tang-ssl", {
loadBalancerName: wu_tang.name,
policyAttributes: [
{
name: "ECDHE-ECDSA-AES128-GCM-SHA256",
value: "true",
},
{
name: "Protocol-TLSv1.2",
value: "true",
},
],
policyName: "wu-tang-ssl",
policyTypeName: "SSLNegotiationPolicyType",
});
const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
loadBalancerName: wu_tang.name,
loadBalancerPort: 443,
policyNames: [wu_tang_ssl.policyName],
});AWS Predefined Security Policy
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
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_ssl_tls_1_1 = new aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", {
loadBalancerName: wu_tang.name,
policyAttributes: [{
name: "Reference-Security-Policy",
value: "ELBSecurityPolicy-TLS-1-1-2017-01",
}],
policyName: "wu-tang-ssl",
policyTypeName: "SSLNegotiationPolicyType",
});
const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
loadBalancerName: wu_tang.name,
loadBalancerPort: 443,
policyNames: [wu_tang_ssl_tls_1_1.policyName],
});constructor
new ListenerPolicy(name: string, args: ListenerPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a ListenerPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ListenerPolicyState, opts?: pulumi.CustomResourceOptions): ListenerPolicyGet an existing ListenerPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ListenerPolicyReturns true if the given object is an instance of ListenerPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerName
public loadBalancerName: pulumi.Output<string>;The load balancer to attach the policy to.
property loadBalancerPort
public loadBalancerPort: pulumi.Output<number>;The load balancer listener port to apply the policy to.
property policyNames
public policyNames: pulumi.Output<string[] | undefined>;List of Policy Names to apply to the backend server.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource LoadBalancer
class LoadBalancer extends CustomResourceProvides an Elastic Load Balancer resource, also known as a “Classic
Load Balancer” after the release of
Application/Network Load Balancers.
NOTE on ELB Instances and ELB Attachments: This provider currently provides both a standalone ELB Attachment resource (describing an instance attached to an ELB), and an ELB resource with
instancesdefined in-line. At this time you cannot use an ELB with in-line instances in conjunction with a ELB Attachment resources. Doing so will cause a conflict and will overwrite attachments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new load balancer
const bar = new aws.elb.LoadBalancer("bar", {
accessLogs: {
bucket: "foo",
bucketPrefix: "bar",
interval: 60,
},
availabilityZones: [
"us-west-2a",
"us-west-2b",
"us-west-2c",
],
connectionDraining: true,
connectionDrainingTimeout: 400,
crossZoneLoadBalancing: true,
healthCheck: {
healthyThreshold: 2,
interval: 30,
target: "HTTP:8000/",
timeout: 3,
unhealthyThreshold: 2,
},
idleTimeout: 400,
instances: [aws_instance_foo.id],
listeners: [
{
instancePort: 8000,
instanceProtocol: "http",
lbPort: 80,
lbProtocol: "http",
},
{
instancePort: 8000,
instanceProtocol: "http",
lbPort: 443,
lbProtocol: "https",
sslCertificateId: "arn:aws:iam::123456789012:server-certificate/certName",
},
],
tags: {
Name: "foobar-elb",
},
});Note on ECDSA Key Algorithm
If the ARN of the sslCertificateId that is pointed to references a
certificate that was signed by an ECDSA key, note that ELB only supports the
P256 and P384 curves. Using a certificate signed by a key using a different
curve could produce the error ERR_SSL_VERSION_OR_CIPHER_MISMATCH in your
browser.
constructor
new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: pulumi.CustomResourceOptions)Create a LoadBalancer resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerState, opts?: pulumi.CustomResourceOptions): LoadBalancerGet an existing LoadBalancer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LoadBalancerReturns true if the given object is an instance of LoadBalancer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property accessLogs
public accessLogs: pulumi.Output<LoadBalancerAccessLogs | undefined>;An Access Logs block. Access Logs documented below.
property arn
public arn: pulumi.Output<string>;The ARN of the ELB
property availabilityZones
public availabilityZones: pulumi.Output<string[]>;The AZ’s to serve traffic in.
property connectionDraining
public connectionDraining: pulumi.Output<boolean | undefined>;Boolean to enable connection draining. Default: false
property connectionDrainingTimeout
public connectionDrainingTimeout: pulumi.Output<number | undefined>;The time in seconds to allow for connections to drain. Default: 300
property crossZoneLoadBalancing
public crossZoneLoadBalancing: pulumi.Output<boolean | undefined>;Enable cross-zone load balancing. Default: true
property dnsName
public dnsName: pulumi.Output<string>;The DNS name of the ELB
property healthCheck
public healthCheck: pulumi.Output<LoadBalancerHealthCheck>;A healthCheck block. Health Check documented below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property idleTimeout
public idleTimeout: pulumi.Output<number | undefined>;The time in seconds that the connection is allowed to be idle. Default: 60
property instances
public instances: pulumi.Output<string[]>;A list of instance ids to place in the ELB pool.
property internal
public internal: pulumi.Output<boolean>;If true, ELB will be an internal ELB.
property listeners
public listeners: pulumi.Output<LoadBalancerListener[]>;A list of listener blocks. Listeners documented below.
property name
public name: pulumi.Output<string>;The name of the ELB. By default generated by this provider.
property namePrefix
public namePrefix: pulumi.Output<string | undefined>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property securityGroups
public securityGroups: pulumi.Output<string[]>;A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
property sourceSecurityGroup
public sourceSecurityGroup: pulumi.Output<string>;The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
property sourceSecurityGroupId
public sourceSecurityGroupId: pulumi.Output<string>;The ID of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Only available on ELBs launched in a VPC.
property subnets
public subnets: pulumi.Output<string[]>;A list of subnet IDs to attach to the ELB.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property zoneId
public zoneId: pulumi.Output<string>;The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
Resource LoadBalancerBackendServerPolicy
class LoadBalancerBackendServerPolicy extends CustomResourceAttaches a load balancer policy to an ELB backend server.
Example Usage
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],
});constructor
new LoadBalancerBackendServerPolicy(name: string, args: LoadBalancerBackendServerPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a LoadBalancerBackendServerPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerBackendServerPolicyState, opts?: pulumi.CustomResourceOptions): LoadBalancerBackendServerPolicyGet an existing LoadBalancerBackendServerPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LoadBalancerBackendServerPolicyReturns true if the given object is an instance of LoadBalancerBackendServerPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instancePort
public instancePort: pulumi.Output<number>;The instance port to apply the policy to.
property loadBalancerName
public loadBalancerName: pulumi.Output<string>;The load balancer to attach the policy to.
property policyNames
public policyNames: pulumi.Output<string[] | undefined>;List of Policy Names to apply to the backend server.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource LoadBalancerCookieStickinessPolicy
class LoadBalancerCookieStickinessPolicy extends CustomResourceProvides a load balancer cookie stickiness policy, which allows an ELB to control the sticky session lifetime of the browser.
Example Usage
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: "http",
lbPort: 80,
lbProtocol: "http",
}],
});
const foo = new aws.elb.LoadBalancerCookieStickinessPolicy("foo", {
cookieExpirationPeriod: 600,
lbPort: 80,
loadBalancer: lb.id,
});constructor
new LoadBalancerCookieStickinessPolicy(name: string, args: LoadBalancerCookieStickinessPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a LoadBalancerCookieStickinessPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerCookieStickinessPolicyState, opts?: pulumi.CustomResourceOptions): LoadBalancerCookieStickinessPolicyGet an existing LoadBalancerCookieStickinessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LoadBalancerCookieStickinessPolicyReturns true if the given object is an instance of LoadBalancerCookieStickinessPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cookieExpirationPeriod
public cookieExpirationPeriod: pulumi.Output<number | undefined>;The time period after which the session cookie should be considered stale, expressed in seconds.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lbPort
public lbPort: pulumi.Output<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
public loadBalancer: pulumi.Output<string>;The load balancer to which the policy should be attached.
property name
public name: pulumi.Output<string>;The name of the stickiness policy.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource LoadBalancerPolicy
class LoadBalancerPolicy extends CustomResourceProvides a load balancer policy, which can be attached to an ELB listener or backend server.
Example Usage
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_ssl = new aws.elb.LoadBalancerPolicy("wu-tang-ssl", {
loadBalancerName: wu_tang.name,
policyAttributes: [
{
name: "ECDHE-ECDSA-AES128-GCM-SHA256",
value: "true",
},
{
name: "Protocol-TLSv1.2",
value: "true",
},
],
policyName: "wu-tang-ssl",
policyTypeName: "SSLNegotiationPolicyType",
});
const wu_tang_ssl_tls_1_1 = new aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", {
loadBalancerName: wu_tang.name,
policyAttributes: [{
name: "Reference-Security-Policy",
value: "ELBSecurityPolicy-TLS-1-1-2017-01",
}],
policyName: "wu-tang-ssl",
policyTypeName: "SSLNegotiationPolicyType",
});
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],
});
const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
loadBalancerName: wu_tang.name,
loadBalancerPort: 443,
policyNames: [wu_tang_ssl.policyName],
});constructor
new LoadBalancerPolicy(name: string, args: LoadBalancerPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a LoadBalancerPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerPolicyState, opts?: pulumi.CustomResourceOptions): LoadBalancerPolicyGet an existing LoadBalancerPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LoadBalancerPolicyReturns true if the given object is an instance of LoadBalancerPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerName
public loadBalancerName: pulumi.Output<string>;The load balancer on which the policy is defined.
property policyAttributes
public policyAttributes: pulumi.Output<LoadBalancerPolicyPolicyAttribute[] | undefined>;Policy attribute to apply to the policy.
property policyName
public policyName: pulumi.Output<string>;The name of the load balancer policy.
property policyTypeName
public policyTypeName: pulumi.Output<string>;The policy type.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SslNegotiationPolicy
class SslNegotiationPolicy extends CustomResourceProvides 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", {
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", {
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",
},
],
lbPort: 443,
loadBalancer: lb.id,
});constructor
new SslNegotiationPolicy(name: string, args: SslNegotiationPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a SslNegotiationPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SslNegotiationPolicyState, opts?: pulumi.CustomResourceOptions): SslNegotiationPolicyGet an existing SslNegotiationPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SslNegotiationPolicyReturns true if the given object is an instance of SslNegotiationPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property attributes
public attributes: pulumi.Output<SslNegotiationPolicyAttribute[] | undefined>;An SSL Negotiation policy attribute. Each has two properties:
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lbPort
public lbPort: pulumi.Output<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
public loadBalancer: pulumi.Output<string>;The load balancer to which the policy should be attached.
property name
public name: pulumi.Output<string>;The name of the attribute
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getHostedZoneId
getHostedZoneId(args?: GetHostedZoneIdArgs, opts?: pulumi.InvokeOptions): Promise<GetHostedZoneIdResult>Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = pulumi.output(aws.elb.getHostedZoneId({ async: true }));
const www = new aws.route53.Record("www", {
aliases: [{
evaluateTargetHealth: true,
name: aws_elb_main.dnsName,
zoneId: main.id,
}],
name: "example.com",
type: "A",
zoneId: aws_route53_zone_primary.zoneId,
});Function getLoadBalancer
getLoadBalancer(args: GetLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise<GetLoadBalancerResult>Provides information about a “classic” Elastic Load Balancer (ELB).
See LB Data Source if you are looking for “v2”
Application Load Balancer (ALB) or Network Load Balancer (NLB).
This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const lbName = config.get("lbName") || "";
const test = pulumi.output(aws.elb.getLoadBalancer({
name: lbName,
}, { async: true }));Function getServiceAccount
getServiceAccount(args?: GetServiceAccountArgs, opts?: pulumi.InvokeOptions): Promise<GetServiceAccountResult>Use this data source to get the Account ID of the AWS Elastic Load Balancing Service Account in a given region for the purpose of whitelisting in S3 bucket policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = pulumi.output(aws.elb.getServiceAccount({ async: true }));
const elbLogs = new aws.s3.Bucket("elb_logs", {
acl: "private",
policy: pulumi.interpolate`{
"Id": "Policy",
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*",
"Principal": {
"AWS": [
"${main.arn}"
]
}
}
]
}
`,
});
const bar = new aws.elb.LoadBalancer("bar", {
accessLogs: {
bucket: elbLogs.bucket,
interval: 5,
},
availabilityZones: ["us-west-2a"],
listeners: [{
instancePort: 8000,
instanceProtocol: "http",
lbPort: 80,
lbProtocol: "http",
}],
});Others
interface AppCookieStickinessPolicyArgs
interface AppCookieStickinessPolicyArgsThe set of arguments for constructing a AppCookieStickinessPolicy resource.
property cookieName
cookieName: pulumi.Input<string>;The application cookie whose lifetime the ELB’s cookie should follow.
property lbPort
lbPort: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer: pulumi.Input<string>;The name of load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the stickiness policy.
interface AppCookieStickinessPolicyState
interface AppCookieStickinessPolicyStateInput properties used for looking up and filtering AppCookieStickinessPolicy resources.
property cookieName
cookieName?: pulumi.Input<string>;The application cookie whose lifetime the ELB’s cookie should follow.
property lbPort
lbPort?: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer?: pulumi.Input<string>;The name of load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the stickiness policy.
interface AttachmentArgs
interface AttachmentArgsThe set of arguments for constructing a Attachment resource.
property elb
elb: pulumi.Input<string>;The name of the ELB.
property instance
instance: pulumi.Input<string>;Instance ID to place in the ELB pool.
interface AttachmentState
interface AttachmentStateInput properties used for looking up and filtering Attachment resources.
property elb
elb?: pulumi.Input<string>;The name of the ELB.
property instance
instance?: pulumi.Input<string>;Instance ID to place in the ELB pool.
interface GetHostedZoneIdArgs
interface GetHostedZoneIdArgsA collection of arguments for invoking getHostedZoneId.
property region
region?: undefined | string;Name of the region whose AWS ELB HostedZoneId is desired. Defaults to the region from the AWS provider configuration.
interface GetHostedZoneIdResult
interface GetHostedZoneIdResultA collection of values returned by getHostedZoneId.
property id
id: string;The provider-assigned unique ID for this managed resource.
property region
region?: undefined | string;interface GetLoadBalancerArgs
interface GetLoadBalancerArgsA collection of arguments for invoking getLoadBalancer.
property name
name: string;The unique name of the load balancer.
property tags
tags?: undefined | {[key: string]: any};interface GetLoadBalancerResult
interface GetLoadBalancerResultA collection of values returned by getLoadBalancer.
property accessLogs
accessLogs: GetLoadBalancerAccessLogs;property arn
arn: string;property availabilityZones
availabilityZones: string[];property connectionDraining
connectionDraining: boolean;property connectionDrainingTimeout
connectionDrainingTimeout: number;property crossZoneLoadBalancing
crossZoneLoadBalancing: boolean;property dnsName
dnsName: string;property healthCheck
healthCheck: GetLoadBalancerHealthCheck;property id
id: string;The provider-assigned unique ID for this managed resource.
property idleTimeout
idleTimeout: number;property instances
instances: string[];property internal
internal: boolean;property listeners
listeners: GetLoadBalancerListener[];property name
name: string;property securityGroups
securityGroups: string[];property sourceSecurityGroup
sourceSecurityGroup: string;property sourceSecurityGroupId
sourceSecurityGroupId: string;property subnets
subnets: string[];property tags
tags: {[key: string]: any};property zoneId
zoneId: string;interface GetServiceAccountArgs
interface GetServiceAccountArgsA collection of arguments for invoking getServiceAccount.
property region
region?: undefined | string;Name of the region whose AWS ELB account ID is desired. Defaults to the region from the AWS provider configuration.
interface GetServiceAccountResult
interface GetServiceAccountResultA collection of values returned by getServiceAccount.
property arn
arn: string;The ARN of the AWS ELB service account in the selected region.
property id
id: string;The provider-assigned unique ID for this managed resource.
property region
region?: undefined | string;interface ListenerPolicyArgs
interface ListenerPolicyArgsThe set of arguments for constructing a ListenerPolicy resource.
property loadBalancerName
loadBalancerName: pulumi.Input<string>;The load balancer to attach the policy to.
property loadBalancerPort
loadBalancerPort: pulumi.Input<number>;The load balancer listener port to apply the policy to.
property policyNames
policyNames?: pulumi.Input<pulumi.Input<string>[]>;List of Policy Names to apply to the backend server.
interface ListenerPolicyState
interface ListenerPolicyStateInput properties used for looking up and filtering ListenerPolicy resources.
property loadBalancerName
loadBalancerName?: pulumi.Input<string>;The load balancer to attach the policy to.
property loadBalancerPort
loadBalancerPort?: pulumi.Input<number>;The load balancer listener port to apply the policy to.
property policyNames
policyNames?: pulumi.Input<pulumi.Input<string>[]>;List of Policy Names to apply to the backend server.
interface LoadBalancerArgs
interface LoadBalancerArgsThe set of arguments for constructing a LoadBalancer resource.
property accessLogs
accessLogs?: pulumi.Input<LoadBalancerAccessLogs>;An Access Logs block. Access Logs documented below.
property availabilityZones
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;The AZ’s to serve traffic in.
property connectionDraining
connectionDraining?: pulumi.Input<boolean>;Boolean to enable connection draining. Default: false
property connectionDrainingTimeout
connectionDrainingTimeout?: pulumi.Input<number>;The time in seconds to allow for connections to drain. Default: 300
property crossZoneLoadBalancing
crossZoneLoadBalancing?: pulumi.Input<boolean>;Enable cross-zone load balancing. Default: true
property healthCheck
healthCheck?: pulumi.Input<LoadBalancerHealthCheck>;A healthCheck block. Health Check documented below.
property idleTimeout
idleTimeout?: pulumi.Input<number>;The time in seconds that the connection is allowed to be idle. Default: 60
property instances
instances?: pulumi.Input<pulumi.Input<string>[]>;A list of instance ids to place in the ELB pool.
property internal
internal?: pulumi.Input<boolean>;If true, ELB will be an internal ELB.
property listeners
listeners: pulumi.Input<pulumi.Input<LoadBalancerListener>[]>;A list of listener blocks. Listeners documented below.
property name
name?: pulumi.Input<string>;The name of the ELB. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property securityGroups
securityGroups?: pulumi.Input<pulumi.Input<string>[]>;A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
property sourceSecurityGroup
sourceSecurityGroup?: pulumi.Input<string>;The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
property subnets
subnets?: pulumi.Input<pulumi.Input<string>[]>;A list of subnet IDs to attach to the ELB.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface LoadBalancerBackendServerPolicyArgs
interface LoadBalancerBackendServerPolicyArgsThe set of arguments for constructing a LoadBalancerBackendServerPolicy resource.
property instancePort
instancePort: pulumi.Input<number>;The instance port to apply the policy to.
property loadBalancerName
loadBalancerName: pulumi.Input<string>;The load balancer to attach the policy to.
property policyNames
policyNames?: pulumi.Input<pulumi.Input<string>[]>;List of Policy Names to apply to the backend server.
interface LoadBalancerBackendServerPolicyState
interface LoadBalancerBackendServerPolicyStateInput properties used for looking up and filtering LoadBalancerBackendServerPolicy resources.
property instancePort
instancePort?: pulumi.Input<number>;The instance port to apply the policy to.
property loadBalancerName
loadBalancerName?: pulumi.Input<string>;The load balancer to attach the policy to.
property policyNames
policyNames?: pulumi.Input<pulumi.Input<string>[]>;List of Policy Names to apply to the backend server.
interface LoadBalancerCookieStickinessPolicyArgs
interface LoadBalancerCookieStickinessPolicyArgsThe set of arguments for constructing a LoadBalancerCookieStickinessPolicy resource.
property cookieExpirationPeriod
cookieExpirationPeriod?: pulumi.Input<number>;The time period after which the session cookie should be considered stale, expressed in seconds.
property lbPort
lbPort: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer: pulumi.Input<string>;The load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the stickiness policy.
interface LoadBalancerCookieStickinessPolicyState
interface LoadBalancerCookieStickinessPolicyStateInput properties used for looking up and filtering LoadBalancerCookieStickinessPolicy resources.
property cookieExpirationPeriod
cookieExpirationPeriod?: pulumi.Input<number>;The time period after which the session cookie should be considered stale, expressed in seconds.
property lbPort
lbPort?: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer?: pulumi.Input<string>;The load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the stickiness policy.
interface LoadBalancerPolicyArgs
interface LoadBalancerPolicyArgsThe set of arguments for constructing a LoadBalancerPolicy resource.
property loadBalancerName
loadBalancerName: pulumi.Input<string>;The load balancer on which the policy is defined.
property policyAttributes
policyAttributes?: pulumi.Input<pulumi.Input<LoadBalancerPolicyPolicyAttribute>[]>;Policy attribute to apply to the policy.
property policyName
policyName: pulumi.Input<string>;The name of the load balancer policy.
property policyTypeName
policyTypeName: pulumi.Input<string>;The policy type.
interface LoadBalancerPolicyState
interface LoadBalancerPolicyStateInput properties used for looking up and filtering LoadBalancerPolicy resources.
property loadBalancerName
loadBalancerName?: pulumi.Input<string>;The load balancer on which the policy is defined.
property policyAttributes
policyAttributes?: pulumi.Input<pulumi.Input<LoadBalancerPolicyPolicyAttribute>[]>;Policy attribute to apply to the policy.
property policyName
policyName?: pulumi.Input<string>;The name of the load balancer policy.
property policyTypeName
policyTypeName?: pulumi.Input<string>;The policy type.
interface LoadBalancerState
interface LoadBalancerStateInput properties used for looking up and filtering LoadBalancer resources.
property accessLogs
accessLogs?: pulumi.Input<LoadBalancerAccessLogs>;An Access Logs block. Access Logs documented below.
property arn
arn?: pulumi.Input<string>;The ARN of the ELB
property availabilityZones
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;The AZ’s to serve traffic in.
property connectionDraining
connectionDraining?: pulumi.Input<boolean>;Boolean to enable connection draining. Default: false
property connectionDrainingTimeout
connectionDrainingTimeout?: pulumi.Input<number>;The time in seconds to allow for connections to drain. Default: 300
property crossZoneLoadBalancing
crossZoneLoadBalancing?: pulumi.Input<boolean>;Enable cross-zone load balancing. Default: true
property dnsName
dnsName?: pulumi.Input<string>;The DNS name of the ELB
property healthCheck
healthCheck?: pulumi.Input<LoadBalancerHealthCheck>;A healthCheck block. Health Check documented below.
property idleTimeout
idleTimeout?: pulumi.Input<number>;The time in seconds that the connection is allowed to be idle. Default: 60
property instances
instances?: pulumi.Input<pulumi.Input<string>[]>;A list of instance ids to place in the ELB pool.
property internal
internal?: pulumi.Input<boolean>;If true, ELB will be an internal ELB.
property listeners
listeners?: pulumi.Input<pulumi.Input<LoadBalancerListener>[]>;A list of listener blocks. Listeners documented below.
property name
name?: pulumi.Input<string>;The name of the ELB. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property securityGroups
securityGroups?: pulumi.Input<pulumi.Input<string>[]>;A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
property sourceSecurityGroup
sourceSecurityGroup?: pulumi.Input<string>;The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
property sourceSecurityGroupId
sourceSecurityGroupId?: pulumi.Input<string>;The ID of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Only available on ELBs launched in a VPC.
property subnets
subnets?: pulumi.Input<pulumi.Input<string>[]>;A list of subnet IDs to attach to the ELB.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
property zoneId
zoneId?: pulumi.Input<string>;The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
interface SslNegotiationPolicyArgs
interface SslNegotiationPolicyArgsThe set of arguments for constructing a SslNegotiationPolicy resource.
property attributes
attributes?: pulumi.Input<pulumi.Input<SslNegotiationPolicyAttribute>[]>;An SSL Negotiation policy attribute. Each has two properties:
property lbPort
lbPort: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer: pulumi.Input<string>;The load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the attribute
interface SslNegotiationPolicyState
interface SslNegotiationPolicyStateInput properties used for looking up and filtering SslNegotiationPolicy resources.
property attributes
attributes?: pulumi.Input<pulumi.Input<SslNegotiationPolicyAttribute>[]>;An SSL Negotiation policy attribute. Each has two properties:
property lbPort
lbPort?: pulumi.Input<number>;The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
property loadBalancer
loadBalancer?: pulumi.Input<string>;The load balancer to which the policy should be attached.
property name
name?: pulumi.Input<string>;The name of the attribute