Versions in this module Expand all Collapse all v1 v1.4.0 Mar 10, 2023 Changes in this version + const WorkspaceInvalidStrategy + const WorkspaceNameStrategy + const WorkspaceNoneStrategy + const WorkspaceTagsStrategy + var ErrStateVersionUnauthorizedUpgradeState = errors.New(strings.TrimSpace(...)) + func GenerateID(s string) string + func ParseCloudRunVariables(vv map[string]backend.UnparsedVariableValue, ...) (map[string]string, tfdiags.Diagnostics) + type Cloud struct + CLI cli.Ui + CLIColor *colorstring.Colorize + ContextOpts *terraform.ContextOpts + WorkspaceMapping WorkspaceMapping + func New(services *disco.Disco) *Cloud + func (b *Cloud) CLIInit(opts *backend.CLIOpts) error + func (b *Cloud) Colorize() Colorer + func (b *Cloud) ConfigSchema() *configschema.Block + func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics + func (b *Cloud) DeleteWorkspace(name string, force bool) error + func (b *Cloud) IgnoreVersionConflict() + func (b *Cloud) IsLocalOperations() bool + func (b *Cloud) LocalRun(op *backend.Operation) (*backend.LocalRun, statemgr.Full, tfdiags.Diagnostics) + func (b *Cloud) Operation(ctx context.Context, op *backend.Operation) (*backend.RunningOperation, error) + func (b *Cloud) PrepareConfig(obj cty.Value) (cty.Value, tfdiags.Diagnostics) + func (b *Cloud) StateMgr(name string) (statemgr.Full, error) + func (b *Cloud) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Diagnostics + func (b *Cloud) Workspaces() ([]string, error) + type Colorer interface + Color func(v string) string + type Colorize struct + func (c *Colorize) Color(v string) string + type ConfigChangeMode rune + const ConfigChangeInPlace + const ConfigChangeIrrelevant + const ConfigMigrationIn + const ConfigMigrationOut + func DetectConfigChangeType(wdState *legacy.BackendState, config *configs.Backend, haveLocalStates bool) ConfigChangeMode + func (i ConfigChangeMode) String() string + func (m ConfigChangeMode) InvolvesCloud() bool + func (m ConfigChangeMode) IsCloudMigration() bool + type IntegrationContext struct + B *Cloud + CancelContext context.Context + Op *backend.Operation + Run *tfe.Run + StopContext context.Context + func (s *IntegrationContext) BeginOutput(name string) IntegrationOutputWriter + func (s *IntegrationContext) Poll(backoffMinInterval float64, backoffMaxInterval float64, ...) error + type IntegrationOutputWriter interface + End func() + Output func(str string) + OutputElapsed func(message string, maxMessage int) + SubOutput func(str string) + type MockApplies struct + func (m *MockApplies) Logs(ctx context.Context, applyID string) (io.Reader, error) + func (m *MockApplies) Read(ctx context.Context, applyID string) (*tfe.Apply, error) + type MockClient struct + Applies *MockApplies + ConfigurationVersions *MockConfigurationVersions + CostEstimates *MockCostEstimates + Organizations *MockOrganizations + Plans *MockPlans + PolicyChecks *MockPolicyChecks + PolicySetOutcomes *MockPolicySetOutcomes + RedactedPlans *MockRedactedPlans + Runs *MockRuns + StateVersionOutputs *MockStateVersionOutputs + StateVersions *MockStateVersions + TaskStages *MockTaskStages + Variables *MockVariables + Workspaces *MockWorkspaces + func NewMockClient() *MockClient + type MockConfigurationVersions struct + func (m *MockConfigurationVersions) Archive(ctx context.Context, cvID string) error + func (m *MockConfigurationVersions) Create(ctx context.Context, workspaceID string, ...) (*tfe.ConfigurationVersion, error) + func (m *MockConfigurationVersions) Download(ctx context.Context, cvID string) ([]byte, error) + func (m *MockConfigurationVersions) List(ctx context.Context, workspaceID string, ...) (*tfe.ConfigurationVersionList, error) + func (m *MockConfigurationVersions) Read(ctx context.Context, cvID string) (*tfe.ConfigurationVersion, error) + func (m *MockConfigurationVersions) ReadWithOptions(ctx context.Context, cvID string, options *tfe.ConfigurationVersionReadOptions) (*tfe.ConfigurationVersion, error) + func (m *MockConfigurationVersions) Upload(ctx context.Context, url, path string) error + func (m *MockConfigurationVersions) UploadTarGzip(ctx context.Context, url string, archive io.Reader) error + type MockCostEstimates struct + Estimations map[string]*tfe.CostEstimate + func (m *MockCostEstimates) Logs(ctx context.Context, costEstimateID string) (io.Reader, error) + func (m *MockCostEstimates) Read(ctx context.Context, costEstimateID string) (*tfe.CostEstimate, error) + type MockOrganizations struct + func (m *MockOrganizations) Create(ctx context.Context, options tfe.OrganizationCreateOptions) (*tfe.Organization, error) + func (m *MockOrganizations) Delete(ctx context.Context, name string) error + func (m *MockOrganizations) List(ctx context.Context, options *tfe.OrganizationListOptions) (*tfe.OrganizationList, error) + func (m *MockOrganizations) Read(ctx context.Context, name string) (*tfe.Organization, error) + func (m *MockOrganizations) ReadCapacity(ctx context.Context, name string) (*tfe.Capacity, error) + func (m *MockOrganizations) ReadEntitlements(ctx context.Context, name string) (*tfe.Entitlements, error) + func (m *MockOrganizations) ReadRunQueue(ctx context.Context, name string, options tfe.ReadRunQueueOptions) (*tfe.RunQueue, error) + func (m *MockOrganizations) ReadWithOptions(ctx context.Context, name string, options tfe.OrganizationReadOptions) (*tfe.Organization, error) + func (m *MockOrganizations) Update(ctx context.Context, name string, options tfe.OrganizationUpdateOptions) (*tfe.Organization, error) + type MockPlans struct + func (m *MockPlans) Logs(ctx context.Context, planID string) (io.Reader, error) + func (m *MockPlans) Read(ctx context.Context, planID string) (*tfe.Plan, error) + func (m *MockPlans) ReadJSONOutput(ctx context.Context, planID string) ([]byte, error) + type MockPolicyChecks struct + func (m *MockPolicyChecks) List(ctx context.Context, runID string, options *tfe.PolicyCheckListOptions) (*tfe.PolicyCheckList, error) + func (m *MockPolicyChecks) Logs(ctx context.Context, policyCheckID string) (io.Reader, error) + func (m *MockPolicyChecks) Override(ctx context.Context, policyCheckID string) (*tfe.PolicyCheck, error) + func (m *MockPolicyChecks) Read(ctx context.Context, policyCheckID string) (*tfe.PolicyCheck, error) + type MockPolicySetOutcomes struct + func (m *MockPolicySetOutcomes) List(ctx context.Context, policyEvaluationID string, ...) (*tfe.PolicySetOutcomeList, error) + func (m *MockPolicySetOutcomes) Read(ctx context.Context, policySetOutcomeID string) (*tfe.PolicySetOutcome, error) + type MockRedactedPlans struct + func (m *MockRedactedPlans) Read(ctx context.Context, hostname, token, planID string) (*jsonformat.Plan, error) + type MockRuns struct + ModifyNewRun func(client *MockClient, options tfe.RunCreateOptions, run *tfe.Run) + Runs map[string]*tfe.Run + func (m *MockRuns) Apply(ctx context.Context, runID string, options tfe.RunApplyOptions) error + func (m *MockRuns) Cancel(ctx context.Context, runID string, options tfe.RunCancelOptions) error + func (m *MockRuns) Create(ctx context.Context, options tfe.RunCreateOptions) (*tfe.Run, error) + func (m *MockRuns) Discard(ctx context.Context, runID string, options tfe.RunDiscardOptions) error + func (m *MockRuns) ForceCancel(ctx context.Context, runID string, options tfe.RunForceCancelOptions) error + func (m *MockRuns) ForceExecute(ctx context.Context, runID string) error + func (m *MockRuns) List(ctx context.Context, workspaceID string, options *tfe.RunListOptions) (*tfe.RunList, error) + func (m *MockRuns) Read(ctx context.Context, runID string) (*tfe.Run, error) + func (m *MockRuns) ReadWithOptions(ctx context.Context, runID string, _ *tfe.RunReadOptions) (*tfe.Run, error) + type MockStateVersionOutputs struct + func (m *MockStateVersionOutputs) Read(ctx context.Context, outputID string) (*tfe.StateVersionOutput, error) + func (m *MockStateVersionOutputs) ReadCurrent(ctx context.Context, workspaceID string) (*tfe.StateVersionOutputsList, error) + type MockStateVersions struct + func (m *MockStateVersions) Create(ctx context.Context, workspaceID string, options tfe.StateVersionCreateOptions) (*tfe.StateVersion, error) + func (m *MockStateVersions) Download(ctx context.Context, url string) ([]byte, error) + func (m *MockStateVersions) List(ctx context.Context, options *tfe.StateVersionListOptions) (*tfe.StateVersionList, error) + func (m *MockStateVersions) ListOutputs(ctx context.Context, svID string, options *tfe.StateVersionOutputsListOptions) (*tfe.StateVersionOutputsList, error) + func (m *MockStateVersions) Read(ctx context.Context, svID string) (*tfe.StateVersion, error) + func (m *MockStateVersions) ReadCurrent(ctx context.Context, workspaceID string) (*tfe.StateVersion, error) + func (m *MockStateVersions) ReadCurrentWithOptions(ctx context.Context, workspaceID string, ...) (*tfe.StateVersion, error) + func (m *MockStateVersions) ReadWithOptions(ctx context.Context, svID string, options *tfe.StateVersionReadOptions) (*tfe.StateVersion, error) + type MockTaskStages struct + func (m *MockTaskStages) List(ctx context.Context, runID string, options *tfe.TaskStageListOptions) (*tfe.TaskStageList, error) + func (m *MockTaskStages) Override(ctx context.Context, taskStageID string, options tfe.TaskStageOverrideOptions) (*tfe.TaskStage, error) + func (m *MockTaskStages) Read(ctx context.Context, taskStageID string, options *tfe.TaskStageReadOptions) (*tfe.TaskStage, error) + type MockVariables struct + func (m *MockVariables) Create(ctx context.Context, workspaceID string, options tfe.VariableCreateOptions) (*tfe.Variable, error) + func (m *MockVariables) Delete(ctx context.Context, workspaceID string, variableID string) error + func (m *MockVariables) List(ctx context.Context, workspaceID string, options *tfe.VariableListOptions) (*tfe.VariableList, error) + func (m *MockVariables) Read(ctx context.Context, workspaceID string, variableID string) (*tfe.Variable, error) + func (m *MockVariables) Update(ctx context.Context, workspaceID string, variableID string, ...) (*tfe.Variable, error) + type MockWorkspaces struct + func (m *MockWorkspaces) AddRemoteStateConsumers(ctx context.Context, workspaceID string, ...) error + func (m *MockWorkspaces) AddTags(ctx context.Context, workspaceID string, options tfe.WorkspaceAddTagsOptions) error + func (m *MockWorkspaces) AssignSSHKey(ctx context.Context, workspaceID string, ...) (*tfe.Workspace, error) + func (m *MockWorkspaces) Create(ctx context.Context, organization string, options tfe.WorkspaceCreateOptions) (*tfe.Workspace, error) + func (m *MockWorkspaces) Delete(ctx context.Context, organization, workspace string) error + func (m *MockWorkspaces) DeleteByID(ctx context.Context, workspaceID string) error + func (m *MockWorkspaces) ForceUnlock(ctx context.Context, workspaceID string) (*tfe.Workspace, error) + func (m *MockWorkspaces) List(ctx context.Context, organization string, options *tfe.WorkspaceListOptions) (*tfe.WorkspaceList, error) + func (m *MockWorkspaces) ListRemoteStateConsumers(ctx context.Context, workspaceID string, ...) (*tfe.WorkspaceList, error) + func (m *MockWorkspaces) ListTags(ctx context.Context, workspaceID string, options *tfe.WorkspaceTagListOptions) (*tfe.TagList, error) + func (m *MockWorkspaces) Lock(ctx context.Context, workspaceID string, options tfe.WorkspaceLockOptions) (*tfe.Workspace, error) + func (m *MockWorkspaces) Read(ctx context.Context, organization, workspace string) (*tfe.Workspace, error) + func (m *MockWorkspaces) ReadByID(ctx context.Context, workspaceID string) (*tfe.Workspace, error) + func (m *MockWorkspaces) ReadByIDWithOptions(ctx context.Context, workspaceID string, options *tfe.WorkspaceReadOptions) (*tfe.Workspace, error) + func (m *MockWorkspaces) ReadWithOptions(ctx context.Context, organization string, workspace string, ...) (*tfe.Workspace, error) + func (m *MockWorkspaces) Readme(ctx context.Context, workspaceID string) (io.Reader, error) + func (m *MockWorkspaces) RemoveRemoteStateConsumers(ctx context.Context, workspaceID string, ...) error + func (m *MockWorkspaces) RemoveTags(ctx context.Context, workspaceID string, ...) error + func (m *MockWorkspaces) RemoveVCSConnection(ctx context.Context, organization, workspace string) (*tfe.Workspace, error) + func (m *MockWorkspaces) RemoveVCSConnectionByID(ctx context.Context, workspaceID string) (*tfe.Workspace, error) + func (m *MockWorkspaces) SafeDelete(ctx context.Context, organization, workspace string) error + func (m *MockWorkspaces) SafeDeleteByID(ctx context.Context, workspaceID string) error + func (m *MockWorkspaces) UnassignSSHKey(ctx context.Context, workspaceID string) (*tfe.Workspace, error) + func (m *MockWorkspaces) Unlock(ctx context.Context, workspaceID string) (*tfe.Workspace, error) + func (m *MockWorkspaces) Update(ctx context.Context, organization, workspace string, ...) (*tfe.Workspace, error) + func (m *MockWorkspaces) UpdateByID(ctx context.Context, workspaceID string, options tfe.WorkspaceUpdateOptions) (*tfe.Workspace, error) + func (m *MockWorkspaces) UpdateRemoteStateConsumers(ctx context.Context, workspaceID string, ...) error + type State struct + func (s *State) Delete(force bool) error + func (s *State) DisableLocks() + func (s *State) GetRootOutputValues() (map[string]*states.OutputValue, error) + func (s *State) Lock(info *statemgr.LockInfo) (string, error) + func (s *State) PersistState(schemas *terraform.Schemas) error + func (s *State) RefreshState() error + func (s *State) State() *states.State + func (s *State) StateForMigration() *statefile.File + func (s *State) StateSnapshotMeta() statemgr.SnapshotMeta + func (s *State) Unlock(id string) error + func (s *State) WriteState(state *states.State) error + func (s *State) WriteStateForMigration(f *statefile.File, force bool) error + type Symbol rune + const Arrow + const Cross + const DownwardArrow + const Tick + const Warning + type WorkspaceMapping struct + Name string + Tags []string + func (wm WorkspaceMapping) Strategy() workspaceStrategy