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:AwsElasticloadbalancinghas capabilityelasticloadbalancingand the raw shared identityargs.alb.nameorargs.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:LoadBalancerhas tuple[args.alb.name];aws:lb/targetGroup:TargetGrouphas tuple[args.targetGroup.name]; each target is${env}-${projectHash}-${sanitiseNamePart(identity)}.aws:lb/listener:Listeneruses[args.alb.name, listener map key];aws:lb/listenerCertificate:ListenerCertificateuses[args.alb.name, listener map key, additionalCertificate map key]; andaws:lb/listenerRule:ListenerRuleuses[args.alb.name, listener map key, rule map key]. Each keyed collection has group-wide collision preflight.- The load balancer provider
nameusesargs.alb.nameand the target-group providernameusesargs.targetGroup.name, each withstackAndPurposeandbuildAwsNameFromCamelCasePurpose; 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
nameis set.
Example
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
ComponentResourceAwsElasticloadbalancing
Properties
listenerArnsByKey: Record<string, pulumi.Output<string>>
Listener ARNs created under ALB capability, keyed by input identity.
listenerRuleArnsByKey: Record<string, pulumi.Output<string>>
Listener rule ARNs created under ALB capability, keyed by listener and rule identity.
loadBalancerArn: Output<string> | undefined
ALB ARN output.
loadBalancerDnsName: Output<string> | undefined
ALB DNS name output.
loadBalancerZoneId: Output<string> | undefined
ALB Route53 zone ID output.
targetGroupArn: Output<string> | undefined
Standalone target-group ARN output.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
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>
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
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>
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>