Documentation
¶
Index ¶
Constants ¶
const TFSTATE_NAME = "tfstate.tf"
Variables ¶
var BuiltinClients = map[string]Factory{
"atlas": atlasFactory,
"consul": consulFactory,
"etcd": etcdFactory,
"http": httpFactory,
"s3": s3Factory,
"swift": swiftFactory,
"_local": fileFactory,
}
BuiltinClients is the list of built-in clients that can be used with NewClient.
Functions ¶
This section is empty.
Types ¶
type AtlasClient ¶
type AtlasClient struct {
Server string
ServerURL *url.URL
User string
Name string
AccessToken string
RunId string
HTTPClient *http.Client
// contains filtered or unexported fields
}
AtlasClient implements the Client interface for an Atlas compatible server.
type Client ¶
type Client interface {
Get() (*Payload, error)
Put([]byte) error
Delete() error
}
Client is the interface that must be implemented for a remote state driver. It supports dumb put/get/delete, and the higher level structs handle persisting the state properly here.
type ConsulClient ¶
type ConsulClient struct {
Client *consulapi.Client
Path string
}
ConsulClient is a remote client that stores data in Consul.
type EtcdClient ¶ added in v0.6.5
type EtcdClient struct {
Client etcdapi.Client
Path string
}
EtcdClient is a remote client that stores data in etcd.
type Factory ¶
type Factory func(map[string]string) (Client, error)
Factory is the factory function to create a remote client.
type FileClient ¶
type FileClient struct {
Path string
}
FileClient is a remote client that stores data locally on disk. This is only used for development reasons to test remote state... locally.
type HTTPClient ¶
type HTTPClient struct {
URL *url.URL
Client *http.Client
}
HTTPClient is a remote client that stores data in Consul or HTTP REST.
type InmemClient ¶
type InmemClient struct {
Data []byte
MD5 []byte
}
InmemClient is a Client implementation that stores data in memory.
type Payload ¶
type Payload struct {
MD5 []byte
Data []byte
}
Payload is the return value from the remote state storage.
type State ¶
type State struct {
Client Client
// contains filtered or unexported fields
}
State implements the State interfaces in the state package to handle reading and writing the remote state. This State on its own does no local caching so every persist will go to the remote storage and local writes will go to memory.
func (*State) WriteState ¶
func (s *State) WriteState(state *terraform.State) error
StateWriter impl.
type SwiftClient ¶ added in v0.6.0
type SwiftClient struct {
// contains filtered or unexported fields
}
SwiftClient implements the Client interface for an Openstack Swift server.