Documentation
¶
Index ¶
Constants ¶
const ( TfvarsFilename = "terraform.tfvars" TfvarsAlternateFilename = "terraform.auto.tfvars" )
const (
BackendTypeRemote = "remote"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
Changes is map of paths to file objects that should be written to prepare the module for Terraform Cloud
type File ¶ added in v0.1.1
type File struct {
Dir string
OriginalName string
OriginalBytes []byte
NewName string
// contains filtered or unexported fields
}
func (*File) Destination ¶ added in v0.1.1
func (*File) Diff ¶ added in v0.1.1
func (f *File) Diff() difflib.UnifiedDiff
type RemoteBackend ¶
type RemoteBackend struct {
Config RemoteBackendConfig
// contains filtered or unexported fields
}
func (*RemoteBackend) Changes ¶
func (b *RemoteBackend) Changes() (Changes, error)
Changes updates the configured backend
func (*RemoteBackend) Description ¶
func (b *RemoteBackend) Description() string
Description returns a description of the step
func (*RemoteBackend) MultipleWorkspaces ¶
func (b *RemoteBackend) MultipleWorkspaces() bool
MultipleWorkspaces returns whether the remote backend will be configured for multiple prefixed workspaces
func (*RemoteBackend) Name ¶
func (b *RemoteBackend) Name() string
func (*RemoteBackend) WithWriter ¶
func (b *RemoteBackend) WithWriter(w *Writer) Step
type RemoteBackendConfig ¶
type RemoteBackendConfig struct {
Hostname string
Organization string
Workspaces WorkspaceConfig
}
type RemoteState ¶
type RemoteState struct {
Path string
RemoteBackend RemoteBackendConfig
// contains filtered or unexported fields
}
func (*RemoteState) Changes ¶
func (s *RemoteState) Changes() (Changes, error)
Changes updates the configured backend
func (*RemoteState) Description ¶
func (s *RemoteState) Description() string
Description returns a description of the step
func (*RemoteState) Name ¶
func (s *RemoteState) Name() string
func (*RemoteState) WithWriter ¶
func (s *RemoteState) WithWriter(w *Writer) Step
type Step ¶
type Step interface {
Name() string
// Description returns a description of the step
Description() string
// Changes returns a list of file changes and an error if changes could not be completed
Changes() (Changes, error)
WithWriter(*Writer) Step
}
Step is a step required to prepare a module to run in Terraform Cloud
type TerraformWorkspace ¶
type TerraformWorkspace struct {
Variable string
// contains filtered or unexported fields
}
func (*TerraformWorkspace) Changes ¶
func (s *TerraformWorkspace) Changes() (Changes, error)
Changes determines changes required to remove terraform.workspace
func (*TerraformWorkspace) Complete ¶
func (s *TerraformWorkspace) Complete() bool
Complete checks if any terraform.workspace replaces are proposed
func (*TerraformWorkspace) Description ¶
func (s *TerraformWorkspace) Description() string
Description returns a description of the step
func (*TerraformWorkspace) Name ¶
func (s *TerraformWorkspace) Name() string
func (*TerraformWorkspace) WithWriter ¶
func (s *TerraformWorkspace) WithWriter(w *Writer) Step
type Tfvars ¶
type Tfvars struct {
Filename string
// contains filtered or unexported fields
}
func (*Tfvars) Complete ¶
Complete checks if a terraform.tfvars file exists and returns false if it does
func (*Tfvars) Description ¶
Description returns a description of the step
func (*Tfvars) WithWriter ¶
type WorkspaceConfig ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer provides access to information about the Terraform module structure and the ability to update its files
func (*Writer) HasBackend ¶
HasBackend returns true if the module has a backend configuration
func (*Writer) RemoteStateDataSources ¶
RemoteStateDataSources returns a list of remote state data sources defined for the module