AwsIpam

Service-level AWS EC2 IPAM component.

Remarks

One capability is created per component instance:

  • ipam: creates one aws.ec2.VpcIpam resource.
  • pool: creates one aws.ec2.VpcIpamPool resource, optional aws.ec2.VpcIpamPoolCidr child resources, and an optional nested AwsRam resource association.

Naming:

  • Root type ${namespace}:aws:AwsIpam uses the active shared logical/provider identity: the IPAM capability uses literal capability ipam and args.ipam.name, yielding ${env}-${projectHash}-ipam-${sanitised args.ipam.name}; the pool capability uses literal capability ipam-pool and args.pool.name, yielding ${env}-${projectHash}-ipam-pool-${sanitised args.pool.name}.
  • Qualified child type aws:ec2/vpcIpam:VpcIpam uses tuple [args.ipam.name]; qualified child type aws:ec2/vpcIpamPool:VpcIpamPool uses tuple [args.pool.name].
  • Qualified child type aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidr uses tuple [args.pool.name, args.pool.cidrs map key]. The map key is the raw CIDR forwarded unchanged to the provider cidr input; normalised-key collisions are preflighted before a CIDR child is created.
  • When pool sharing is configured, a nested ${runtimeContext.namespace}:aws:AwsRam component, parented by AwsIpam, uses resource-association and args.pool.name as its identity, yielding ${env}-${projectHash}-resource-association-${sanitised args.pool.name}. Its aws:ram/resourceAssociation:ResourceAssociation child uses tuple [args.pool.name].
  • IPAM and pool Name tags use the stackAndPurpose style ${env}-${projectHash}-<name> from the exact active name field. The shared purpose helper validates camelCase input; EC2 tag values allow 256 characters, so no shorter component length budget applies. Pool CIDR and RAM-association resources have no provider naming field, so their provider-generated names remain unset.

Example

CODE
import { AwsIpam } from '@jobcloud/aws-ipam';

const sharedIpam = new AwsIpam({
  ipam: {
    name: 'sharedIpam',
    operatingRegions: ['eu-west-1'],
  },
});

const workloadPool = new AwsIpam({
  pool: {
    name: 'workloadPrivatePool',
    ipam: sharedIpam,
    scope: 'private',
  },
});

Constructors

new AwsIpam( args: AwsIpamArgs, options?: ComponentResourceOptions, ): AwsIpam

Parameters

  • args (AwsIpamArgs) — Service-level EC2 IPAM capability inputs. Use new AwsIpam(args, options).The component logical name is derived from the active capability's name field.
  • options (ComponentResourceOptions, optional) — Optional resource settings controlling provider and parenting behaviour.

Returns

AwsIpam

Hierarchy

  • ComponentResource
  • AwsIpam

Properties

ipam: VpcIpam | undefined

readonly

Optional IPAM resource created by this component.

ipamArn: Output<string> | undefined

readonly

Optional IPAM ARN output.

ipamId: Output<string> | undefined

readonly

Optional IPAM ID output.

pool: VpcIpamPool | undefined

readonly

Optional pool resource created by this component.

poolArn: Output<string> | undefined

readonly

Optional pool ARN output.

poolCidrs: Record<string, VpcIpamPoolCidr> | undefined

readonly

Optional pool CIDR resources keyed by the corresponding args.pool.cidrs CIDR key.

poolId: Output<string> | undefined

readonly

Optional pool ID output.

privateDefaultScopeId: Output<string> | undefined

readonly

Optional private default scope ID output.

publicDefaultScopeId: Output<string> | undefined

readonly

Optional public default scope ID output.

ramResourceAssociation: ResourceAssociation | undefined

readonly

Optional RAM association resource created for a pool capability.

ramResourceShareArn: Output<string> | undefined

readonly

Optional RAM resource-share ARN output for pool association.

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>