MCPcopy Index your code
hub / github.com/awslabs/aws-cloudformation-template-builder

github.com/awslabs/aws-cloudformation-template-builder @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
6 symbols 14 edges 2 files 0 documented · 0% updated 3y agov0.2.0 · 2020-10-27★ 135
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GitHub version Snap Status

Get it from the Snap Store

AWS Cloudformation Template Builder

This repository contains cfn-skeleton, a command line tool and Go library that consumes the published CloudFormation specification and generates skeleton CloudFormation templates with mandatory and optional parameters of chosen resource types pre-filled with placeholder values.

License

This project is licensed under the Apache 2.0 License.

Installation

You can install cfn-skeleton in one of the following three ways:

  • Use the snap package

  • Download the latest release for your operating system.

  • If you have go installed, run the following:

    GO111MODULE=on go get github.com/awslabs/aws-cloudformation-template-builder/cmd/cfn-skeleton

Usage

cfn-skeleton [OPTIONS] [RESOURCE TYPES...]

  cfn-skeleton is a tool that generates skeleton CloudFormation templates
  containing definitions for the resource types that you specify.

  You can use a short name for a resource type so long as it is unambiguous.
  For example 'Bucket', 'S3::Bucket', and 'AWS::S3::Bucket' refer to the same type.
  But 'Instance' would need disambiguation.

Options:

  -b, --bare  Produce a minimal template, omitting all optional resource properties.
  -j, --json  Output the template in JSON format (default: YAML).
  --help      Show this message and exit.

Resource names must be delimited by spaces. If you specify more than one of the same resource type, you will get multiple resources in the output template; cfn-skeleton will ensure that the names are unique by adding numbers.

Examples

Basic Usage

cfn-skeleton -b Bucket EC2::Instance

Output:

# Template generated by cfn-skeleton
AWSTemplateFormatVersion: "2010-09-09"

Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      {}

  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      {}

Output JSON

To output JSON, use the -j or --json flag.

Note that JSON output will include comments that help you identify optional properties of CloudFormation resources; however, comments are not supported in the JSON specification and will be rejected by AWS CloudFormation. Once you have finished editing your template, ensure that you remove all comments.


cfn-skeleton -b -j Bucket

Output

{  // Template generated by cfn-skeleton
    "AWSTemplateFormatVersion": "2010-09-09",

    "Resources": {
        "MyBucket": {
            "Type": "AWS::S3::Bucket",
            "Properties": {}
        }
    }
}

Core symbols most depended-on inside this repo

resolveType
called by 1
cmd/cfn-skeleton/util.go
makeName
called by 1
cmd/cfn-skeleton/util.go
resolveResources
called by 1
cmd/cfn-skeleton/util.go
die
called by 1
cmd/cfn-skeleton/main.go
init
called by 0
cmd/cfn-skeleton/main.go
main
called by 0
cmd/cfn-skeleton/main.go

Shape

Function 6

Languages

Go100%

Modules by API surface

cmd/cfn-skeleton/util.go3 symbols
cmd/cfn-skeleton/main.go3 symbols

For agents

$ claude mcp add aws-cloudformation-template-builder \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page