getExport

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.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudformation.CloudformationFunctions;
import com.pulumi.aws.cloudformation.inputs.GetExportArgs;
import com.pulumi.aws.ec2.Instance;
import com.pulumi.aws.ec2.InstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var subnetId = CloudformationFunctions.getExport(GetExportArgs.builder()
.name("mySubnetIdExportName")
.build());
var web = new Instance("web", InstanceArgs.builder()
.ami("ami-abb07bcb")
.instanceType("t2.micro")
.subnetId(subnetId.applyValue(getExportResult -> getExportResult.value()))
.build());
}
}

Return

A collection of values returned by getExport.

Parameters

argument

A collection of arguments for invoking getExport.


suspend fun getExport(name: String): GetExportResult

Return

A collection of values returned by getExport.

Parameters

name

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

See also


suspend fun getExport(argument: suspend GetExportPlainArgsBuilder.() -> Unit): GetExportResult

Return

A collection of values returned by getExport.

Parameters

argument

Builder for com.pulumi.aws.cloudformation.kotlin.inputs.GetExportPlainArgs.

See also