Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RegistryModule ¶
type RegistryModule struct {
ID *string
Name *string
Provider *string
VersionStatuses []tfe.RegistryModuleVersionStatuses
Organization *string
Source *string
}
RegistryModule represents a Terraform Cloud registry module.
type Run ¶
type Run struct {
ID *string
Organization *string
Workspace *string
Status *string
IsConfirmable *bool
CreatedAt time.Time
}
Run represents a Terraform workspaces run.
type TfCloud ¶
type TfCloud interface {
// Address returns a Terraform Cloud / Enterprise API endpoint addres.
Address() string
// RunList returns all the terraform workspace current runs.
RunList(organization string) ([]*Run, error)
// RunGet returns the specified terraform workspace run.
RunGet(workspaceName, runID string) (*Run, error)
// RunApply applys the specified terraform workspace run.
RunApply(RunID string) error
// WorkspaceList returns all the terraform workspaces in an organization.
WorkspaceList(organization string) ([]*Workspace, error)
// WorkspaceGet returns the specified terraform workspace.
WorkspaceGet(organization, workspace string) (*Workspace, error)
// WorkspaceUpdateVersion updates the terraform version config in the specified workspace.
WorkspaceUpdateVersion(organization, workspace, version string) error
// ModuleList returns all the terraform registry modules.
ModuleList(organization string) ([]*RegistryModule, error)
// ModuleGet returns the specified terraform registry module.
ModuleGet(organization, name, provider string) (*RegistryModule, error)
}
TfCloud represents Terraform Cloud API client.
func NewTfCloud ¶
NewTfCloud creates a new TfCloud interface
type Workspace ¶
type Workspace struct {
ID *string
Name *string
TerraformVersion *string
ExecutionMode *string
AutoApply *bool
CurrentRun *tfe.Run
VCSRepoName *string
WorkingDirectory *string
ResourceCount *int
CreatedAt time.Time
UpdatedAt time.Time
}
Workspace represents a Terraform Cloud workspace.
Click to show internal directories.
Click to hide internal directories.