template

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TypeTemplate string = "template"

TypeTemplate is the resource string for a Template resource

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	types.ResourceMetadata `hcl:",remain"`

	Source      string               `hcl:"source" json:"source"`                          // Source template to be processed as string
	Destination string               `hcl:"destination" json:"destination"`                // Destination filename to write
	Variables   map[string]cty.Value `hcl:"variables,optional" json:"variables,omitempty"` // Variables to be processed in the template
}

Template allows the process of user defined templates

func (*Template) Process

func (t *Template) Process() error

type TemplateProvider

type TemplateProvider struct {
	// contains filtered or unexported fields
}

Template provider allows parsing and output of file based templates

func (*TemplateProvider) Changed

func (p *TemplateProvider) Changed() (bool, error)

func (*TemplateProvider) Create

func (p *TemplateProvider) Create() error

Create a new template

func (*TemplateProvider) Destroy

func (p *TemplateProvider) Destroy() error

func (*TemplateProvider) Init

func (p *TemplateProvider) Init(cfg htypes.Resource, l sdk.Logger) error

func (*TemplateProvider) Lookup

func (p *TemplateProvider) Lookup() ([]string, error)

Lookup satisfies the interface method but is not implemented by Template

func (*TemplateProvider) Refresh

func (p *TemplateProvider) Refresh() error

Refresh causes the template to be destroyed and recreated

Jump to

Keyboard shortcuts

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