Documentation ¶
Overview ¶
Package cft provides the Template type that models a CloudFormation template.
The sub-packages of cft contain various tools for working with templates
Index ¶
- Variables
- func AppendStateMap(state Template) *yaml.Node
- type Comment
- type Resource
- type Section
- type Template
- func (t Template) AddComments(comments []*Comment) error
- func (t Template) AddMapSection(section Section) (*yaml.Node, error)
- func (t Template) AddScalarSection(section Section, val string) error
- func (t Template) GetNode(section Section, name string) (*yaml.Node, error)
- func (t Template) GetParameter(name string) (*yaml.Node, error)
- func (t Template) GetResource(name string) (*yaml.Node, error)
- func (t Template) GetResourcesOfType(typeName string) []*Resource
- func (t Template) GetSection(section Section) (*yaml.Node, error)
- func (t Template) GetTypes() ([]string, error)
- func (t Template) Map() map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
var Tags = map[string]string{
"!And": "Fn::And",
"!Base64": "Fn::Base64",
"!Cidr": "Fn::Cidr",
"!Equals": "Fn::Equals",
"!FindInMap": "Fn::FindInMap",
"!GetAZs": "Fn::GetAZs",
"!GetAtt": "Fn::GetAtt",
"!If": "Fn::If",
"!ImportValue": "Fn::ImportValue",
"!Join": "Fn::Join",
"!Not": "Fn::Not",
"!Or": "Fn::Or",
"!Select": "Fn::Select",
"!Split": "Fn::Split",
"!Sub": "Fn::Sub",
"!Ref": "Ref",
"!Condition": "Condition",
"!Rain::Embed": "Rain::Embed",
"!Rain::Include": "Rain::Include",
"!Rain::Env": "Rain::Env",
"!Rain::S3Http": "Rain::S3Http",
"!Rain::S3": "Rain::S3",
"!Rain::Module": "Rain::Module",
}
Tags is a mapping from YAML short tags to full instrincic function names
Functions ¶
func AppendStateMap ¶ added in v1.7.0
func AppendStateMap(state Template) *yaml.Node
AppendStateMap appends a "State" section to the template
Types ¶
type Comment ¶
type Comment struct { Path []interface{} Value string }
Comment represents a path to a node and a comment string to attach to it
type Section ¶ added in v1.8.0
type Section string
Section represents a top level section of a template, like Resources
const ( AWSTemplateFormatVersion Section = "AWSTemplateFormatVersion" Resources Section = "Resources" Description Section = "Description" Metadata Section = "Metadata" Parameters Section = "Parameters" Rules Section = "Rules" Mappings Section = "Mappings" Conditions Section = "Conditions" Transform Section = "Transform" Outputs Section = "Outputs" State Section = "State" )
type Template ¶
type Template struct {
*yaml.Node
}
Template represents a CloudFormation template. The Template type is minimal for now but will likely grow new features as needed by rain.
func (Template) AddComments ¶
AddComments applies a set of comments to the template
func (Template) AddMapSection ¶ added in v1.8.0
AddMapSection adds a section like Resources to the template
func (Template) AddScalarSection ¶ added in v1.8.0
AddScalarSection adds a section like Description to the template
func (Template) GetParameter ¶ added in v1.8.0
GetParameter returns the yaml node for a parameter by name
func (Template) GetResource ¶ added in v1.8.0
GetResource returns the yaml node for a resource by logical id
func (Template) GetResourcesOfType ¶ added in v1.9.0
func (Template) GetSection ¶ added in v1.8.0
GetSection returns the yaml node for the section
Directories ¶
Path | Synopsis |
---|---|
Package diff provides the Diff class that can be used to compare CloudFormation templates
|
Package diff provides the Diff class that can be used to compare CloudFormation templates |
Package format contains functionality to render a cft.Template into YAML or JSON
|
Package format contains functionality to render a cft.Template into YAML or JSON |
Package graph provides functionality to build a graph of connected nodes with a cfn.Template
|
Package graph provides functionality to build a graph of connected nodes with a cfn.Template |
Package parse provides functions for parsing CloudFormation templates from JSON and YAML inputs.
|
Package parse provides functions for parsing CloudFormation templates from JSON and YAML inputs. |
This file implements !Rain::Module
|
This file implements !Rain::Module |