Documentation
¶
Index ¶
Constants ¶
const ( TfvarsFilename = "terraform.tfvars" TfvarsAlternateFilename = "default.auto.tfvars" )
const (
BackendTypeRemote = "remote"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
Changes is a map of changed file objects that should be written to prepare the module for Terraform Cloud
type Config ¶
type Config struct {
Backend RemoteBackendConfig
WorkspaceVariable string
TfvarsFilename string
ModulesDir string
}
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module provides access to information about the Terraform module structure and the ability to update its files
func (*Module) HasBackend ¶
HasBackend returns true if the module has a backend configuration
func (*Module) RemoteStateDataSources ¶
RemoteStateDataSources returns a list of remote state data sources defined for the module
type RemoteBackendConfig ¶
type RemoteBackendConfig struct {
Hostname string
Organization string
Workspaces WorkspaceConfig
}
type RemoteBackendStep ¶
type RemoteBackendStep struct {
Config RemoteBackendConfig
// contains filtered or unexported fields
}
func (*RemoteBackendStep) Changes ¶
func (b *RemoteBackendStep) Changes() (Changes, hcl.Diagnostics)
Changes updates the configured backend
func (*RemoteBackendStep) Complete ¶
func (b *RemoteBackendStep) Complete() bool
Complete checks if the module is using a remote backend
func (*RemoteBackendStep) Description ¶
func (b *RemoteBackendStep) Description() string
Description returns a description of the step
func (*RemoteBackendStep) MultipleWorkspaces ¶
func (b *RemoteBackendStep) MultipleWorkspaces() bool
MultipleWorkspaces returns whether the remote backend will be configured for multiple prefixed workspaces
type RemoteStateStep ¶
type RemoteStateStep struct {
Path string
RemoteBackend RemoteBackendConfig
// contains filtered or unexported fields
}
func (*RemoteStateStep) Changes ¶
func (s *RemoteStateStep) Changes() (Changes, hcl.Diagnostics)
Changes updates the configured backend
func (*RemoteStateStep) Complete ¶
func (s *RemoteStateStep) Complete() bool
Complete checks if any modules in the path are using remote_state
func (*RemoteStateStep) Description ¶
func (s *RemoteStateStep) Description() string
Description returns a description of the step
type Step ¶
type Step interface {
// Complete returns whether the step has been completed
Complete() bool
// Description returns a description of the step
Description() string
// Changes returns a list of files changes and diagnostics if errors ocurred. If Complete() returns true, this should be empty.
Changes() (Changes, hcl.Diagnostics)
}
Step is a step required to prepare a module to run in Terraform Cloud
type TerraformWorkspaceStep ¶
type TerraformWorkspaceStep struct {
Variable string
// contains filtered or unexported fields
}
func (*TerraformWorkspaceStep) Changes ¶
func (s *TerraformWorkspaceStep) Changes() (Changes, hcl.Diagnostics)
Changes determines changes required to remove terraform.workspace
func (*TerraformWorkspaceStep) Complete ¶
func (s *TerraformWorkspaceStep) Complete() bool
Complete checks if any terraform.workspace replaces are proposed
func (*TerraformWorkspaceStep) Description ¶
func (s *TerraformWorkspaceStep) Description() string
Description returns a description of the step
type TfvarsStep ¶
type TfvarsStep struct {
// contains filtered or unexported fields
}
func (*TfvarsStep) Changes ¶
func (s *TfvarsStep) Changes() (Changes, hcl.Diagnostics)
Changes determines changes required to remove terraform.workspace
func (*TfvarsStep) Complete ¶
func (s *TfvarsStep) Complete() bool
Complete checks if a terraform.tfvars file exists and returns false if it does
func (*TfvarsStep) Description ¶
func (s *TfvarsStep) Description() string
Description returns a description of the step