This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.

cloudformation

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class pulumi_aws.cloudformation.AwaitableGetExportResult(exporting_stack_id=None, id=None, name=None, value=None)
class pulumi_aws.cloudformation.AwaitableGetStackResult(capabilities=None, description=None, disable_rollback=None, iam_role_arn=None, id=None, name=None, notification_arns=None, outputs=None, parameters=None, tags=None, template_body=None, timeout_in_minutes=None)
class pulumi_aws.cloudformation.GetExportResult(exporting_stack_id=None, id=None, name=None, value=None)

A collection of values returned by getExport.

exporting_stack_id = None

The exporting_stack_id (AWS ARNs) equivalent ExportingStackId from list-exports

id = None

The provider-assigned unique ID for this managed resource.

value = None

The value from Cloudformation export identified by the export name found from list-exports

class pulumi_aws.cloudformation.GetStackResult(capabilities=None, description=None, disable_rollback=None, iam_role_arn=None, id=None, name=None, notification_arns=None, outputs=None, parameters=None, tags=None, template_body=None, timeout_in_minutes=None)

A collection of values returned by getStack.

capabilities = None

A list of capabilities

description = None

Description of the stack

disable_rollback = None

Whether the rollback of the stack is disabled when stack creation fails

iam_role_arn = None

The ARN of the IAM role used to create the stack.

id = None

The provider-assigned unique ID for this managed resource.

notification_arns = None

A list of SNS topic ARNs to publish stack related events

outputs = None

A map of outputs from the stack.

parameters = None

A map of parameters that specify input parameters for the stack.

tags = None

A map of tags associated with this stack.

template_body = None

Structure containing the template body.

timeout_in_minutes = None

The amount of time that can pass before the stack status becomes CREATE_FAILED

class pulumi_aws.cloudformation.Stack(resource_name, opts=None, capabilities=None, disable_rollback=None, iam_role_arn=None, name=None, notification_arns=None, on_failure=None, parameters=None, policy_body=None, policy_url=None, tags=None, template_body=None, template_url=None, timeout_in_minutes=None, __props__=None, __name__=None, __opts__=None)

Provides a CloudFormation Stack resource.

import pulumi
import pulumi_aws as aws

network = aws.cloudformation.Stack("network",
    parameters={
        "VPCCidr": "10.0.0.0/16",
    },
    template_body="""{
  "Parameters" : {
    "VPCCidr" : {
      "Type" : "String",
      "Default" : "10.0.0.0/16",
      "Description" : "Enter the CIDR block for the VPC. Default is 10.0.0.0/16."
    }
  },
  "Resources" : {
    "myVpc": {
      "Type" : "AWS::EC2::VPC",
      "Properties" : {
        "CidrBlock" : { "Ref" : "VPCCidr" },
        "Tags" : [
          {"Key": "Name", "Value": "Primary_CF_VPC"}
        ]
      }
    }
  }
}

""")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • capabilities (pulumi.Input[list]) – A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND

  • disable_rollback (pulumi.Input[bool]) – Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.

  • iam_role_arn (pulumi.Input[str]) – The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don’t specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.

  • name (pulumi.Input[str]) – Stack name.

  • notification_arns (pulumi.Input[list]) – A list of SNS topic ARNs to publish stack related events.

  • on_failure (pulumi.Input[str]) – Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.

  • parameters (pulumi.Input[dict]) – A map of Parameter structures that specify input parameters for the stack.

  • policy_body (pulumi.Input[str]) – Structure containing the stack policy body. Conflicts w/ policy_url.

  • policy_url (pulumi.Input[str]) – Location of a file containing the stack policy. Conflicts w/ policy_body.

  • tags (pulumi.Input[dict]) – A list of tags to associate with this stack.

  • template_body (pulumi.Input[str]) – Structure containing the template body (max size: 51,200 bytes).

  • template_url (pulumi.Input[str]) – Location of a file containing the template body (max size: 460,800 bytes).

  • timeout_in_minutes (pulumi.Input[float]) – The amount of time that can pass before the stack status becomes CREATE_FAILED.

capabilities: pulumi.Output[list] = None

A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND

disable_rollback: pulumi.Output[bool] = None

Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.

iam_role_arn: pulumi.Output[str] = None

The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don’t specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.

name: pulumi.Output[str] = None

Stack name.

notification_arns: pulumi.Output[list] = None

A list of SNS topic ARNs to publish stack related events.

on_failure: pulumi.Output[str] = None

Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.

outputs: pulumi.Output[dict] = None

A map of outputs from the stack.

parameters: pulumi.Output[dict] = None

A map of Parameter structures that specify input parameters for the stack.

policy_body: pulumi.Output[str] = None

Structure containing the stack policy body. Conflicts w/ policy_url.

policy_url: pulumi.Output[str] = None

Location of a file containing the stack policy. Conflicts w/ policy_body.

tags: pulumi.Output[dict] = None

A list of tags to associate with this stack.

template_body: pulumi.Output[str] = None

Structure containing the template body (max size: 51,200 bytes).

template_url: pulumi.Output[str] = None

Location of a file containing the template body (max size: 460,800 bytes).

timeout_in_minutes: pulumi.Output[float] = None

The amount of time that can pass before the stack status becomes CREATE_FAILED.

static get(resource_name, id, opts=None, capabilities=None, disable_rollback=None, iam_role_arn=None, name=None, notification_arns=None, on_failure=None, outputs=None, parameters=None, policy_body=None, policy_url=None, tags=None, template_body=None, template_url=None, timeout_in_minutes=None)

Get an existing Stack resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • capabilities (pulumi.Input[list]) – A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND

  • disable_rollback (pulumi.Input[bool]) – Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.

  • iam_role_arn (pulumi.Input[str]) – The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don’t specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.

  • name (pulumi.Input[str]) – Stack name.

  • notification_arns (pulumi.Input[list]) – A list of SNS topic ARNs to publish stack related events.

  • on_failure (pulumi.Input[str]) – Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.

  • outputs (pulumi.Input[dict]) – A map of outputs from the stack.

  • parameters (pulumi.Input[dict]) – A map of Parameter structures that specify input parameters for the stack.

  • policy_body (pulumi.Input[str]) – Structure containing the stack policy body. Conflicts w/ policy_url.

  • policy_url (pulumi.Input[str]) – Location of a file containing the stack policy. Conflicts w/ policy_body.

  • tags (pulumi.Input[dict]) – A list of tags to associate with this stack.

  • template_body (pulumi.Input[str]) – Structure containing the template body (max size: 51,200 bytes).

  • template_url (pulumi.Input[str]) – Location of a file containing the template body (max size: 460,800 bytes).

  • timeout_in_minutes (pulumi.Input[float]) – The amount of time that can pass before the stack status becomes CREATE_FAILED.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.cloudformation.StackSet(resource_name, opts=None, administration_role_arn=None, capabilities=None, description=None, execution_role_name=None, name=None, parameters=None, tags=None, template_body=None, template_url=None, __props__=None, __name__=None, __opts__=None)

Manages a CloudFormation StackSet. StackSets allow CloudFormation templates to be easily deployed across multiple accounts and regions via StackSet Instances (cloudformation.StackSetInstance resource). Additional information about StackSets can be found in the AWS CloudFormation User Guide.

NOTE: All template parameters, including those with a Default, must be configured or ignored with the lifecycle configuration block ignore_changes argument.

NOTE: All NoEcho template parameters must be ignored with the lifecycle configuration block ignore_changes argument.

import pulumi
import pulumi_aws as aws

a_ws_cloud_formation_stack_set_administration_role_assume_role_policy = aws.iam.get_policy_document(statements=[{
    "actions": ["sts:AssumeRole"],
    "effect": "Allow",
    "principals": [{
        "identifiers": ["cloudformation.amazonaws.com"],
        "type": "Service",
    }],
}])
a_ws_cloud_formation_stack_set_administration_role = aws.iam.Role("aWSCloudFormationStackSetAdministrationRole", assume_role_policy=a_ws_cloud_formation_stack_set_administration_role_assume_role_policy.json)
example = aws.cloudformation.StackSet("example",
    administration_role_arn=a_ws_cloud_formation_stack_set_administration_role.arn,
    parameters={
        "VPCCidr": "10.0.0.0/16",
    },
    template_body="""{
  "Parameters" : {
    "VPCCidr" : {
      "Type" : "String",
      "Default" : "10.0.0.0/16",
      "Description" : "Enter the CIDR block for the VPC. Default is 10.0.0.0/16."
    }
  },
  "Resources" : {
    "myVpc": {
      "Type" : "AWS::EC2::VPC",
      "Properties" : {
        "CidrBlock" : { "Ref" : "VPCCidr" },
        "Tags" : [
          {"Key": "Name", "Value": "Primary_CF_VPC"}
        ]
      }
    }
  }
}

""")
a_ws_cloud_formation_stack_set_administration_role_execution_policy_policy_document = example.execution_role_name.apply(lambda execution_role_name: aws.iam.get_policy_document(statements=[{
    "actions": ["sts:AssumeRole"],
    "effect": "Allow",
    "resources": [f"arn:aws:iam::*:role/{execution_role_name}"],
}]))
a_ws_cloud_formation_stack_set_administration_role_execution_policy_role_policy = aws.iam.RolePolicy("aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy",
    policy=a_ws_cloud_formation_stack_set_administration_role_execution_policy_policy_document.json,
    role=a_ws_cloud_formation_stack_set_administration_role.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administration_role_arn (pulumi.Input[str]) – Amazon Resource Number (ARN) of the IAM Role in the administrator account.

  • capabilities (pulumi.Input[list]) – A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND.

  • description (pulumi.Input[str]) – Description of the StackSet.

  • execution_role_name (pulumi.Input[str]) – Name of the IAM Role in all target accounts for StackSet operations. Defaults to AWSCloudFormationStackSetExecutionRole.

  • name (pulumi.Input[str]) – Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.

  • parameters (pulumi.Input[dict]) – Key-value map of input parameters for the StackSet template. All template parameters, including those with a Default, must be configured or ignored with lifecycle configuration block ignore_changes argument. All NoEcho template parameters must be ignored with the lifecycle configuration block ignore_changes argument.

  • tags (pulumi.Input[dict]) – Key-value map of tags to associate with this StackSet and the Stacks created from it. AWS CloudFormation also propagates these tags to supported resources that are created in the Stacks. A maximum number of 50 tags can be specified.

  • template_body (pulumi.Input[str]) – String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with template_url.

  • template_url (pulumi.Input[str]) – String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with template_body.

administration_role_arn: pulumi.Output[str] = None

Amazon Resource Number (ARN) of the IAM Role in the administrator account.

arn: pulumi.Output[str] = None

Amazon Resource Name (ARN) of the StackSet.

capabilities: pulumi.Output[list] = None

A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND.

description: pulumi.Output[str] = None

Description of the StackSet.

execution_role_name: pulumi.Output[str] = None

Name of the IAM Role in all target accounts for StackSet operations. Defaults to AWSCloudFormationStackSetExecutionRole.

name: pulumi.Output[str] = None

Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.

parameters: pulumi.Output[dict] = None

Key-value map of input parameters for the StackSet template. All template parameters, including those with a Default, must be configured or ignored with lifecycle configuration block ignore_changes argument. All NoEcho template parameters must be ignored with the lifecycle configuration block ignore_changes argument.

stack_set_id: pulumi.Output[str] = None

Unique identifier of the StackSet.

tags: pulumi.Output[dict] = None

Key-value map of tags to associate with this StackSet and the Stacks created from it. AWS CloudFormation also propagates these tags to supported resources that are created in the Stacks. A maximum number of 50 tags can be specified.

template_body: pulumi.Output[str] = None

String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with template_url.

template_url: pulumi.Output[str] = None

String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with template_body.

static get(resource_name, id, opts=None, administration_role_arn=None, arn=None, capabilities=None, description=None, execution_role_name=None, name=None, parameters=None, stack_set_id=None, tags=None, template_body=None, template_url=None)

Get an existing StackSet resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administration_role_arn (pulumi.Input[str]) – Amazon Resource Number (ARN) of the IAM Role in the administrator account.

  • arn (pulumi.Input[str]) – Amazon Resource Name (ARN) of the StackSet.

  • capabilities (pulumi.Input[list]) – A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND.

  • description (pulumi.Input[str]) – Description of the StackSet.

  • execution_role_name (pulumi.Input[str]) – Name of the IAM Role in all target accounts for StackSet operations. Defaults to AWSCloudFormationStackSetExecutionRole.

  • name (pulumi.Input[str]) – Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.

  • parameters (pulumi.Input[dict]) – Key-value map of input parameters for the StackSet template. All template parameters, including those with a Default, must be configured or ignored with lifecycle configuration block ignore_changes argument. All NoEcho template parameters must be ignored with the lifecycle configuration block ignore_changes argument.

  • stack_set_id (pulumi.Input[str]) – Unique identifier of the StackSet.

  • tags (pulumi.Input[dict]) – Key-value map of tags to associate with this StackSet and the Stacks created from it. AWS CloudFormation also propagates these tags to supported resources that are created in the Stacks. A maximum number of 50 tags can be specified.

  • template_body (pulumi.Input[str]) – String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with template_url.

  • template_url (pulumi.Input[str]) – String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with template_body.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.cloudformation.StackSetInstance(resource_name, opts=None, account_id=None, parameter_overrides=None, region=None, retain_stack=None, stack_set_name=None, __props__=None, __name__=None, __opts__=None)

Manages a CloudFormation StackSet Instance. Instances are managed in the account and region of the StackSet after the target account permissions have been configured. Additional information about StackSets can be found in the AWS CloudFormation User Guide.

NOTE: All target accounts must have an IAM Role created that matches the name of the execution role configured in the StackSet (the execution_role_name argument in the cloudformation.StackSet resource) in a trust relationship with the administrative account or administration IAM Role. The execution role must have appropriate permissions to manage resources defined in the template along with those required for StackSets to operate. See the AWS CloudFormation User Guide for more details.

NOTE: To retain the Stack during resource destroy, ensure retain_stack has been set to true in the state first. This must be completed before a deployment that would destroy the resource.

import pulumi
import pulumi_aws as aws

example = aws.cloudformation.StackSetInstance("example",
    account_id="123456789012",
    region="us-east-1",
    stack_set_name=aws_cloudformation_stack_set["example"]["name"])
import pulumi
import pulumi_aws as aws

a_ws_cloud_formation_stack_set_execution_role_assume_role_policy = aws.iam.get_policy_document(statements=[{
    "actions": ["sts:AssumeRole"],
    "effect": "Allow",
    "principals": [{
        "identifiers": [aws_iam_role["AWSCloudFormationStackSetAdministrationRole"]["arn"]],
        "type": "AWS",
    }],
}])
a_ws_cloud_formation_stack_set_execution_role = aws.iam.Role("aWSCloudFormationStackSetExecutionRole", assume_role_policy=a_ws_cloud_formation_stack_set_execution_role_assume_role_policy.json)
a_ws_cloud_formation_stack_set_execution_role_minimum_execution_policy_policy_document = aws.iam.get_policy_document(statements=[{
    "actions": [
        "cloudformation:*",
        "s3:*",
        "sns:*",
    ],
    "effect": "Allow",
    "resources": ["*"],
}])
a_ws_cloud_formation_stack_set_execution_role_minimum_execution_policy_role_policy = aws.iam.RolePolicy("aWSCloudFormationStackSetExecutionRoleMinimumExecutionPolicyRolePolicy",
    policy=a_ws_cloud_formation_stack_set_execution_role_minimum_execution_policy_policy_document.json,
    role=a_ws_cloud_formation_stack_set_execution_role.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[str]) – Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account.

  • parameter_overrides (pulumi.Input[dict]) – Key-value map of input parameters to override from the StackSet for this Instance.

  • region (pulumi.Input[str]) – Target AWS Region to create a Stack based on the StackSet. Defaults to current region.

  • retain_stack (pulumi.Input[bool]) – During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state before destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to false.

  • stack_set_name (pulumi.Input[str]) – Name of the StackSet.

account_id: pulumi.Output[str] = None

Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account.

parameter_overrides: pulumi.Output[dict] = None

Key-value map of input parameters to override from the StackSet for this Instance.

region: pulumi.Output[str] = None

Target AWS Region to create a Stack based on the StackSet. Defaults to current region.

retain_stack: pulumi.Output[bool] = None

During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state before destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to false.

stack_id: pulumi.Output[str] = None

Stack identifier

stack_set_name: pulumi.Output[str] = None

Name of the StackSet.

static get(resource_name, id, opts=None, account_id=None, parameter_overrides=None, region=None, retain_stack=None, stack_id=None, stack_set_name=None)

Get an existing StackSetInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[str]) – Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account.

  • parameter_overrides (pulumi.Input[dict]) – Key-value map of input parameters to override from the StackSet for this Instance.

  • region (pulumi.Input[str]) – Target AWS Region to create a Stack based on the StackSet. Defaults to current region.

  • retain_stack (pulumi.Input[bool]) – During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state before destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to false.

  • stack_id (pulumi.Input[str]) – Stack identifier

  • stack_set_name (pulumi.Input[str]) – Name of the StackSet.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_aws.cloudformation.get_export(name=None, opts=None)

The CloudFormation Export data source allows access to stack exports specified in the Output section of the Cloudformation Template using the optional Export Property.

Note: If you are trying to use a value from a Cloudformation Stack in the same deployment please use normal interpolation or Cloudformation Outputs.

import pulumi
import pulumi_aws as aws

subnet_id = aws.cloudformation.get_export(name="mySubnetIdExportName")
web = aws.ec2.Instance("web",
    ami="ami-abb07bcb",
    instance_type="t1.micro",
    subnet_id=subnet_id.value)
Parameters

name (str) –

The name of the export as it appears in the console or from list-exports

pulumi_aws.cloudformation.get_stack(name=None, tags=None, opts=None)

The CloudFormation Stack data source allows access to stack outputs and other useful data including the template body.

import pulumi
import pulumi_aws as aws

network = aws.cloudformation.get_stack(name="my-network-stack")
web = aws.ec2.Instance("web",
    ami="ami-abb07bcb",
    instance_type="t1.micro",
    subnet_id=network.outputs["SubnetId"],
    tags={
        "Name": "HelloWorld",
    })
Parameters
  • name (str) – The name of the stack

  • tags (dict) – A map of tags associated with this stack.