tfcheck

package
v3.95.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Helpers to execute OS commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TFChange added in v3.95.0

type TFChange struct {
	Actions []string       `json:"actions"`
	Before  map[string]any `json:"before"`
	After   map[string]any `json:"after"`
}

type TFDriver added in v3.95.0

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

func NewTfDriver

func NewTfDriver(t pulcheck.T, dir, providerName string, prov any) *TFDriver

This takes a sdkv2 schema.Provider or a providerv6

func (*TFDriver) Apply added in v3.95.0

func (d *TFDriver) Apply(t pulcheck.T, plan *TFPlan) error

func (*TFDriver) GetOutput added in v3.95.0

func (d *TFDriver) GetOutput(t pulcheck.T, outputName string) string

func (*TFDriver) GetState added in v3.95.0

func (d *TFDriver) GetState(t pulcheck.T) string

func (*TFDriver) ParseChangesFromTFPlan added in v3.95.0

func (*TFDriver) ParseChangesFromTFPlan(plan *TFPlan) TFChange

Still discovering the structure of JSON-serialized TF plans. The information required from these is, primarily, is whether the resource is staying unchanged, being updated or replaced. Secondarily, would be also great to know detailed paths of properties causing the change, though that is more difficult to cross-compare with Pulumi.

For now this is code is similar to `jq .resource_changes[0].change.actions[0] plan.json`.

func (*TFDriver) Plan added in v3.95.0

func (d *TFDriver) Plan(t pulcheck.T) (*TFPlan, error)

func (*TFDriver) Show added in v3.95.0

func (d *TFDriver) Show(t pulcheck.T, planFile string) string

func (*TFDriver) Write added in v3.95.0

func (d *TFDriver) Write(t pulcheck.T, program string)

type TFPlan added in v3.95.0

type TFPlan struct {
	StdOut   string
	PlanFile string
	RawPlan  any
}

Jump to

Keyboard shortcuts

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