@pulumi/cdk

January 9, 2026 · View on GitHub

@pulumi/cdkDocs


@pulumi/cdk

Enumerations

PulumiProvider

The Pulumi provider to read the schema from

Enumeration Members

Enumeration MemberValueDefined in
AWS_NATIVE"aws-native"types.ts:63

Classes

App

A Pulumi CDK App component. This is the entrypoint to your Pulumi CDK application. The second argument is a callback function where all CDK resources must be created.

Example

import * as s3 from 'aws-cdk-lib/aws-s3';
import * as pulumicdk from '@pulumi/cdk';

const app = new pulumicdk.App('app', (scope: pulumicdk.App): pulumicdk.AppOutputs => {
  // All resources must be created within a Pulumi Stack
  const stack = new pulumicdk.Stack(scope, 'pulumi-stack');
  const bucket = new s3.Bucket(stack, 'my-bucket');
  return {
    bucket: stack.asOutput(bucket.bucketName),
  };
});

export const bucket = app.outputs['bucket'];

Extends

  • ComponentResource<AppResource>

Implements

Constructors

new App()

new App(id, createFunc, props?): App

Parameters
ParameterType
idstring
createFunc(scope) => void | AppOutputs
props?AppResourceOptions
Returns

App

Overrides

pulumi.ComponentResource<AppResource>.constructor

Defined in

stack.ts:106

Properties

PropertyModifierTypeDefault valueDescriptionDefined in
namereadonlystringundefinedThe name of the componentstack.ts:58
outputspublicobject{}The collection of outputs from the AWS CDK Stack represented as Pulumi Outputs. Each CfnOutput defined in the AWS CDK Stack will populate a value in the outputs.stack.ts:64

Accessors

env
Get Signature

get env(): Environment

This can be used to get the CDK Environment based on the Pulumi Provider used for the App. You can then use this to configure an explicit environment on Stacks.

Example
const app = new pulumicdk.App('app', (scope: pulumicdk.App) => {
    const stack = new pulumicdk.Stack(scope, 'pulumi-stack', {
        props: { env: app.env },
    });
});
Returns

Environment

the CDK Environment configured for the App

Defined in

stack.ts:156


Stack

A Construct that represents an AWS CDK stack deployed with Pulumi.

In order to deploy a CDK stack with Pulumi, it must derive from this class.

Extends

  • Stack

Constructors

new Stack()

new Stack(app, name, options?): Stack

Create and register an AWS CDK stack deployed with Pulumi.

Parameters
ParameterTypeDescription
appApp-
namestringThe unique name of the resource.
options?StackOptionsA bag of options that control this resource's behavior.
Returns

Stack

Overrides

cdk.Stack.constructor

Defined in

stack.ts:374

Methods

asOutput()

asOutput<T>(v): Output<Unwrap<T>>

Convert a CDK value to a Pulumi Output.

Type Parameters
Type Parameter
T
Parameters
ParameterTypeDescription
vTA CDK value.
Returns

Output<Unwrap<T>>

A Pulumi Output value.

Defined in

stack.ts:456

Interfaces

AppComponent

AppComponent is the interface representing the Pulumi CDK App Component Resource

Properties

PropertyModifierTypeDescriptionDefined in
namereadonlystringThe name of the componenttypes.ts:73

AppOptions

Options for creating a Pulumi CDK App Component

Properties

PropertyTypeDescriptionDefined in
appId?stringA unique identifier for the application that the asset staging stack belongs to. This identifier will be used in the name of staging resources created for this application, and should be unique across apps. The identifier should include lowercase characters, numbers, periods (.) and dashes ('-') only and have a maximum of 17 characters. Default - generated from the pulumi project and stack nametypes.ts:26
props?AppPropsSpecify the CDK Stack properties to asociate with the stack.types.ts:13

Methods

remapCloudControlResource()?

optional remapCloudControlResource(logicalId, typeName, props, options): undefined | ResourceMapping

Defines a mapping to override and/or provide an implementation for a CloudFormation resource type that is not (yet) implemented in the AWS Cloud Control API (and thus not yet available in the Pulumi AWS Native provider). Pulumi code can override this method to provide a custom mapping of CloudFormation elements and their properties into Pulumi CustomResources, commonly by using the AWS Classic provider to implement the missing resource.

Parameters
ParameterTypeDescription
logicalIdstringThe logical ID of the resource being mapped.
typeNamestringThe CloudFormation type name of the resource being mapped.
propsanyThe bag of input properties to the CloudFormation resource being mapped.
optionsResourceOptionsThe set of Pulumi ResourceOptions to apply to the resource being mapped.
Returns

undefined | ResourceMapping

An object containing one or more logical IDs mapped to Pulumi resources that must be created to implement the mapped CloudFormation resource, or else undefined if no mapping is implemented.

Defined in

types.ts:43


AppResourceOptions

Options specific to the Pulumi CDK App component.

Extends

  • ComponentResourceOptions

Properties

PropertyTypeDefined in
appOptions?AppOptionstypes.ts:55

StackOptions

Options for creating a Pulumi CDK Stack

Any Pulumi resource options provided at the Stack level will override those configured at the App level

Example

new App('testapp', (scope: App) => {
    // This stack will inherit the options from the App
    new Stack(scope, 'teststack1');

   // Override the options for this stack
   new Stack(scope, 'teststack', {
       providers: [
         new native.Provider('custom-provider', { region: 'us-east-1' }),
       ],
       props: { env: { region: 'us-east-1' } },
   })
}, {
     providers: [
         new native.Provider('app-provider', { region: 'us-west-2' }),
     ]

})

Extends

  • ComponentResourceOptions

Properties

PropertyTypeDescriptionDefined in
props?StackPropsThe CDK Stack propsstack.ts:335

Type Aliases

AppOutputs

AppOutputs: object

Index Signature

[outputId: string]: pulumi.Output<any>

Defined in

stack.ts:30

Functions

asList()

asList(o): string[]

Convert a Pulumi Output to a list of CDK string values.

Parameters

ParameterTypeDescription
oOutput<string[]>A Pulumi Output value which represents a list of strings.

Returns

string[]

A CDK token representing a list of string values.

Defined in

output.ts:45


asNumber()

asNumber(o): number

Convert a Pulumi Output to a CDK number value.

Parameters

ParameterTypeDescription
oOutputInstance<number>A Pulumi Output value which represents a number.

Returns

number

A CDK token representing a number value.

Defined in

output.ts:35


asString()

asString(o): string

Convert a Pulumi Output to a CDK string value.

Parameters

ParameterTypeDescription
oOutput<string>A Pulumi Output value which represents a string.

Returns

string

A CDK token representing a string value.

Defined in

output.ts:25

Namespaces