terraform

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListProviderResources

func ListProviderResources(provider string) []string

func ListProviders

func ListProviders() []string

func YAMLDecode

func YAMLDecode(filename string) ([]byte, error)

Types

type Provider

type Provider struct {
	ProviderDefinition `hcl:"provider"`
}

func NewProvider

func NewProvider(name string) *Provider

func SelectProvider

func SelectProvider() (*Provider, error)

func (*Provider) Encode

func (p *Provider) Encode() ([]byte, error)

type ProviderDefinition

type ProviderDefinition struct {
	Name string      `hcl:",key"`
	Spec interface{} `hcl:",squash"`
}

type Resource

type Resource struct {
	ResourceDefinition `hcl:"resource"`
}

func BuildResource

func BuildResource(t string) (*Resource, error)

func NewResource

func NewResource(s ResourceSpec) *Resource

func SelectResource

func SelectResource(provider string) (*Resource, error)

func (*Resource) Encode

func (r *Resource) Encode() ([]byte, error)

type ResourceDefinition

type ResourceDefinition struct {
	Type         string `hcl:",key"`
	Name         string `hcl:",key"`
	ResourceSpec `hcl:",squash"`
}

type ResourceSpec

type ResourceSpec interface {
	GetType() string
	GetName() string
	GetID() string
	Import() error
}

type Resources

type Resources []string

func ListResources

func ListResources() (Resources, error)

func (Resources) ApplyCommand

func (r Resources) ApplyCommand() string

func (Resources) DestroyCommand

func (r Resources) DestroyCommand() string

func (Resources) SelectMany

func (r Resources) SelectMany() (Resources, error)

Directories

Path Synopsis
resources

Jump to

Keyboard shortcuts

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