terraform

package
v0.0.0-...-1127b50 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a Terraform CLI wrapper.

func New

func New(ctx context.Context, cfg *config.Config) (*Client, error)

New creates a Terraform CLI wrapper.

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, module Module, stateSuffix string, v any, vars ...interface{}) error

Apply will apply the given module, creating the infrastructure if needed. The output will be unmarshaled into v.

func (*Client) Destroy

func (c *Client) Destroy(ctx context.Context, targetModule Module, stateSuffix string, vars ...interface{}) error

Destroy the infrastructure behind the given module.

func (*Client) Output

func (c *Client) Output(ctx context.Context, targetModule Module, stateSuffix string, v any) error

Output returns the output from a terraform module by unmarshaling it into v. Apply must have been run first.

type Module

type Module string

Jump to

Keyboard shortcuts

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