AwsElasticloadbalancing

Service-level AWS Elastic Load Balancing component.

Remarks

Capabilities:

  • Application load balancer orchestration (ALB, listeners, rules, certificates, and target-group references)
  • Standalone target-group creation for independent lifecycle use-cases

args.alb.name or args.targetGroup.name must be a synchronous plain string and is used as the component logical identity.

Naming:

  • Root type ${namespace}:aws:AwsElasticloadbalancing has capability elasticloadbalancing and the raw shared identity args.alb.name or args.targetGroup.name; target ${env}-${projectHash}-elasticloadbalancing-${sanitiseNamePart(identity)}. Both fields are SHARED logical/provider identities and provider purpose validation rejects non-camelCase, over-length, and non-plain values before resource creation.
  • aws:lb/loadBalancer:LoadBalancer has tuple [args.alb.name]; aws:lb/targetGroup:TargetGroup has tuple [args.targetGroup.name]; each target is ${env}-${projectHash}-${sanitiseNamePart(identity)}.
  • aws:lb/listener:Listener uses [args.alb.name, listener map key]; aws:lb/listenerCertificate:ListenerCertificate uses [args.alb.name, listener map key, additionalCertificate map key]; and aws:lb/listenerRule:ListenerRule uses [args.alb.name, listener map key, rule map key]. Each keyed collection has group-wide collision preflight.
  • The load balancer provider name uses args.alb.name and the target-group provider name uses args.targetGroup.name, each with stackAndPurpose and buildAwsNameFromCamelCasePurpose; the exact result is ${env}-${projectHash}-<purpose>, preserving camelCase and restricting purpose to 19 characters for AWS's 32-character limit.
  • Listeners, rules and certificates have provider-generated/semantic identifiers; no provider name is set.

Example

CODE
const alb = new AwsElasticloadbalancing({
  alb: {
    name: 'platform',
    internetFacing: false,
    subnets: vpc.privateSubnetIds,
    securityGroups: [albSecurityGroup.id],
    listeners: {
      https: {
        port: 443,
        protocol: 'HTTPS',
        certificate: {
          type: 'existing',
          arn: certificate.arn,
        },
        defaultActions: [{ type: 'forward', targetGroup: apiTargetGroup.targetGroup! }],
      },
    },
  },
});

Constructors

new AwsElasticloadbalancing( args: AwsElasticloadbalancingArgs, options?: ComponentResourceOptions, ): AwsElasticloadbalancing

Parameters

  • args (AwsElasticloadbalancingArgs) — Capability arguments for ALB orchestration or standalone target-group creation.
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsElasticloadbalancing

Hierarchy

  • ComponentResource
  • AwsElasticloadbalancing

Properties

listenerArnsByKey: Record<string, pulumi.Output<string>>

readonly

Listener ARNs created under ALB capability, keyed by input identity.

listenerRuleArnsByKey: Record<string, pulumi.Output<string>>

readonly

Listener rule ARNs created under ALB capability, keyed by listener and rule identity.

loadBalancerArn: Output<string> | undefined

readonly

ALB ARN output.

loadBalancerDnsName: Output<string> | undefined

readonly

ALB DNS name output.

loadBalancerZoneId: Output<string> | undefined

readonly

ALB Route53 zone ID output.

targetGroupArn: Output<string> | undefined

readonly

Standalone target-group ARN output.

urn: Output<string>

readonly

Inherited from urn

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

getData(): Promise<any>

protectedasync

Inherited from getData

Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.

Returns

  • Promise<any>

getProvider(moduleMember: string): ProviderResource | undefined

Inherited from getProvider

Returns the provider for the given module member, if one exists.

Parameters

  • moduleMember (string)

Returns

  • ProviderResource | undefined

initialize( args: Inputs, opts?: ComponentResourceOptions, name?: string, type?: string, ): Promise<any>

protectedasync

Inherited from initialize

Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.

Parameters

  • args (Inputs)
  • opts (ComponentResourceOptions, optional)
  • name (string, optional)
  • type (string, optional)

Returns

  • Promise<any>

registerOutputs( outputs?: Inputs | Promise<Inputs> | Output<Inputs>, ): void

protected

Inherited from registerOutputs

Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

Parameters

  • outputs (Inputs | Promise<Inputs> | Output<Inputs>, optional)

Returns

  • void

Static Methods

isInstance(obj: any): obj is ComponentResource<any>

static

Inherited from isInstance

Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

Parameters

  • obj (any)

Returns

  • obj is ComponentResource<any>