Documentation ¶
Index ¶
- Constants
- func BackendMultiplex(meta schema.ClientMeta) []schema.ClientMeta
- func Configure(logger hclog.Logger, providerConfig interface{}) (schema.ClientMeta, diag.Diagnostics)
- func DeleteLineageSerialFilter(meta schema.ClientMeta, parent *schema.Resource) []interface{}
- type BackendConfigBlock
- type BackendType
- type Client
- type Config
- type Instance
- type LocalBackendConfig
- type OutputState
- type Resource
- type S3BackendConfig
- type State
- type TerraformBackend
- type TerraformData
Constants ¶
View Source
const (
StateVersion = 4
)
Variables ¶
This section is empty.
Functions ¶
func BackendMultiplex ¶
func BackendMultiplex(meta schema.ClientMeta) []schema.ClientMeta
BackendMultiplex add the ability to handle multiple backends in the same fetch
func Configure ¶
func Configure(logger hclog.Logger, providerConfig interface{}) (schema.ClientMeta, diag.Diagnostics)
func DeleteLineageSerialFilter ¶
func DeleteLineageSerialFilter(meta schema.ClientMeta, parent *schema.Resource) []interface{}
DeleteLineageSerialFilter will delete duplicate fetches
Types ¶
type BackendConfigBlock ¶
type BackendConfigBlock struct { BackendName string `yaml:"name"` BackendType string `yaml:"backend"` ConfigAttrs map[string]interface{} `yaml:",inline"` }
BackendConfigBlock - abstract backend config
type BackendType ¶
type BackendType string
const ( LOCAL BackendType = "local" S3 BackendType = "s3" )
currently supported backends type full list - https://www.terraform.io/docs/language/settings/backends/index.html
type Client ¶
type Client struct { Backends map[string]*TerraformBackend // CurrentBackend set by client multiplexer CurrentBackend string // contains filtered or unexported fields }
func NewTerraformClient ¶
func NewTerraformClient(logger hclog.Logger, backends map[string]*TerraformBackend) Client
func (*Client) Backend ¶
func (c *Client) Backend() *TerraformBackend
type Config ¶
type Config struct {
Config []BackendConfigBlock `yaml:"config"`
}
type Instance ¶
type Instance struct { IndexKey interface{} `json:"index_key,omitempty"` Status string `json:"status,omitempty"` Deposed string `json:"deposed,omitempty"` SchemaVersion uint64 `json:"schema_version"` AttributesRaw json.RawMessage `json:"attributes,omitempty"` AttributesFlat map[string]string `json:"attributes_flat,omitempty"` AttributeSensitivePaths json.RawMessage `json:"sensitive_attributes,omitempty"` PrivateRaw []byte `json:"private,omitempty"` Dependencies []string `json:"dependencies,omitempty"` CreateBeforeDestroy bool `json:"create_before_destroy,omitempty"` }
type LocalBackendConfig ¶
type LocalBackendConfig struct {
Path string `yaml:"path"`
}
type OutputState ¶
type OutputState struct { ValueRaw json.RawMessage `json:"value"` ValueTypeRaw json.RawMessage `json:"type"` Sensitive bool `json:"sensitive,omitempty"` }
type S3BackendConfig ¶
type TerraformBackend ¶
type TerraformBackend struct { BackendType BackendType BackendName string Data *TerraformData }
func NewBackend ¶
func NewBackend(cfg *BackendConfigBlock) (*TerraformBackend, error)
NewBackend initialize function
func NewLocalTerraformBackend ¶
func NewLocalTerraformBackend(config *BackendConfigBlock) (*TerraformBackend, error)
func NewS3TerraformBackend ¶
func NewS3TerraformBackend(config *BackendConfigBlock) (*TerraformBackend, error)
type TerraformData ¶
type TerraformData struct {
State State
}
Click to show internal directories.
Click to hide internal directories.