@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
68 lines • 2.74 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExportOutput = exports.getExport = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The CloudFormation Export data source allows access to stack
* exports specified in the [Output](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html) 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.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const subnetId = aws.cloudformation.getExport({
* name: "mySubnetIdExportName",
* });
* const web = new aws.ec2.Instance("web", {
* ami: "ami-abb07bcb",
* instanceType: aws.ec2.InstanceType.T2_Micro,
* subnetId: subnetId.then(subnetId => subnetId.value),
* });
* ```
*/
function getExport(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:cloudformation/getExport:getExport", {
"name": args.name,
"region": args.region,
}, opts);
}
exports.getExport = getExport;
/**
* The CloudFormation Export data source allows access to stack
* exports specified in the [Output](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html) 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.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const subnetId = aws.cloudformation.getExport({
* name: "mySubnetIdExportName",
* });
* const web = new aws.ec2.Instance("web", {
* ami: "ami-abb07bcb",
* instanceType: aws.ec2.InstanceType.T2_Micro,
* subnetId: subnetId.then(subnetId => subnetId.value),
* });
* ```
*/
function getExportOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:cloudformation/getExport:getExport", {
"name": args.name,
"region": args.region,
}, opts);
}
exports.getExportOutput = getExportOutput;
//# sourceMappingURL=getExport.js.map