Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ApproveRun(runID, message string) error
- func (c *Client) ConfigureWorkspace(cfg *schemas.Config, dryRun bool) (w *tfc.Workspace, err error)
- func (c *Client) CreateRun(cfg *schemas.Config, w *tfc.Workspace, opts *TFCCreateRunOptions) error
- func (c *Client) DeleteAllWorkspaceVariables(w *tfc.Workspace) (err error)
- func (c *Client) DeleteWorkspaceVariables(w *tfc.Workspace, variables schemas.Variables) (err error)
- func (c *Client) DiscardRun(runID, message string) error
- func (c *Client) GetWorkspace(organization, workspace string) (*tfc.Workspace, error)
- func (c *Client) GetWorkspaceCurrentRunID(w *tfc.Workspace) (string, error)
- func (c *Client) GetWorkspaceStatus(cfg *schemas.Config) error
- func (c *Client) RenderVariablesLocally(cfg *schemas.Config) error
- func (c *Client) RenderVariablesOnTFC(cfg *schemas.Config, w *tfc.Workspace, dryRun, forceUpdate bool) error
- func (c *Client) SetWorkspaceOperations(w *tfc.Workspace, operations bool) (err error)
- type RenderVariablesType
- type TFCCreateRunOptions
- type TFCRunType
- type TFCVariables
Constants ¶
const ( // RenderVariablesTypeTFC refers to a Terraform Cloud rendering RenderVariablesTypeTFC RenderVariablesType = "tfc" // RenderVariablesTypeLocal refers to a local rendering RenderVariablesTypeLocal RenderVariablesType = "local" // VariableExpirationsName is the name of the variable used for storing VariableExpirations in TFC VariableExpirationsName string = "__TFCW_VARIABLES_EXPIRATIONS" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Vault *providerVault.Client S5 *providerS5.Client Env *providerEnv.Client TFC *tfc.Client Context context.Context ProcessedVariablesMutex sync.Mutex ProcessedVariables map[string]schemas.VariableKind Backoff *backoff.Backoff }
Client aggregates provider clients
func (*Client) ApproveRun ¶
ApproveRun given its ID
func (*Client) ConfigureWorkspace ¶
ConfigureWorkspace check and remediate the configuration of the configured workspace
func (*Client) DeleteAllWorkspaceVariables ¶
DeleteAllWorkspaceVariables delete the all the variables present on the workspace
func (*Client) DeleteWorkspaceVariables ¶
func (c *Client) DeleteWorkspaceVariables(w *tfc.Workspace, variables schemas.Variables) (err error)
DeleteWorkspaceVariables delete the variables list passed as an argument if they are present on the workspace
func (*Client) DiscardRun ¶
DiscardRun given its ID
func (*Client) GetWorkspace ¶
GetWorkspace returns a workspace given its name and organization
func (*Client) GetWorkspaceCurrentRunID ¶
GetWorkspaceCurrentRunID returns the status of the configured workspace
func (*Client) GetWorkspaceStatus ¶
GetWorkspaceStatus returns the status of the configured workspace
func (*Client) RenderVariablesLocally ¶
RenderVariablesLocally issues a rendering of all variables defined in a schemas.Config object on TFC
type RenderVariablesType ¶
type RenderVariablesType string
RenderVariablesType defines possible rendering methods
type TFCCreateRunOptions ¶
type TFCCreateRunOptions struct { AutoApprove bool AutoDiscard bool NoPrompt bool OutputPath string Message string StartTimeout time.Duration }
TFCCreateRunOptions handles configuration variables for creating a new run on TFE
type TFCRunType ¶
type TFCRunType string
TFCRunType defines possible TFC run types
const ( // TFCRunTypePlan refers to a TFC `plan` TFCRunTypePlan TFCRunType = "plan" // TFCRunTypeApply refers to a TFC `apply` TFCRunTypeApply TFCRunType = "apply" )
type TFCVariables ¶
type TFCVariables map[tfc.CategoryType]map[string]*tfc.Variable
TFCVariables gives us an accessible fashion for managing all our variables independently of their kind