terraform

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentList

type ArgumentList struct {
	Arguments []InputEntry
	// contains filtered or unexported fields
}

func NewArgumentList

func NewArgumentList() *ArgumentList

func (*ArgumentList) Append

func (l *ArgumentList) Append(item InputEntry)

type AttributeList

type AttributeList struct {
	Attributes []OutputEntry
	// contains filtered or unexported fields
}

func NewAttributeList

func NewAttributeList() *AttributeList

func (*AttributeList) Append

func (l *AttributeList) Append(item OutputEntry)

type IOEntry

type IOEntry struct {
	*schema.Schema
	Resource    *TFResource
	Name        string
	TFType      string
	Optional    bool
	Deprecated  bool
	Description string
}

func (IOEntry) DefaultValue

func (e IOEntry) DefaultValue() string

func (IOEntry) NameLength

func (e IOEntry) NameLength() int

func (IOEntry) Padding

func (e IOEntry) Padding(max int) string

func (IOEntry) ValueType

func (e IOEntry) ValueType() string

type InputEntry

type InputEntry IOEntry

Arguments

func (InputEntry) DefaultValue

func (e InputEntry) DefaultValue() string

func (InputEntry) Padding

func (e InputEntry) Padding(max int) string

func (InputEntry) PrefixedName added in v0.6.0

func (e InputEntry) PrefixedName() string

func (InputEntry) ValueType

func (e InputEntry) ValueType() string

type Module

type Module struct {
	TerrawrapLine string

	Copyright string
	Legal     cmd.License
	Name      string

	AbsolutePath string
}

Module contains name and paths to generated modules.

func (*Module) Initialize

func (m *Module) Initialize() error

type OutputEntry

type OutputEntry IOEntry

Attributes

func (OutputEntry) DefaultValue

func (e OutputEntry) DefaultValue() string

func (OutputEntry) Padding

func (e OutputEntry) Padding(max int) string

func (OutputEntry) PrefixedName added in v0.6.0

func (e OutputEntry) PrefixedName() string

func (OutputEntry) ValueType

func (e OutputEntry) ValueType() string

type TFInput

type TFInput struct {
	*TFResource
	// contains filtered or unexported fields
}

TFInput represents the inputs of a terraform resource

func NewTFInput

func NewTFInput(resource *TFResource) TFInput

func (TFInput) Create

func (in TFInput) Create(file *os.File) error

func (TFInput) FilePath

func (in TFInput) FilePath() string

func (TFInput) Template

func (in TFInput) Template() *template.Template

func (TFInput) TemplateName

func (in TFInput) TemplateName() string

type TFMain

type TFMain struct {
	*TFResource
	// contains filtered or unexported fields
}

TFMain represents the main instantiation of a terraform resource

func NewTFMain

func NewTFMain(resource *TFResource) TFMain

func (TFMain) Create

func (in TFMain) Create(file *os.File) error

func (TFMain) FilePath

func (in TFMain) FilePath() string

func (TFMain) Template

func (in TFMain) Template() *template.Template

func (TFMain) TemplateName

func (in TFMain) TemplateName() string

type TFOutput

type TFOutput struct {
	*TFResource
	// contains filtered or unexported fields
}

TFOutput represents the outputs of a terraform resource

func NewTFOutput

func NewTFOutput(resource *TFResource) TFOutput

func (TFOutput) Create

func (o TFOutput) Create(file *os.File) error

func (TFOutput) FilePath

func (o TFOutput) FilePath() string

func (TFOutput) Template

func (o TFOutput) Template() *template.Template

func (TFOutput) TemplateName

func (o TFOutput) TemplateName() string

type TFResource

type TFResource struct {
	*Module
	Name          string
	VarPrefix     string
	AttrPrefix    string
	Type          string
	DocerizedType string
	DocPath       string
	AbsolutePath  string
	*schema.Resource
	// contains filtered or unexported fields
}

func NewTFResource

func NewTFResource() TFResource

func (*TFResource) AppendArgument

func (r *TFResource) AppendArgument(entry InputEntry)

func (*TFResource) AppendAttribute

func (r *TFResource) AppendAttribute(entry OutputEntry)

func (TFResource) Arguments

func (r TFResource) Arguments() []InputEntry

func (TFResource) Attributes

func (r TFResource) Attributes() []OutputEntry

func (*TFResource) Create

func (r *TFResource) Create() error

func (TFResource) MaxArgumentLength

func (r TFResource) MaxArgumentLength() int

func (TFResource) MaxAttributeLength

func (r TFResource) MaxAttributeLength() int

func (*TFResource) SetHashicorpResource

func (r *TFResource) SetHashicorpResource() error

type Templatable

type Templatable interface {
	TemplateName() string
	FilePath() string
	Template() *template.Template
	Create(file *os.File) error
}

Jump to

Keyboard shortcuts

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