Data Source: aws_cloudformation_stack

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

Example Usage

data "aws_cloudformation_stack" "network" {
  name = "my-network-stack"
}

resource "aws_instance" "web" {
  ami           = "ami-abb07bcb"
  instance_type = "t2.micro"
  subnet_id     = data.aws_cloudformation_stack.network.outputs["SubnetId"]

  tags = {
    Name = "HelloWorld"
  }
}

Argument Reference

This data source supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above: