AwsIpam
Service-level AWS EC2 IPAM component.
Remarks
One capability is created per component instance:
ipam: creates oneaws.ec2.VpcIpamresource.pool: creates oneaws.ec2.VpcIpamPoolresource, optionalaws.ec2.VpcIpamPoolCidrchild resources, and an optional nestedAwsRamresource association.
Naming:
- Root type
${namespace}:aws:AwsIpamuses the active shared logical/provider identity: the IPAM capability uses literal capabilityipamandargs.ipam.name, yielding${env}-${projectHash}-ipam-${sanitised args.ipam.name}; the pool capability uses literal capabilityipam-poolandargs.pool.name, yielding${env}-${projectHash}-ipam-pool-${sanitised args.pool.name}. - Qualified child type
aws:ec2/vpcIpam:VpcIpamuses tuple[args.ipam.name]; qualified child typeaws:ec2/vpcIpamPool:VpcIpamPooluses tuple[args.pool.name]. - Qualified child type
aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidruses tuple[args.pool.name, args.pool.cidrs map key]. The map key is the raw CIDR forwarded unchanged to the providercidrinput; normalised-key collisions are preflighted before a CIDR child is created. - When pool sharing is configured, a nested
${runtimeContext.namespace}:aws:AwsRamcomponent, parented byAwsIpam, usesresource-associationandargs.pool.nameas its identity, yielding${env}-${projectHash}-resource-association-${sanitised args.pool.name}. Itsaws:ram/resourceAssociation:ResourceAssociationchild uses tuple[args.pool.name]. - IPAM and pool
Nametags use thestackAndPurposestyle${env}-${projectHash}-<name>from the exact activenamefield. 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
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. Usenew AwsIpam(args, options).The component logical name is derived from the active capability'snamefield.options(ComponentResourceOptions, optional) — Optional resource settings controlling provider and parenting behaviour.
Returns
AwsIpam
Hierarchy
ComponentResourceAwsIpam
Properties
ipam: VpcIpam | undefined
Optional IPAM resource created by this component.
ipamArn: Output<string> | undefined
Optional IPAM ARN output.
ipamId: Output<string> | undefined
Optional IPAM ID output.
pool: VpcIpamPool | undefined
Optional pool resource created by this component.
poolArn: Output<string> | undefined
Optional pool ARN output.
poolCidrs: Record<string, VpcIpamPoolCidr> | undefined
Optional pool CIDR resources keyed by the corresponding args.pool.cidrs CIDR key.
poolId: Output<string> | undefined
Optional pool ID output.
privateDefaultScopeId: Output<string> | undefined
Optional private default scope ID output.
publicDefaultScopeId: Output<string> | undefined
Optional public default scope ID output.
ramResourceAssociation: ResourceAssociation | undefined
Optional RAM association resource created for a pool capability.
ramResourceShareArn: Output<string> | undefined
Optional RAM resource-share ARN output for pool association.
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>