AwsTransitGateway
Service-level AWS Transit Gateway component.
Remarks
One capability is created per component instance:
gateway: creates oneaws.ec2transitgateway.TransitGatewayand an optional nestedAwsRamassociation.vpcAttachment: creates oneaws.ec2transitgateway.VpcAttachmentand, whenacceptancesupplies the Transit Gateway owner provider, oneaws.ec2transitgateway.VpcAttachmentAccepter. Same-account attachments explicitly disable requester-side default route-table association and propagation. Cross-account attachments leave those requester-side settings unmanaged and disable both settings on the owner-side accepter. Create explicit Transit Gateway route-table association and propagation resources when routing is required.
Naming:
- Root type
${namespace}:aws:AwsTransitGatewayuses capabilitygatewaywithargs.gateway.name, yielding${env}-${projectHash}-gateway-${sanitised args.gateway.name}, or capabilityvpc-attachmentwithargs.vpcAttachment.name, yielding${env}-${projectHash}-vpc-attachment-${sanitised args.vpcAttachment.name}. Each identity is a required synchronous plain string shared with its capability's providerNametag. - Child path parent
AwsTransitGateway,aws:ec2transitgateway/transitGateway:TransitGatewayuses tuple[args.gateway.name], yielding${env}-${projectHash}-${sanitised args.gateway.name}. When configured, a nested${namespace}:aws:AwsRamcomponent, parented byAwsTransitGateway, usesresource-associationandargs.gateway.nameas its identity, yielding${env}-${projectHash}-resource-association-${sanitised args.gateway.name}. Itsaws:ram/resourceAssociation:ResourceAssociationchild uses tuple[args.gateway.name]. - Child path parent
AwsTransitGateway,aws:ec2transitgateway/vpcAttachment:VpcAttachmentuses tuple[args.vpcAttachment.name], yielding${env}-${projectHash}-${sanitised args.vpcAttachment.name}. Child path parentAwsTransitGateway,aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepteruses the same tuple and formula under its distinct qualified provider type; both paths are safe because a component creates at most one resource of each qualified provider type. - Gateway and attachment
Nametags callbuildAwsNameFromCamelCasePurpose('stackAndPurpose', runtimeContext, <args capability name>, <field path>, 'AwsTransitGateway'), resolving to${env}-${projectHash}-<name>. They have no non-purpose tokens, suffixes, or casing transformation. EC2 tag values allow 256 characters, so no shorter component purpose budget applies. RAM association has no provider-visible name and uses a provider-generated identifier. The direct VPC/subnet IDs and the migration VPC/subnet Name tags are external identifiers and are forwarded or resolved unchanged.
Example
import { AwsTransitGateway } from '@jobcloud/aws-transit-gateway';
const transitGateway = new AwsTransitGateway({ gateway: { name: 'sharedNetwork' } });
const applicationAttachment = new AwsTransitGateway({
vpcAttachment: {
name: 'application',
transitGateway,
vpc: { vpcId: 'vpc-0123456789abcdef0' },
subnetIds: ['subnet-0123456789abcdef0'],
},
});Constructors
new AwsTransitGateway(
args: AwsTransitGatewayArgs,
options?: ComponentResourceOptions,
): AwsTransitGateway
Parameters
args(AwsTransitGatewayArgs)options(ComponentResourceOptions, optional)
Returns
AwsTransitGateway
Hierarchy
ComponentResourceAwsTransitGateway
Properties
associationDefaultRouteTableId: Output<string> | undefined
Optional default association route-table ID.
gateway: TransitGateway | undefined
Optional Transit Gateway resource.
propagationDefaultRouteTableId: Output<string> | undefined
Optional default propagation route-table ID.
ramResourceAssociation: ResourceAssociation | undefined
Optional RAM resource association.
ramResourceShareArn: Output<string> | undefined
Optional resolved RAM resource-share ARN.
transitGatewayArn: Output<string> | undefined
Optional Transit Gateway ARN.
transitGatewayId: Output<string> | undefined
Optional Transit Gateway ID.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
vpcAttachment: VpcAttachment | undefined
Optional VPC-attachment resource.
vpcAttachmentAccepter: VpcAttachmentAccepter | undefined
Optional accepter-side VPC-attachment resource.
vpcAttachmentArn: Output<string> | undefined
Optional VPC-attachment ARN.
vpcAttachmentId: Output<string> | undefined
Optional VPC-attachment ID.
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>