cfngen

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cfngen generates CloudFormation from Go objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeResourceName added in v0.3.0

func SanitizeResourceName(name string) string

Types

type Output

type Output struct {
	Description string
	Value       interface{}
}

type Parameter

type Parameter struct {
	Type          string
	Default       interface{}   `json:",omitempty"`
	Description   string        `json:",omitempty"`
	AllowedValues []interface{} `json:",omitempty"`
	MinValue      interface{}   `json:",omitempty"`
	MaxValue      interface{}   `json:",omitempty"`
}

Represents CF Parameter

type Ref

type Ref struct {
	Ref string
}

Represents a CF reference

type Sub

type Sub struct {
	Sub string `json:"Fn::Sub"`
}

Represents a simple CF Fn::Sub using template params

type Template

type Template struct {
	AWSTemplateFormatVersion string
	Description              string                 `json:",omitempty"`
	Parameters               map[string]interface{} `json:",omitempty"`
	Resources                map[string]interface{} `json:",omitempty"`
	Outputs                  map[string]interface{} `json:",omitempty"`
}

Represents a CF template

func NewTemplate

func NewTemplate(description string, parameters map[string]interface{}, resources map[string]interface{},
	outputs map[string]interface{}) (t *Template)

Create a CF template , use WriteCloudFormation() to emit.

func (*Template) CloudFormation added in v1.0.0

func (t *Template) CloudFormation() ([]byte, error)

Emit CF as JSON return []bytes

func (*Template) WriteCloudFormation

func (t *Template) WriteCloudFormation(w io.Writer) (err error)

Emit CF as JSON to io.Writer

Directories

Path Synopsis
Package gluecf generates CloudFormation from Go objects to create AWS GlueTableMetadata objects.
Package gluecf generates CloudFormation from Go objects to create AWS GlueTableMetadata objects.

Jump to

Keyboard shortcuts

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