Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AWSAccessKeyID is an AWS access key id. AWSAccessKeyID string `required:"false"` // AWSSecretAccessKey is an AWS secret access key. AWSSecretAccessKey string `required:"false"` // GoogleApplicationCredentials is a set of Google Default Application Credentials. GoogleApplicationCredentials string `required:"false"` // IsApply is a Boolean of whether to run `tfmigrate apply` ("true") or // `tfmigrate plan` ("false") for the migrations. IsApply bool `required:"true"` // WorkspaceDirectories is a list of strings. Each string is relative file path to a directory // which is tied to a single Terraform Cloud workspace. WorkspaceDirectories []string `required:"true"` }
Config contains environment variables needed to run StateMigrator methods.
type StateMigrator ¶
type StateMigrator interface { // MigrateAllWorkspaces runs migrations for all workspaces by coordinating calls to MigrateWorkspace. MigrateAllWorkspaces() error // MigrateWorkspace runs migrations for the workspace specified. MigrateWorkspace(w Workspace) error }
StateMigrator interface for running Terraform state migrations.
func NewStateMigrator ¶
func NewStateMigrator(conf *Config) StateMigrator
NewStateMigrator instantiates a new implementation of the StateMigrator interface.
Click to show internal directories.
Click to hide internal directories.