AwsCloudformation

Service-level AWS CloudFormation component.

Remarks

This is the primary component resource for the package. It orchestrates one CloudFormation capability per instance: stack or stack set.

Naming:

  • Root: type ${namespace}:aws:AwsCloudformation; capability cloudformation; identity is the raw selected args.stack.name or args.stackSet.name; target ${env}-${projectHash}-cloudformation-${sanitiseNamePart(identity)}. The identity must retain an ASCII alphanumeric character after sanitisation.
  • aws:cloudformation/stack:Stack has parent AwsCloudformation, tuple [args.stack.name], and target ${env}-${projectHash}-${sanitiseNamePart(args.stack.name)}.
  • aws:cloudformation/stackSet:StackSet and aws:cloudformation/stackInstances:StackInstances have parent AwsCloudformation, tuple [args.stackSet.name], and target ${env}-${projectHash}-${sanitiseNamePart(args.stackSet.name)}. Their qualified provider resource types keep the identical tuple names distinct.
  • AWS provider names: Stack name (source args.stack.name) and StackSet name (source args.stackSet.name) use stackAndPurpose ${env}-${projectHash}-${purpose} and are forwarded through buildAwsNameFromCamelCasePurpose(...). StackInstances has no controlled provider name: its stackSetName forwards the created StackSet name.

Example

CODE
const cloudformation = new AwsCloudformation({
  stack: {
    name: 'governanceBaseline',
    templateFile: { path: './templates/governance.cf' },
  },
});

Constructors

new AwsCloudformation( args: AwsCloudformationArgs, options?: ComponentResourceOptions, ): AwsCloudformation

Parameters

  • args (AwsCloudformationArgs) — Service-level CloudFormation capability inputs. Use new AwsCloudformation(args, options).The component logical name is derived from the selected capability identity field:
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsCloudformation

Hierarchy

  • ComponentResource
  • AwsCloudformation

Properties

stack: Stack

readonly

Optional CloudFormation stack resource created by this component.

stackInstances: StackInstances

readonly

Optional CloudFormation stack-instances resource created by this component.

stackSet: StackSet

readonly

Optional CloudFormation stack-set resource created by this component.

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>