aws-cfn-outputs

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2022 License: ISC Imports: 12 Imported by: 0

README

Command aws-cfn-outputs prints AWS CloudFormation stack outputs, optionally substituting values in a text template.

Consider that you have a CloudFormation template with the following outputs section:

Outputs:
  StackVPC:
    Description: The ID of the VPC
    Value: !Ref MyVPC
    Export:
      Name: !Sub "${AWS::StackName}-VPCID"

In a template you can refer to the “StackVPC” value like so:

Here's my VPC ID: {{.StackVPC}}

To render the template, call the command as:

aws-cfn-outputs -s stack-name -t template.txt

For the full template syntax see Go standard library text/template package.

This program requires “cloudformation:DescribeStacks” IAM permission:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "cloudformation:DescribeStacks",
      "Resource": "arn:aws:cloudformation:...",
      "Effect": "Allow"
    }
  ]
}

Documentation

Overview

Command aws-cfn-outputs prints AWS CloudFormation stack outputs, optionally substituting values in a text template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL