Documentation ¶
Index ¶
- Constants
- Variables
- func AppendStateMap(state Template) *yaml.Node
- func CFTFileExtensions() []string
- func Clone(node *yaml.Node) *yaml.Node
- func TransformNode(n *yaml.Node) error
- type CFTV1
- func (a *CFTV1) File(fileName string) (Template, error)
- func (a *CFTV1) LoadIacDir(absRootDir string, options map[string]interface{}) (output.AllResourceConfigs, error)
- func (a *CFTV1) LoadIacFile(absFilePath string, options map[string]interface{}) (allResourcesConfig output.AllResourceConfigs, err error)
- func (*CFTV1) Name() string
- func (a *CFTV1) ReadYAMLFileIntoJSON(fileName string) ([]byte, error)
- type Template
Constants ¶
const ( // YAMLExtension yaml YAMLExtension = "yaml" // YAMLExtension2 yml YAMLExtension2 = "yml" // JSONExtension json JSONExtension = "json" // TXTExtension txt TXTExtension = "txt" // TemplateExtension template TemplateExtension = "template" // UnknownExtension unknown UnknownExtension = "unknown" )
const PARAMETERS = "Parameters"
PARAMETERS is a constant to fetch Parameters from CFT
const RESOURCES = "Resources"
RESOURCES is a constant to fetch Resources from CFT
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.19.1
func AppendStateMap(state Template) *yaml.Node
AppendStateMap appends a "State" section to the template
func CFTFileExtensions ¶
func CFTFileExtensions() []string
CFTFileExtensions returns the valid extensions for AWS CFT (json | YAML | txt | template)
func Clone ¶ added in v1.19.1
func Clone(node *yaml.Node) *yaml.Node
Clone returns a copy of the provided node
func TransformNode ¶ added in v1.19.1
func TransformNode(n *yaml.Node) error
TransformNode takes a *yaml.Node and convert tag-style names into map-style, and converts other scalars into a canonical format
Types ¶
type CFTV1 ¶
type CFTV1 struct {
// contains filtered or unexported fields
}
CFTV1 struct implements the IacProvider interface
func (*CFTV1) LoadIacDir ¶
func (a *CFTV1) LoadIacDir(absRootDir string, options map[string]interface{}) (output.AllResourceConfigs, error)
LoadIacDir loads all CFT template files in the current directory.
func (*CFTV1) LoadIacFile ¶
func (a *CFTV1) LoadIacFile(absFilePath string, options map[string]interface{}) (allResourcesConfig output.AllResourceConfigs, err error)
LoadIacFile loads the specified CFT template file. Note that a single CFT template json file may contain multiple resource definitions.
type Template ¶ added in v1.19.1
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.