Skip to content

🥞 CloudFormation stack outputs for Terraform

License

Notifications You must be signed in to change notification settings

shipsigma/stacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


stacker

Stacker creates a Cloudformation Stack solely to use the Output or Export function for Terraform values. This allows you to use Terraform for the bulk of your infrastructure, but use Cloudformation stacks for legacy inputs or Serverless stacks. From the Cloudformation stack, you can use the !ImportValue function to retreive the necessary value.

Since Cloudformation does not allow creating a stack without at least a single resource - to get around this, we create a custom NullResource in the Stack that uses a falsey condition, effectively creating a no-op. This will not sanatize input, and fail if an unsupported character is passed in.

Usage

module "stack-outputs" {

  source = "github.com/shipsigma/stacker"

  name = "cloudformation-stack-name"
  outputs = {
    route53ZoneId = {
      Value       = data.aws_route53_zone.main.id
      Description = "Main Route53 Zone ID"
      Export = {
        Name = "route53:main:id"
      }
    }
  }
}

About

🥞 CloudFormation stack outputs for Terraform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages