AwsTransitGateway

Service-level AWS Transit Gateway component.

Remarks

One capability is created per component instance:

  • gateway: creates one aws.ec2transitgateway.TransitGateway and an optional nested AwsRam association.
  • vpcAttachment: creates one aws.ec2transitgateway.VpcAttachment and, when acceptance supplies the Transit Gateway owner provider, one aws.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:AwsTransitGateway uses capability gateway with args.gateway.name, yielding ${env}-${projectHash}-gateway-${sanitised args.gateway.name}, or capability vpc-attachment with args.vpcAttachment.name, yielding ${env}-${projectHash}-vpc-attachment-${sanitised args.vpcAttachment.name}. Each identity is a required synchronous plain string shared with its capability's provider Name tag.
  • Child path parent AwsTransitGateway, aws:ec2transitgateway/transitGateway:TransitGateway uses tuple [args.gateway.name], yielding ${env}-${projectHash}-${sanitised args.gateway.name}. When configured, a nested ${namespace}:aws:AwsRam component, parented by AwsTransitGateway, uses resource-association and args.gateway.name as its identity, yielding ${env}-${projectHash}-resource-association-${sanitised args.gateway.name}. Its aws:ram/resourceAssociation:ResourceAssociation child uses tuple [args.gateway.name].
  • Child path parent AwsTransitGateway, aws:ec2transitgateway/vpcAttachment:VpcAttachment uses tuple [args.vpcAttachment.name], yielding ${env}-${projectHash}-${sanitised args.vpcAttachment.name}. Child path parent AwsTransitGateway, aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter uses 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 Name tags call buildAwsNameFromCamelCasePurpose('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

CODE
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

  • ComponentResource
  • AwsTransitGateway

Properties

associationDefaultRouteTableId: Output<string> | undefined

readonly

Optional default association route-table ID.

gateway: TransitGateway | undefined

readonly

Optional Transit Gateway resource.

propagationDefaultRouteTableId: Output<string> | undefined

readonly

Optional default propagation route-table ID.

ramResourceAssociation: ResourceAssociation | undefined

readonly

Optional RAM resource association.

ramResourceShareArn: Output<string> | undefined

readonly

Optional resolved RAM resource-share ARN.

transitGatewayArn: Output<string> | undefined

readonly

Optional Transit Gateway ARN.

transitGatewayId: Output<string> | undefined

readonly

Optional Transit Gateway ID.

urn: Output<string>

readonly

Inherited from urn

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

vpcAttachment: VpcAttachment | undefined

readonly

Optional VPC-attachment resource.

vpcAttachmentAccepter: VpcAttachmentAccepter | undefined

readonly

Optional accepter-side VPC-attachment resource.

vpcAttachmentArn: Output<string> | undefined

readonly

Optional VPC-attachment ARN.

vpcAttachmentId: Output<string> | undefined

readonly

Optional VPC-attachment ID.

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>