terraform

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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TypeTerraform string = "terraform"

TypeTerraform is the resource string for a Terraform resource

Variables

This section is empty.

Functions

This section is empty.

Types

type Terraform

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

	Networks []ctypes.NetworkAttachment `hcl:"network,block" json:"networks,omitempty"` // Attach to the correct network // only when Image is specified

	Source           string            `hcl:"source" json:"source"`                                          // Source directory containing Terraform config
	Version          string            `hcl:"version,optional" json:"version,omitempty"`                     // Version of terraform to use
	WorkingDirectory string            `hcl:"working_directory,optional" json:"working_directory,omitempty"` // Working directory to run terraform commands
	Environment      map[string]string `hcl:"environment,optional" json:"environment,omitempty"`             // environment variables to set when starting the container
	Variables        cty.Value         `hcl:"variables,optional" json:"-"`                                   // variables to pass to terraform

	Output         cty.Value `hcl:"output,optional"`                                           // output values returned from Terraform
	SourceChecksum string    `hcl:"source_checksum,optional" json:"source_checksum,omitempty"` // checksum of the source directory
	ApplyOutput    string    `hcl:"apply_output,optional"`                                     // output from the terraform apply
}

ExecRemote allows commands to be executed in remote containers

func (*Terraform) Process

func (t *Terraform) Process() error

type TerraformProvider

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

TerraformProvider provider allows the execution of terraform config

func (*TerraformProvider) Changed

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

Changed checks to see if the resource files have changed since the last apply

func (*TerraformProvider) Create

func (p *TerraformProvider) Create() error

Create a new terraform container

func (*TerraformProvider) Destroy

func (p *TerraformProvider) Destroy() error

Destroy the terraform container

func (*TerraformProvider) Init

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

func (*TerraformProvider) Lookup

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

Lookup satisfies the interface requirements but is not used as the resource is not persistent

func (*TerraformProvider) Refresh

func (p *TerraformProvider) Refresh() error

Jump to

Keyboard shortcuts

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