state

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package state has all abstracted logic related to the Terraform state

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	Config map[string]provider.Resource
	// contains filtered or unexported fields
}

Writer is a Writer implementation that is meant to generate a TFState

func NewWriter

func NewWriter(w io.Writer, opts *writer.Options) *Writer

NewWriter returns a TFStateWriter initialization

func (*Writer) Has

func (w *Writer) Has(key string) (bool, error)

Has checks if the given key it's already present or not

func (*Writer) Interpolate added in v0.4.0

func (w *Writer) Interpolate(i *interpolator.Interpolator)

Interpolate will defined dependencies for each component using the `i` Interpolator built in the import.

func (*Writer) Sync

func (w *Writer) Sync() error

Sync writes the content of the Config to the internal w with the correct format

func (*Writer) Write

func (w *Writer) Write(key string, value interface{}) error

Write expects a key similar to "aws_instance.your_name" and the value to be *terraform.ResourceState repeated keys will report an error

Jump to

Keyboard shortcuts

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