types

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MPL-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package types contains the type definitions for the SDK

Index

Constants

View Source
const (
	RunSortableFieldCreatedAtAsc  RunSortableField = "CREATED_AT_ASC"
	RunSortableFieldCreatedAtDesc RunSortableField = "CREATED_AT_DESC"
	RunSortableFieldUpdatedAtAsc  RunSortableField = "UPDATED_AT_ASC"
	RunSortableFieldUpdatedAtDesc RunSortableField = "UPDATED_AT_DESC"

	// Run Status Types
	RunApplied            RunStatus = "applied"
	RunApplyQueued        RunStatus = "apply_queued"
	RunApplying           RunStatus = "applying"
	RunCanceled           RunStatus = "canceled"
	RunErrored            RunStatus = "errored"
	RunPending            RunStatus = "pending"
	RunPlanQueued         RunStatus = "plan_queued"
	RunPlanned            RunStatus = "planned"
	RunPlannedAndFinished RunStatus = "planned_and_finished"
	RunPlanning           RunStatus = "planning"
)

RunSortableField, VariableCategory, RunStatus constants

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUserToTeamInput added in v0.37.0

type AddUserToTeamInput struct {
	Username     string `json:"username"`
	TeamName     string `json:"teamName"`
	IsMaintainer bool   `json:"isMaintainer"`
}

AddUserToTeamInput is the input for adding a member to a team.

type Apply

type Apply struct {
	Metadata     ResourceMetadata
	CurrentJobID *string
	Status       ApplyStatus
	ErrorMessage *string
}

Apply holds information about a Tharsis run. ID resides in the metadata

type ApplyRunInput

type ApplyRunInput struct {
	Comment *string `json:"comment,omitempty"`
	RunID   string  `json:"runId"`
}

ApplyRunInput is the input for applying a run.

type ApplyStatus

type ApplyStatus string

ApplyStatus represents the various states for a Apply resource

const (
	ApplyCanceled ApplyStatus = "canceled"
	ApplyCreated  ApplyStatus = "created"
	ApplyErrored  ApplyStatus = "errored"
	ApplyFinished ApplyStatus = "finished"
	ApplyPending  ApplyStatus = "pending"
	ApplyQueued   ApplyStatus = "queued"
	ApplyRunning  ApplyStatus = "running"
)

Apply Status Types

type AssignManagedIdentityInput

type AssignManagedIdentityInput struct {
	ManagedIdentityID   *string `json:"managedIdentityId"`
	ManagedIdentityPath *string `json:"managedIdentityPath"`
	WorkspacePath       string  `json:"workspacePath"`
}

AssignManagedIdentityInput is the input for assigning a managed identity to a workspace.

type AssignServiceAccountToRunnerInput added in v0.27.0

type AssignServiceAccountToRunnerInput struct {
	RunnerPath         string `json:"runnerPath"`
	ServiceAccountPath string `json:"serviceAccountPath"`
}

AssignServiceAccountToRunnerInput is the input for assigning / un-assigning a service account to / from a runner agent

type CancelRunInput

type CancelRunInput struct {
	Comment *string `json:"comment,omitempty"`
	Force   *bool   `json:"force"`
	RunID   string  `json:"runId"`
}

CancelRunInput is the input for canceling a run.

type CancellationEvent

type CancellationEvent struct {
	Job Job
}

CancellationEvent represents a job cancellation event

type ClaimJobInput added in v0.26.0

type ClaimJobInput struct {
	RunnerPath string `json:"runnerPath"`
}

ClaimJobInput is the input for claiming a job

type ClaimJobResponse added in v0.26.0

type ClaimJobResponse struct {
	Token string
	JobID string
}

ClaimJobResponse is the response when claiming a job

type ConfigurationVersion

type ConfigurationVersion struct {
	Metadata    ResourceMetadata
	Status      string
	WorkspaceID string
	Speculative bool
}

ConfigurationVersion holds information about a Tharsis configuration version. It is used as input to and output from some operations. ID resides in the metadata

type CreateConfigurationVersionInput

type CreateConfigurationVersionInput struct {
	Speculative   *bool  `json:"speculative"`
	WorkspacePath string `json:"workspacePath"`
}

CreateConfigurationVersionInput is the input for creating a new configuration version.

type CreateGPGKeyInput added in v0.15.0

type CreateGPGKeyInput struct {
	ASCIIArmor string `json:"asciiArmor"`
	GroupPath  string `json:"groupPath"`
}

CreateGPGKeyInput is the input for creating a new GPG key.

type CreateGroupInput

type CreateGroupInput struct {
	Name        string  `json:"name"`
	ParentPath  *string `json:"parentPath"` // is allowed to be nil
	Description string  `json:"description"`
}

CreateGroupInput is the input for creating a new group.

type CreateManagedIdentityAccessRuleInput added in v0.4.0

type CreateManagedIdentityAccessRuleInput struct {
	Type                      ManagedIdentityAccessRuleType                      `json:"type"`
	ModuleAttestationPolicies []ManagedIdentityAccessRuleModuleAttestationPolicy `json:"moduleAttestationPolicies"`
	ManagedIdentityID         string                                             `json:"managedIdentityId"`
	RunStage                  JobType                                            `json:"runStage"`
	VerifyStateLineage        *bool                                              `json:"verifyStateLineage"`
	AllowedUsers              []string                                           `json:"allowedUsers"`
	AllowedServiceAccounts    []string                                           `json:"allowedServiceAccounts"`
	AllowedTeams              []string                                           `json:"allowedTeams"`
}

CreateManagedIdentityAccessRuleInput is the input for creating a managed identity access rule.

type CreateManagedIdentityAliasInput added in v0.13.0

type CreateManagedIdentityAliasInput struct {
	AliasSourceID   *string `json:"aliasSourceId"`
	AliasSourcePath *string `json:"aliasSourcePath"`
	Name            string  `json:"name"`
	GroupPath       string  `json:"groupPath"`
}

CreateManagedIdentityAliasInput is the input for creating a managed identity alias.

type CreateManagedIdentityCredentialsInput

type CreateManagedIdentityCredentialsInput struct {
	ID string `json:"id"`
}

CreateManagedIdentityCredentialsInput is the input for creating managed identity credentials

type CreateManagedIdentityInput

type CreateManagedIdentityInput struct {
	Type        ManagedIdentityType              `json:"type"`
	Name        string                           `json:"name"`
	Description string                           `json:"description"`
	GroupPath   string                           `json:"groupPath"`
	Data        string                           `json:"data"`
	AccessRules []ManagedIdentityAccessRuleInput `json:"accessRules"`
}

CreateManagedIdentityInput is the input for creating a managed identity.

type CreateNamespaceMembershipInput added in v0.37.0

type CreateNamespaceMembershipInput struct {
	NamespacePath    string  `json:"namespacePath"`
	Username         *string `json:"username"`
	ServiceAccountID *string `json:"serviceAccountId"`
	TeamName         *string `json:"teamName"`
	Role             string  `json:"role"`
}

CreateNamespaceMembershipInput is the input for adding a membership to a group or workspace.

type CreateNamespaceVariableInput added in v0.6.0

type CreateNamespaceVariableInput struct {
	NamespacePath string           `json:"namespacePath"`
	Category      VariableCategory `json:"category"`
	Key           string           `json:"key"`
	Value         string           `json:"value"` // The value is required, not optional.
	HCL           bool             `json:"hcl"`
}

CreateNamespaceVariableInput is the input for creating a namespace variable.

type CreateRunInput

type CreateRunInput struct {
	ConfigurationVersionID *string       `json:"configurationVersionId"`
	ModuleSource           *string       `json:"moduleSource"`
	ModuleVersion          *string       `json:"moduleVersion"`
	TerraformVersion       *string       `json:"terraformVersion"`
	Speculative            *bool         `json:"speculative"`
	WorkspacePath          string        `json:"workspacePath"`
	Variables              []RunVariable `json:"variables"`
	TargetAddresses        []string      `json:"targetAddresses"`
	IsDestroy              bool          `json:"isDestroy"`
	Refresh                bool          `json:"refresh"`
	RefreshOnly            bool          `json:"refreshOnly"`
}

CreateRunInput is the input for creating a new run.

type CreateRunnerInput added in v0.27.0

type CreateRunnerInput struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	GroupPath   string `json:"groupPath"`
}

CreateRunnerInput is the input for creating a runner agent

type CreateRunnerSessionErrorInput added in v0.30.0

type CreateRunnerSessionErrorInput struct {
	RunnerSessionID string `json:"runnerSessionId"`
	ErrorMessage    string `json:"errorMessage"`
}

CreateRunnerSessionErrorInput is the input for sending a runner session error.

type CreateRunnerSessionInput added in v0.30.0

type CreateRunnerSessionInput struct {
	RunnerPath string `json:"runnerPath"`
}

CreateRunnerSessionInput is the input for creating a runner session.

type CreateServiceAccountInput added in v0.6.0

type CreateServiceAccountInput struct {
	Name              string            `json:"name"`
	Description       string            `json:"description"`
	GroupPath         string            `json:"groupPath"`
	OIDCTrustPolicies []OIDCTrustPolicy `json:"oidcTrustPolicies"`
}

CreateServiceAccountInput is the input for creating a service account.

type CreateStateVersionInput

type CreateStateVersionInput struct {
	State string `json:"state"`
	RunID string `json:"runId"`
}

CreateStateVersionInput is the input for creating a state version.

type CreateTeamInput added in v0.37.0

type CreateTeamInput struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

CreateTeamInput is the input for creating a new team.

type CreateTerraformCLIDownloadURLInput

type CreateTerraformCLIDownloadURLInput struct {
	Version      string `json:"version"`
	OS           string `json:"os"`
	Architecture string `json:"architecture"`
}

CreateTerraformCLIDownloadURLInput is the input for CreateTerraformCLIDownloadURL.

type CreateTerraformModuleAttestationInput added in v0.14.0

type CreateTerraformModuleAttestationInput struct {
	ModulePath      string `json:"modulePath"`
	Description     string `json:"description"`
	AttestationData string `json:"attestationData"`
}

CreateTerraformModuleAttestationInput is the input for creating a terraform module attestation.

type CreateTerraformModuleInput added in v0.5.0

type CreateTerraformModuleInput struct {
	Name          string `json:"name"`
	System        string `json:"system"`
	GroupPath     string `json:"groupPath"`
	RepositoryURL string `json:"repositoryUrl"`
	Private       bool   `json:"private"`
}

CreateTerraformModuleInput is the input for creating a new module.

type CreateTerraformModuleVersionInput added in v0.5.0

type CreateTerraformModuleVersionInput struct {
	ModulePath string `json:"modulePath"`
	Version    string `json:"version"`
	SHASum     string `json:"shaSum"`
}

CreateTerraformModuleVersionInput is the input for creating a new module version.

type CreateTerraformProviderInput

type CreateTerraformProviderInput struct {
	Name          string `json:"name"`
	GroupPath     string `json:"groupPath"`
	RepositoryURL string `json:"repositoryUrl"`
	Private       bool   `json:"private"`
}

CreateTerraformProviderInput is the input for creating a new provider.

type CreateTerraformProviderPlatformInput

type CreateTerraformProviderPlatformInput struct {
	ProviderVersionID string `json:"providerVersionId"`
	OperatingSystem   string `json:"os"`
	Architecture      string `json:"arch"`
	SHASum            string `json:"shaSum"`
	Filename          string `json:"filename"`
}

CreateTerraformProviderPlatformInput is the input for creating a new provider platform.

type CreateTerraformProviderVersionInput

type CreateTerraformProviderVersionInput struct {
	ProviderPath string   `json:"providerPath"`
	Version      string   `json:"version"`
	Protocols    []string `json:"protocols"`
}

CreateTerraformProviderVersionInput is the input for creating a new provider version.

type CreateTerraformProviderVersionMirrorInput added in v0.28.0

type CreateTerraformProviderVersionMirrorInput struct {
	GroupPath         string `json:"groupPath"`
	Type              string `json:"type"`
	RegistryNamespace string `json:"registryNamespace"`
	RegistryHostname  string `json:"registryHostname"`
	SemanticVersion   string `json:"semanticVersion"`
}

CreateTerraformProviderVersionMirrorInput is the input for creating a new provider version mirror.

type CreateVCSProviderInput added in v0.15.0

type CreateVCSProviderInput struct {
	Name               string          `json:"name"`
	Description        string          `json:"description"`
	GroupPath          string          `json:"groupPath"`
	URL                *string         `json:"url"`
	OAuthClientID      string          `json:"oAuthClientId"`
	OAuthClientSecret  string          `json:"oAuthClientSecret"`
	Type               VCSProviderType `json:"type"`
	AutoCreateWebhooks bool            `json:"autoCreateWebhooks"`
}

CreateVCSProviderInput is the input to create a VCS Provider.

type CreateVCSProviderResponse added in v0.20.0

type CreateVCSProviderResponse struct {
	VCSProvider           *VCSProvider
	OAuthAuthorizationURL string
}

CreateVCSProviderResponse is the response from creating a new VCS provider.

type CreateWorkspaceInput

type CreateWorkspaceInput struct {
	MaxJobDuration     *int32  `json:"maxJobDuration"`
	TerraformVersion   *string `json:"terraformVersion"`
	PreventDestroyPlan *bool   `json:"preventDestroyPlan"`
	Name               string  `json:"name"`
	Description        string  `json:"description"`
	GroupPath          string  `json:"groupPath"`
}

CreateWorkspaceInput is the input for creating a new workspace.

type CreateWorkspaceVCSProviderLinkInput added in v0.15.0

type CreateWorkspaceVCSProviderLinkInput struct {
	ModuleDirectory     *string  `json:"moduleDirectory"`
	RepositoryPath      string   `json:"repositoryPath"`
	WorkspacePath       string   `json:"workspacePath"`
	ProviderID          string   `json:"providerId"`
	Branch              *string  `json:"branch"`
	TagRegex            *string  `json:"tagRegex"`
	GlobPatterns        []string `json:"globPatterns"`
	AutoSpeculativePlan bool     `json:"autoSpeculativePlan"`
	WebhookDisabled     bool     `json:"webhookDisabled"`
}

CreateWorkspaceVCSProviderLinkInput is the input to create a VCS Provider.

type CreateWorkspaceVCSProviderLinkResponse added in v0.15.0

type CreateWorkspaceVCSProviderLinkResponse struct {
	WebhookToken    *string                  `json:"webhookToken"`
	WebhookURL      *string                  `json:"webhookUrl"`
	VCSProviderLink WorkspaceVCSProviderLink `json:"vcsProviderLink"`
}

CreateWorkspaceVCSProviderLinkResponse is the output from creating a VCS Provider.

type DeleteGPGKeyInput added in v0.15.0

type DeleteGPGKeyInput struct {
	ID string `json:"id"`
}

DeleteGPGKeyInput is the input for deleting a GPG key.

type DeleteGroupInput

type DeleteGroupInput struct {
	Force     *bool   `json:"force"`
	GroupPath *string `json:"groupPath"`
	ID        *string `json:"id"`
}

DeleteGroupInput is the input for deleting a group.

type DeleteManagedIdentityAccessRuleInput added in v0.4.0

type DeleteManagedIdentityAccessRuleInput struct {
	ID string `json:"id"`
}

DeleteManagedIdentityAccessRuleInput is the input for deleting a managed identity access rule.

type DeleteManagedIdentityAliasInput added in v0.13.0

type DeleteManagedIdentityAliasInput struct {
	ID    string `json:"id"`
	Force bool   `json:"force"`
}

DeleteManagedIdentityAliasInput is the input for deleting a managed identity alias.

type DeleteManagedIdentityInput

type DeleteManagedIdentityInput struct {
	ID    string `json:"id"`
	Force bool   `json:"force"`
}

DeleteManagedIdentityInput is the input for deleting a managed identity.

type DeleteNamespaceMembershipInput added in v0.37.0

type DeleteNamespaceMembershipInput struct {
	ID string `json:"id"`
}

DeleteNamespaceMembershipInput is the input for updating a membership from a group or workspace.

type DeleteNamespaceVariableInput added in v0.6.0

type DeleteNamespaceVariableInput struct {
	ID string `json:"id"`
}

DeleteNamespaceVariableInput is the input for deleting a namespace variable.

type DeleteRunnerInput added in v0.27.0

type DeleteRunnerInput struct {
	ID string `json:"id"`
}

DeleteRunnerInput is the input for deleting a runner agent

type DeleteServiceAccountInput added in v0.6.0

type DeleteServiceAccountInput struct {
	ID string `json:"id"`
}

DeleteServiceAccountInput is the input for deleting a service account.

type DeleteTeamInput added in v0.37.0

type DeleteTeamInput struct {
	Name string `json:"name"`
}

DeleteTeamInput is the input for deleting a Team.

type DeleteTerraformModuleAttestationInput added in v0.14.0

type DeleteTerraformModuleAttestationInput struct {
	ID string `json:"id"`
}

DeleteTerraformModuleAttestationInput is the input for deleting a terraform module attestation.

type DeleteTerraformModuleInput added in v0.5.0

type DeleteTerraformModuleInput struct {
	ID string `json:"id"`
}

DeleteTerraformModuleInput is the input for deleting a terraform module

type DeleteTerraformModuleVersionInput added in v0.5.0

type DeleteTerraformModuleVersionInput struct {
	ID string `json:"id"`
}

DeleteTerraformModuleVersionInput is the input to delete a terraform module version

type DeleteTerraformProviderInput added in v0.15.0

type DeleteTerraformProviderInput struct {
	ID string `json:"id"`
}

DeleteTerraformProviderInput is the input for deleting a TF provider.

type DeleteTerraformProviderPlatformMirrorInput added in v0.28.0

type DeleteTerraformProviderPlatformMirrorInput struct {
	ID string `json:"id"`
}

DeleteTerraformProviderPlatformMirrorInput is the input for deleting a TerraformProviderPlatformMirror.

type DeleteTerraformProviderVersionMirrorInput added in v0.28.0

type DeleteTerraformProviderVersionMirrorInput struct {
	ID    string `json:"id"`
	Force bool   `json:"force"`
}

DeleteTerraformProviderVersionMirrorInput is the input for deleting a provider version mirror.

type DeleteVCSProviderInput added in v0.15.0

type DeleteVCSProviderInput struct {
	ID    string `json:"id"`
	Force bool   `json:"force"`
}

DeleteVCSProviderInput is the input for deleting a VCS provider.

type DeleteWorkspaceInput

type DeleteWorkspaceInput struct {
	Force         *bool   `json:"force"`
	WorkspacePath *string `json:"workspacePath"`
	ID            *string `json:"id"`
}

DeleteWorkspaceInput is the input for deleting a workspace.

type DeleteWorkspaceVCSProviderLinkInput added in v0.15.0

type DeleteWorkspaceVCSProviderLinkInput struct {
	ID    string `json:"id"`
	Force bool   `json:"force"`
}

DeleteWorkspaceVCSProviderLinkInput is the input for deleting a workspace VCS provider link.

type DownloadStateVersionInput

type DownloadStateVersionInput struct {
	ID string
}

DownloadStateVersionInput is the input for downloading a state version.

type Error added in v0.19.1

type Error struct {
	Err  error
	Code ErrorCode
	Msg  string
}

Error represents an error returned by the Tharsis API

func (*Error) Error added in v0.19.1

func (e *Error) Error() string

Error returns the error string.

func (*Error) Unwrap added in v0.19.1

func (e *Error) Unwrap() error

Unwrap unwraps an error.

type ErrorCode added in v0.19.1

type ErrorCode string

ErrorCode represents the types of errors that can be returned by the SDK

const (
	ErrInternal           ErrorCode = "internal error"
	ErrNotImplemented     ErrorCode = "not implemented"
	ErrNotFound           ErrorCode = "not found"
	ErrConflict           ErrorCode = "conflict"
	ErrOptimisticLock     ErrorCode = "optimistic lock"
	ErrForbidden          ErrorCode = "forbidden"
	ErrTooManyRequests    ErrorCode = "too many requests"
	ErrUnauthorized       ErrorCode = "unauthorized"
	ErrTooLarge           ErrorCode = "request too large"
	ErrBadRequest         ErrorCode = "bad request"
	ErrServiceUnavailable ErrorCode = "service unavailable"
)

Error code constants

type GPGKey added in v0.15.0

type GPGKey struct {
	// ID resides in the metadata
	Metadata     ResourceMetadata
	CreatedBy    string
	ASCIIArmor   string
	Fingerprint  string
	GPGKeyID     string // string of hex digits of size to fit in a uint64
	GroupPath    string
	ResourcePath string
}

GPGKey holds (most) information about a Tharsis GPG key.

type GetAssignedManagedIdentitiesInput added in v0.2.0

type GetAssignedManagedIdentitiesInput struct {
	Path *string
	ID   *string
}

GetAssignedManagedIdentitiesInput is the input for retrieving assigned managed identities for a workspace.

type GetConfigurationVersionInput

type GetConfigurationVersionInput struct {
	ID string
}

GetConfigurationVersionInput is the input to specify a single configuration version to fetch or download.

type GetGPGKeyInput added in v0.15.0

type GetGPGKeyInput struct {
	ID string `json:"id"`
}

GetGPGKeyInput is the input to specify a single GPG key to fetch.

type GetGroupInput

type GetGroupInput struct {
	Path *string
	ID   *string
}

GetGroupInput is the input to specify a single group to fetch.

type GetGroupsInput

type GetGroupsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *GroupSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *GroupFilter
}

GetGroupsInput is the input for listing groups

type GetGroupsOutput

type GetGroupsOutput struct {
	PageInfo *PageInfo
	Groups   []Group
}

GetGroupsOutput is the output when listing groups

func (*GetGroupsOutput) GetPageInfo

func (ggo *GetGroupsOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetGroupsOutput to implement the PaginatedResponse interface.

type GetJobInput

type GetJobInput struct {
	ID string `json:"id"`
}

GetJobInput is the input to specify a single job to fetch.

type GetJobLogsInput

type GetJobLogsInput struct {
	Limit *int32
	JobID string
	Start int32
}

GetJobLogsInput is the input to query a chunk of job logs

type GetManagedIdentityAccessRuleInput added in v0.2.0

type GetManagedIdentityAccessRuleInput struct {
	ID string `json:"id"`
}

GetManagedIdentityAccessRuleInput is the input for retrieving a managed identity access rule.

type GetManagedIdentityInput added in v0.4.0

type GetManagedIdentityInput struct {
	ID   *string `json:"id"`
	Path *string `json:"path"`
}

GetManagedIdentityInput is the input for retrieving a managed identity and/or its access rules.

type GetNamespaceMembershipsInput added in v0.38.0

type GetNamespaceMembershipsInput struct {
	NamespacePath string // required
}

GetNamespaceMembershipsInput is the input for listing a group's or workspace's memberships.

type GetNamespaceVariableInput added in v0.6.0

type GetNamespaceVariableInput struct {
	ID string `json:"id"`
}

GetNamespaceVariableInput is the input for retrieving a namespace variable.

type GetRunInput

type GetRunInput struct {
	ID string
}

GetRunInput is the input to specify a single run to fetch.

type GetRunnerInput added in v0.27.0

type GetRunnerInput struct {
	ID string `json:"id"`
}

GetRunnerInput is the input for retrieving a runner agent

type GetRunsInput

type GetRunsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RunSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *RunFilter
}

GetRunsInput is the input for listing runs

type GetRunsOutput

type GetRunsOutput struct {
	PageInfo *PageInfo
	Runs     []Run
}

GetRunsOutput is the output when listing runs

func (*GetRunsOutput) GetPageInfo

func (gro *GetRunsOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetRunsOutput to implement the PaginatedResponse interface.

type GetServiceAccountInput added in v0.6.0

type GetServiceAccountInput struct {
	ID string `json:"id"`
}

GetServiceAccountInput is the input for retrieving a service account.

type GetStateVersionInput

type GetStateVersionInput struct {
	ID string
}

GetStateVersionInput is the input for retrieving a State Version.

type GetTeamInput added in v0.39.0

type GetTeamInput struct {
	Name *string `json:"name"`
}

GetTeamInput is the input for getting a specific team.

type GetTerraformModuleAttestationsInput added in v0.14.0

type GetTerraformModuleAttestationsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleAttestationSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *TerraformModuleAttestationFilter
}

GetTerraformModuleAttestationsInput is the input for listing TerraformModuleAttestations

type GetTerraformModuleAttestationsOutput added in v0.14.0

type GetTerraformModuleAttestationsOutput struct {
	PageInfo           *PageInfo
	ModuleAttestations []TerraformModuleAttestation
}

GetTerraformModuleAttestationsOutput is the output when listing TerraformModuleAttestations

func (*GetTerraformModuleAttestationsOutput) GetPageInfo added in v0.14.0

func (gta *GetTerraformModuleAttestationsOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetTerraformModulesOutput to implement the PaginatedResponse interface.

type GetTerraformModuleInput added in v0.5.0

type GetTerraformModuleInput struct {
	ID   *string
	Path *string
}

GetTerraformModuleInput is the input to specify a single module to fetch.

type GetTerraformModuleVersionInput added in v0.5.0

type GetTerraformModuleVersionInput struct {
	ID         *string
	ModulePath *string
	Version    *string
}

GetTerraformModuleVersionInput is the input to specify a single module version to fetch.

type GetTerraformModuleVersionsInput added in v0.14.0

type GetTerraformModuleVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// TerraformModuleID is the Terraform module to get versions for.
	TerraformModuleID string
}

GetTerraformModuleVersionsInput is the input for listing TerraformModules

type GetTerraformModuleVersionsOutput added in v0.14.0

type GetTerraformModuleVersionsOutput struct {
	PageInfo       *PageInfo
	ModuleVersions []TerraformModuleVersion
}

GetTerraformModuleVersionsOutput is the output when listing TerraformModuleVersions

func (*GetTerraformModuleVersionsOutput) GetPageInfo added in v0.14.0

func (ggo *GetTerraformModuleVersionsOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetTerraformModuleVersionsOutput to implement the PaginatedResponse interface.

type GetTerraformModulesInput added in v0.14.0

type GetTerraformModulesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *TerraformModuleFilter
}

GetTerraformModulesInput is the input for listing TerraformModules

type GetTerraformModulesOutput added in v0.14.0

type GetTerraformModulesOutput struct {
	PageInfo         *PageInfo
	TerraformModules []TerraformModule
}

GetTerraformModulesOutput is the output when listing TerraformModules

func (*GetTerraformModulesOutput) GetPageInfo added in v0.14.0

func (gtm *GetTerraformModulesOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetTerraformModulesOutput to implement the PaginatedResponse interface.

type GetTerraformProviderInput

type GetTerraformProviderInput struct {
	ID string `json:"id"`
}

GetTerraformProviderInput is the input to specify a single provider to fetch.

type GetTerraformProviderPlatformInput

type GetTerraformProviderPlatformInput struct {
	ID string
}

GetTerraformProviderPlatformInput is the input to specify a single provider platform to fetch.

type GetTerraformProviderPlatformMirrorInput added in v0.28.0

type GetTerraformProviderPlatformMirrorInput struct {
	ID string `json:"id"`
}

GetTerraformProviderPlatformMirrorInput is the input for retrieving a TerraformProviderPlatformMirror.

type GetTerraformProviderPlatformMirrorsByVersionInput added in v0.28.0

type GetTerraformProviderPlatformMirrorsByVersionInput struct {
	VersionMirrorID string `json:"id"`
}

GetTerraformProviderPlatformMirrorsByVersionInput is the input for retrieving a list of TerraformProviderPlatformMirrors by the version mirror's ID.

type GetTerraformProviderVersionInput

type GetTerraformProviderVersionInput struct {
	ID string
}

GetTerraformProviderVersionInput is the input to specify a single provider version to fetch.

type GetTerraformProviderVersionMirrorByAddressInput added in v0.28.0

type GetTerraformProviderVersionMirrorByAddressInput struct {
	RegistryHostname  string `json:"registryHostname"`
	RegistryNamespace string `json:"registryNamespace"`
	Type              string `json:"type"`
	Version           string `json:"version"`
	GroupPath         string `json:"groupPath"`
}

GetTerraformProviderVersionMirrorByAddressInput is the input for retrieving a single provider version mirror by address.

type GetTerraformProviderVersionMirrorInput added in v0.28.0

type GetTerraformProviderVersionMirrorInput struct {
	ID string `json:"id"`
}

GetTerraformProviderVersionMirrorInput is the input to specify a single provider version mirror to fetch.

type GetTerraformProviderVersionMirrorsInput added in v0.28.0

type GetTerraformProviderVersionMirrorsInput struct {
	// Include inherited returns version mirrors that are inherited
	IncludeInherited *bool
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderVersionMirrorSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// GroupPath is the path of the group that contains the version mirror.
	GroupPath string
}

GetTerraformProviderVersionMirrorsInput is the input for listing TerraformProviderVersionMirrors.

type GetTerraformProviderVersionMirrorsOutput added in v0.28.0

type GetTerraformProviderVersionMirrorsOutput struct {
	PageInfo       *PageInfo
	VersionMirrors []TerraformProviderVersionMirror
}

GetTerraformProviderVersionMirrorsOutput is the output when listing TerraformProviderVersionMirrors.

func (*GetTerraformProviderVersionMirrorsOutput) GetPageInfo added in v0.28.0

GetPageInfo allows GetTerraformProviderVersionMirrorsOutput to implement the PaginatedResponse interface.

type GetUsersInput added in v0.39.0

type GetUsersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *UserSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *UserFilter
}

GetUsersInput is the input for listing users

type GetUsersOutput added in v0.39.0

type GetUsersOutput struct {
	PageInfo *PageInfo
	Users    []User
}

GetUsersOutput is the output when listing users

func (*GetUsersOutput) GetPageInfo added in v0.39.0

func (guo *GetUsersOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetUsersOutput to implement the PaginatedResponse interface.

type GetVCSProviderInput added in v0.15.0

type GetVCSProviderInput struct {
	ID string `json:"id"`
}

GetVCSProviderInput is the input for retrieving a VCS provider.

type GetWorkspaceInput

type GetWorkspaceInput struct {
	Path *string
	ID   *string
}

GetWorkspaceInput is the input to specify a single workspace to fetch.

type GetWorkspaceVCSProviderLinkInput added in v0.15.0

type GetWorkspaceVCSProviderLinkInput struct {
	ID string `json:"id"`
}

GetWorkspaceVCSProviderLinkInput is the input for retrieving a workspace VCS provider link.

type GetWorkspacesInput

type GetWorkspacesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *WorkspaceSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// Filter is used to filter the results
	Filter *WorkspaceFilter
}

GetWorkspacesInput is the input for listing workspaces

type GetWorkspacesOutput

type GetWorkspacesOutput struct {
	PageInfo   *PageInfo
	Workspaces []Workspace
}

GetWorkspacesOutput is the output when listing workspaces

func (*GetWorkspacesOutput) GetPageInfo

func (ggo *GetWorkspacesOutput) GetPageInfo() *PageInfo

GetPageInfo allows GetWorkspacesOutput to implement the PaginatedResponse interface.

type Group

type Group struct {
	// ID resides in the metadata
	Metadata    ResourceMetadata
	Name        string
	Description string
	FullPath    string
}

Group holds (most) information about a Tharsis group. It is used as input to and output from some operations.

See below for structs that handle DescendentGroups and Workspaces.

type GroupFilter

type GroupFilter struct {
	ParentPath *string
}

GroupFilter contains the supported fields for filtering Group resources

type GroupSortableField

type GroupSortableField string

GroupSortableField represents the fields that a group can be sorted by

const (
	GroupSortableFieldFullPathAsc  GroupSortableField = "FULL_PATH_ASC"
	GroupSortableFieldFullPathDesc GroupSortableField = "FULL_PATH_DESC"
)

GroupSortableField constants

type Job

type Job struct {
	Metadata        ResourceMetadata
	Status          string
	Type            JobType
	RunID           string
	WorkspacePath   string
	WorkspaceID     string
	LogSize         int
	MaxJobDuration  int32
	CancelRequested bool
}

Job holds information about a Tharsis job. It is used as input to and output from some operations. ID resides in the metadata

type JobCancellationEventSubscriptionInput

type JobCancellationEventSubscriptionInput struct {
	JobID string `json:"jobId"`
}

JobCancellationEventSubscriptionInput is the input for Job cancellation event subscription

type JobLogs added in v0.36.0

type JobLogs struct {
	Logs string
	Size int32
}

JobLogs is the output for getting job logs after a job has finished.

type JobLogsEvent added in v0.19.0

type JobLogsEvent struct {
	Error error
	Logs  string
}

JobLogsEvent is the output for subscribing to job logs.

type JobLogsSubscriptionInput added in v0.19.0

type JobLogsSubscriptionInput struct {
	Limit           *int32
	LastSeenLogSize *int32
	RunID           string
	WorkspacePath   string
	JobID           string `json:"jobId"`
}

JobLogsSubscriptionInput is the input for subscribing to job logs.

type JobType

type JobType string

JobType indicates the type of job

const (
	JobPlanType  JobType = "plan"
	JobApplyType JobType = "apply"
)

Job Types Constants

type ManagedIdentity

type ManagedIdentity struct {
	// ID resides in the metadata
	Metadata      ResourceMetadata
	Type          ManagedIdentityType
	AliasSourceID *string
	GroupPath     string
	ResourcePath  string
	Name          string
	Description   string
	Data          string
	CreatedBy     string
	IsAlias       bool
}

ManagedIdentity holds information about a Tharsis managed identity. It is used as input to and output from some operations.

type ManagedIdentityAccessRule

type ManagedIdentityAccessRule struct {
	Metadata                  ResourceMetadata
	RunStage                  JobType
	ManagedIdentityID         string
	AllowedUsers              []User
	AllowedServiceAccounts    []ServiceAccount
	AllowedTeams              []Team
	Type                      ManagedIdentityAccessRuleType
	ModuleAttestationPolicies []ManagedIdentityAccessRuleModuleAttestationPolicy
	VerifyStateLineage        bool
}

ManagedIdentityAccessRule represents an access rule for a managed identity.

type ManagedIdentityAccessRuleInput

type ManagedIdentityAccessRuleInput struct {
	Type                      ManagedIdentityAccessRuleType                      `json:"type"`
	ModuleAttestationPolicies []ManagedIdentityAccessRuleModuleAttestationPolicy `json:"moduleAttestationPolicies"`
	RunStage                  JobType                                            `json:"runStage"`
	VerifyStateLineage        *bool                                              `json:"verifyStateLineage"`
	AllowedUsers              []string                                           `json:"allowedUsers"`
	AllowedServiceAccounts    []string                                           `json:"allowedServiceAccounts"`
	AllowedTeams              []string                                           `json:"allowedTeams"`
}

ManagedIdentityAccessRuleInput is the input for managed identity access rules when created at the same time as the managed identity.

type ManagedIdentityAccessRuleModuleAttestationPolicy added in v0.14.0

type ManagedIdentityAccessRuleModuleAttestationPolicy struct {
	PredicateType *string `json:"predicateType"`
	PublicKey     string  `json:"publicKey"`
}

ManagedIdentityAccessRuleModuleAttestationPolicy is used in access rules to verify that a module has an in-toto attestation that is signed with the specified public key and an optional predicate type

type ManagedIdentityAccessRuleType added in v0.14.0

type ManagedIdentityAccessRuleType string

ManagedIdentityAccessRuleType represents the supported managed identity rule types

const (
	ManagedIdentityAccessRuleEligiblePrincipals ManagedIdentityAccessRuleType = "eligible_principals"
	ManagedIdentityAccessRuleModuleAttestation  ManagedIdentityAccessRuleType = "module_attestation"
)

ManagedIdentityAccessRuleType constants

type ManagedIdentityType

type ManagedIdentityType string

ManagedIdentityType represents the supported managed identity types

const (
	ManagedIdentityAzureFederated   ManagedIdentityType = "azure_federated"
	ManagedIdentityAWSFederated     ManagedIdentityType = "aws_federated"
	ManagedIdentityTharsisFederated ManagedIdentityType = "tharsis_federated"
)

ManagedIdentityType constants

type MigrateGroupInput added in v0.25.0

type MigrateGroupInput struct {
	NewParentPath *string `json:"newParentPath"`
	GroupPath     string  `json:"groupPath"`
}

MigrateGroupInput is the input for migrating a group. One (and only one) of ID and GroupPath finds the group to migrate. If NewParentPath is nil, that means move the group to top-level.

type NamespaceMembership added in v0.37.0

type NamespaceMembership struct {
	// ID resides in the metadata
	Metadata         ResourceMetadata
	UserID           *string
	ServiceAccountID *string
	TeamID           *string
	Role             string
}

NamespaceMembership holds information about a Tharsis group or workspace membership.

type NamespaceVariable added in v0.6.0

type NamespaceVariable struct {
	Value         *string
	Metadata      ResourceMetadata
	ID            string
	NamespacePath string
	Category      VariableCategory
	Key           string
	HCL           bool
}

NamespaceVariable models a namespace variable.

type OIDCTrustPolicy added in v0.6.0

type OIDCTrustPolicy struct {
	BoundClaims map[string]string `json:"boundClaims"`
	Issuer      string            `json:"issuer"`
}

OIDCTrustPolicy models one trust policy under a service account.

type PageInfo

type PageInfo struct {
	Cursor      string
	TotalCount  int
	HasNextPage bool
}

PageInfo contains all three fields common to all queries that can be paginated.

Please note that the internal struct called PageInfo inside the query structure is lacking the totalCount field.

type PaginationOptions

type PaginationOptions struct {
	Limit  *int32
	Cursor *string
}

PaginationOptions contain the cursor based pagination options Our paginators support only forward paging, not reverse.

type Plan

type Plan struct {
	CurrentJobID         *string
	Metadata             ResourceMetadata
	Status               PlanStatus
	ResourceAdditions    int
	ResourceChanges      int
	ResourceDestructions int
	HasChanges           bool
	ErrorMessage         *string
}

Plan holds information about a Tharsis plan. ID resides in the metadata

type PlanStatus

type PlanStatus string

PlanStatus represents the various states for a Plan resource

const (
	PlanCanceled PlanStatus = "canceled"
	PlanQueued   PlanStatus = "queued"
	PlanErrored  PlanStatus = "errored"
	PlanFinished PlanStatus = "finished"
	PlanPending  PlanStatus = "pending"
	PlanRunning  PlanStatus = "running"
)

Run Status Types

type ResourceMetadata

type ResourceMetadata struct {
	CreationTimestamp    *time.Time `json:"createdAt"`
	LastUpdatedTimestamp *time.Time `json:"updatedAt,omitempty" `
	ID                   string     `json:"id"`
	Version              string     `json:"version"`
}

ResourceMetadata contains metadata for a particular resource

Keeping the ID field here rather than following GraphQL in pulling the ID field out to the parent.

type Run

type Run struct {
	ModuleSource           *string
	ConfigurationVersionID *string
	ForceCanceledBy        *string
	ModuleVersion          *string
	ModuleDigest           *string
	StateVersionID         *string
	Plan                   *Plan
	Apply                  *Apply
	ForceCancelAvailableAt *time.Time
	Metadata               ResourceMetadata
	WorkspaceID            string
	WorkspacePath          string
	Status                 RunStatus
	CreatedBy              string
	TerraformVersion       string
	TargetAddresses        []string
	IsDestroy              bool
	ForceCanceled          bool
	Refresh                bool
	RefreshOnly            bool
	Speculative            bool
}

Run holds information about a Tharsis run. It is used as input to and output from some operations. ID resides in the metadata

type RunFilter

type RunFilter struct {
	WorkspacePath *string
	WorkspaceID   *string
}

RunFilter contains the supported fields for filtering Run resources

type RunSortableField

type RunSortableField string

RunSortableField represents the fields that a workspace can be sorted by

type RunStatus

type RunStatus string

RunStatus represents the various states for a Run resource

type RunSubscriptionInput

type RunSubscriptionInput struct {
	RunID         *string `json:"runId"`
	WorkspacePath string  `json:"workspacePath"`
}

RunSubscriptionInput is the input for subscribing to run events.

type RunVariable

type RunVariable struct {
	Value         *string          `json:"value"`
	NamespacePath *string          `json:"namespacePath"`
	Key           string           `json:"key"`
	Category      VariableCategory `json:"category"`
	HCL           bool             `json:"hcl"`
}

RunVariable holds information about a run variable

type RunnerAgent added in v0.27.0

type RunnerAgent struct {
	Metadata     ResourceMetadata
	Name         string
	Description  string
	GroupPath    string
	ResourcePath string
	CreatedBy    string
	Type         RunnerType
}

RunnerAgent represents a Tharsis Runner

type RunnerSession added in v0.30.0

type RunnerSession struct {
	Runner        *RunnerAgent
	LastContacted *time.Time
	Metadata      ResourceMetadata
	ErrorCount    int
	Internal      bool
}

RunnerSession represents a Tharsis Runner Session.

type RunnerSessionHeartbeatInput added in v0.30.0

type RunnerSessionHeartbeatInput struct {
	RunnerSessionID string `json:"runnerSessionId"`
}

RunnerSessionHeartbeatInput is the input for sending a runner session heartbeat.

type RunnerType added in v0.30.0

type RunnerType string

RunnerType indicates the type of runner

const (
	RunnerTypeShared RunnerType = "shared"
	RunnerTypeGroup  RunnerType = "group"
)

Runner Types Constants (currently lowercase to match the API and the API's model)

type SaveJobLogsInput

type SaveJobLogsInput struct {
	Logs        string `json:"logs"`
	JobID       string `json:"jobId"`
	StartOffset int32  `json:"startOffset"`
}

SaveJobLogsInput is the input for saving job logs.

type ServiceAccount

type ServiceAccount struct {
	Metadata          ResourceMetadata
	GroupPath         string
	ResourcePath      string
	Name              string
	Description       string
	OIDCTrustPolicies []OIDCTrustPolicy
}

ServiceAccount provides M2M authentication

type ServiceAccountCreateTokenInput added in v0.12.0

type ServiceAccountCreateTokenInput struct {
	ServiceAccountPath string `json:"serviceAccountPath"`
	Token              string `json:"token"`
}

ServiceAccountCreateTokenInput is the input for logging in to a service account.

type ServiceAccountCreateTokenResponse added in v0.12.0

type ServiceAccountCreateTokenResponse struct {
	Token     string        `json:"token"`
	ExpiresIn time.Duration `json:"expiresIn"`
}

ServiceAccountCreateTokenResponse is the output from logging in to a service account.

type SetNamespaceVariablesInput

type SetNamespaceVariablesInput struct {
	NamespacePath string                          `json:"namespacePath"`
	Category      VariableCategory                `json:"category"`
	Variables     []SetNamespaceVariablesVariable `json:"variables"`
}

SetNamespaceVariablesInput is the input for setting a namespace variable.

type SetNamespaceVariablesVariable added in v0.6.0

type SetNamespaceVariablesVariable struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	HCL   bool   `json:"hcl"`
}

SetNamespaceVariablesVariable is the input for setting ALL variables in a namespace.

type StateVersion

type StateVersion struct {
	// ID resides in the metadata
	Metadata ResourceMetadata
	RunID    string
	Outputs  []StateVersionOutput
}

StateVersion represents a specific version of the the terraform state associated with a workspace It is used as input to and output from some operations.

type StateVersionOutput

type StateVersionOutput struct {
	Value     cty.Value
	Type      cty.Type
	Metadata  ResourceMetadata
	Name      string
	Sensitive bool
}

StateVersionOutput represents a specific version of the the terraform state's outputs associated with a workspace ID resides in the metadata

type Team

type Team struct {
	Name           string
	Description    string
	SCIMExternalID string
	Metadata       ResourceMetadata
}

Team represents a team of (human) users.

type TeamMember added in v0.37.0

type TeamMember struct {
	Metadata     ResourceMetadata
	UserID       string
	TeamID       string
	IsMaintainer bool
}

TeamMember represents one team member.

type TerraformModule added in v0.5.0

type TerraformModule struct {
	Metadata          ResourceMetadata
	Name              string
	System            string
	GroupPath         string
	ResourcePath      string
	RegistryNamespace string
	RepositoryURL     string
	Private           bool
}

TerraformModule represents a Terraform module.

type TerraformModuleAttestation added in v0.14.0

type TerraformModuleAttestation struct {
	ModuleID      string
	Description   string
	SchemaType    string
	PredicateType string
	Data          string
	Metadata      ResourceMetadata
	Digests       []string
}

TerraformModuleAttestation represents a terraform module attestation

type TerraformModuleAttestationFilter added in v0.14.0

type TerraformModuleAttestationFilter struct {
	Digest                   *string
	TerraformModuleID        *string
	TerraformModuleVersionID *string
}

TerraformModuleAttestationFilter contains the supported fields for filtering TerraformModuleAttestation resources

type TerraformModuleAttestationSortableField added in v0.14.0

type TerraformModuleAttestationSortableField string

TerraformModuleAttestationSortableField represents the fields that a TerraformModuleAttestation can be sorted by

const (
	TerraformModuleAttestationSortableFieldPredicateAsc  TerraformModuleAttestationSortableField = "PREDICATE_ASC"
	TerraformModuleAttestationSortableFieldPredicateDesc TerraformModuleAttestationSortableField = "PREDICATE_DESC"
	TerraformModuleAttestationSortableFieldCreatedAtAsc  TerraformModuleAttestationSortableField = "CREATED_AT_ASC"
	TerraformModuleAttestationSortableFieldCreatedAtDesc TerraformModuleAttestationSortableField = "CREATED_AT_DESC"
)

TerraformModuleSortableField constants

type TerraformModuleFilter added in v0.14.0

type TerraformModuleFilter struct {
	Search *string
}

TerraformModuleFilter contains the supported fields for filtering TerraformModule resources

type TerraformModuleSortableField added in v0.14.0

type TerraformModuleSortableField string

TerraformModuleSortableField represents the fields that a TerraformModule can be sorted by

const (
	TerraformModuleSortableFieldNameAsc       TerraformModuleSortableField = "NAME_ASC"
	TerraformModuleSortableFieldNameDesc      TerraformModuleSortableField = "NAME_DESC"
	TerraformModuleSortableFieldUpdatedAtAsc  TerraformModuleSortableField = "UPDATED_AT_ASC"
	TerraformModuleSortableFieldUpdatedAtDesc TerraformModuleSortableField = "UPDATED_AT_DESC"
)

TerraformModuleSortableField constants

type TerraformModuleVersion added in v0.5.0

type TerraformModuleVersion struct {
	Metadata    ResourceMetadata
	ModuleID    string
	Version     string
	SHASum      string
	Status      string
	Error       string
	Diagnostics string
	Submodules  []string
	Examples    []string
	Latest      bool
}

TerraformModuleVersion represents a Tharsis module version.

type TerraformModuleVersionSortableField added in v0.14.0

type TerraformModuleVersionSortableField string

TerraformModuleVersionSortableField represents the fields that a TerraformModuleVersion can be sorted by

const (
	TerraformModuleVersionSortableFieldUpdatedAtAsc  TerraformModuleVersionSortableField = "UPDATED_AT_ASC"
	TerraformModuleVersionSortableFieldUpdatedAtDesc TerraformModuleVersionSortableField = "UPDATED_AT_DESC"
	TerraformModuleVersionSortableFieldCreatedAtAsc  TerraformModuleVersionSortableField = "CREATED_AT_ASC"
	TerraformModuleVersionSortableFieldCreatedAtDesc TerraformModuleVersionSortableField = "CREATED_AT_DESC"
)

TerraformModuleVersionSortableField constants

type TerraformProvider

type TerraformProvider struct {
	Metadata          ResourceMetadata
	Name              string
	GroupPath         string
	ResourcePath      string
	RegistryNamespace string
	RepositoryURL     string
	Private           bool
}

TerraformProvider represents a Terraform provider.

type TerraformProviderPlatform

type TerraformProviderPlatform struct {
	Metadata          ResourceMetadata
	ProviderVersionID string
	OperatingSystem   string
	Architecture      string
	SHASum            string
	Filename          string
	BinaryUploaded    bool
}

TerraformProviderPlatform represents a Tharsis provider platform.

type TerraformProviderPlatformMirror added in v0.28.0

type TerraformProviderPlatformMirror struct {
	Metadata      ResourceMetadata
	VersionMirror TerraformProviderVersionMirror
	OS            string
	Arch          string
}

TerraformProviderPlatformMirror represents a Terraform provider platform mirror.

type TerraformProviderVersion

type TerraformProviderVersion struct {
	Metadata                 ResourceMetadata
	ProviderID               string
	Version                  string
	GPGKeyID                 *string
	GPGASCIIArmor            *string
	Protocols                []string
	SHASumsUploaded          bool
	SHASumsSignatureUploaded bool
	ReadmeUploaded           bool
}

TerraformProviderVersion represents a Tharsis provider version.

type TerraformProviderVersionMirror added in v0.28.0

type TerraformProviderVersionMirror struct {
	Metadata          ResourceMetadata
	SemanticVersion   string
	RegistryHostname  string
	RegistryNamespace string
	Type              string
}

TerraformProviderVersionMirror represents a Tharsis provider version mirror.

type TerraformProviderVersionMirrorSortableField added in v0.28.0

type TerraformProviderVersionMirrorSortableField string

TerraformProviderVersionMirrorSortableField represents fields that a TerraformProviderVersionMirror can be sorted by.

const (
	TerraformProviderVersionMirrorSortableFieldCreatedAtAsc  TerraformProviderVersionMirrorSortableField = "CREATED_AT_ASC"
	TerraformProviderVersionMirrorSortableFieldCreatedAtDesc TerraformProviderVersionMirrorSortableField = "CREATED_AT_DESC"
)

TerraformProviderVersionMirrorSortableField constants

type UpdateApplyInput

type UpdateApplyInput struct {
	ID           string      `json:"id"`
	Status       ApplyStatus `json:"status"`
	ErrorMessage *string     `json:"errorMessage"`
}

UpdateApplyInput is the input for updating an apply.

type UpdateGroupInput

type UpdateGroupInput struct {
	GroupPath   *string `json:"groupPath"`
	ID          *string `json:"id"`
	Description string  `json:"description"`
}

UpdateGroupInput is the input for updating a group. One (and only one) of ID and GroupPath finds the group to update. Description is modified.

type UpdateManagedIdentityAccessRuleInput added in v0.4.0

type UpdateManagedIdentityAccessRuleInput struct {
	ID                        string                                             `json:"id"`
	ModuleAttestationPolicies []ManagedIdentityAccessRuleModuleAttestationPolicy `json:"moduleAttestationPolicies"`
	RunStage                  JobType                                            `json:"runStage"`
	VerifyStateLineage        *bool                                              `json:"verifyStateLineage"`
	AllowedUsers              []string                                           `json:"allowedUsers"`
	AllowedServiceAccounts    []string                                           `json:"allowedServiceAccounts"`
	AllowedTeams              []string                                           `json:"allowedTeams"`
}

UpdateManagedIdentityAccessRuleInput is the input for updating a managed identity access rule.

type UpdateManagedIdentityInput

type UpdateManagedIdentityInput struct {
	Data        string `json:"data"`
	ID          string `json:"id"`
	Description string `json:"description"`
}

UpdateManagedIdentityInput is the input for updating a managed identity.

type UpdateNamespaceMembershipInput added in v0.37.0

type UpdateNamespaceMembershipInput struct {
	ID   string `json:"id"`
	Role string `json:"role"`
}

UpdateNamespaceMembershipInput is the input for updating a membership on a group or workspace.

type UpdateNamespaceVariableInput added in v0.6.0

type UpdateNamespaceVariableInput struct {
	ID    string `json:"id"`
	Key   string `json:"key"`
	Value string `json:"value"`
	HCL   bool   `json:"hcl"`
}

UpdateNamespaceVariableInput is the input for updating a namespace variable.

type UpdatePlanInput

type UpdatePlanInput struct {
	ID           string     `json:"id"`
	Status       PlanStatus `json:"status"`
	HasChanges   bool       `json:"hasChanges"`
	ErrorMessage *string    `json:"errorMessage"`
}

UpdatePlanInput is the input for updating a plan

type UpdateRunnerInput added in v0.27.0

type UpdateRunnerInput struct {
	ID          string `json:"id"`
	Description string `json:"description"`
}

UpdateRunnerInput is the input for updating a runner agent

type UpdateServiceAccountInput added in v0.6.0

type UpdateServiceAccountInput struct {
	ID                string            `json:"id"`
	Description       string            `json:"description"`
	OIDCTrustPolicies []OIDCTrustPolicy `json:"oidcTrustPolicies"`
}

UpdateServiceAccountInput is the input for updating a service account.

type UpdateTerraformModuleAttestationInput added in v0.14.0

type UpdateTerraformModuleAttestationInput struct {
	ID          string `json:"id"`
	Description string `json:"description"`
}

UpdateTerraformModuleAttestationInput is the input for updating a terraform module attestation.

type UpdateTerraformModuleInput added in v0.5.0

type UpdateTerraformModuleInput struct {
	RepositoryURL *string `json:"repositoryUrl"`
	Private       *bool   `json:"private"`
	ID            string  `json:"id"`
}

UpdateTerraformModuleInput is the input for updating a module.

type UpdateTerraformProviderInput added in v0.15.0

type UpdateTerraformProviderInput struct {
	ID            string `json:"id"`
	RepositoryURL string `json:"repositoryUrl"`
	Private       bool   `json:"private"`
}

UpdateTerraformProviderInput is the input for updating a TF provider.

type UpdateVCSProviderInput added in v0.15.0

type UpdateVCSProviderInput struct {
	Description       *string `json:"description"`
	OAuthClientID     *string `json:"oAuthClientId"`
	OAuthClientSecret *string `json:"oAuthClientSecret"`
	ID                string  `json:"id"`
}

UpdateVCSProviderInput is the input for creating a new VCS provider.

type UpdateWorkspaceInput

type UpdateWorkspaceInput struct {
	MaxJobDuration     *int32  `json:"maxJobDuration"`
	TerraformVersion   *string `json:"terraformVersion"`
	PreventDestroyPlan *bool   `json:"preventDestroyPlan"`
	WorkspacePath      *string `json:"workspacePath"`
	ID                 *string `json:"id"`
	Description        string  `json:"description"`
}

UpdateWorkspaceInput is the input for updating a workspace. One (and only one) of ID and WorkspacePath finds the workspace to update. The other fields are modified.

type UpdateWorkspaceVCSProviderLinkInput added in v0.15.0

type UpdateWorkspaceVCSProviderLinkInput struct {
	ID                  string   `json:"id"`
	ModuleDirectory     *string  `json:"moduleDirectory"`
	Branch              *string  `json:"branch"`
	TagRegex            *string  `json:"tagRegex"`
	GlobPatterns        []string `json:"globPatterns"`
	AutoSpeculativePlan bool     `json:"autoSpeculativePlan"`
	WebhookDisabled     bool     `json:"webhookDisabled"`
}

UpdateWorkspaceVCSProviderLinkInput is the input for creating a new workspace VCS provider link.

type UploadConfigurationVersionInput

type UploadConfigurationVersionInput struct {
	WorkspacePath          string `json:"workspacePath"`
	ConfigurationVersionID string `json:"configurationVersionId"`
	DirectoryPath          string `json:"directoryPath"`
}

UploadConfigurationVersionInput is the input for uploading a new configuration version.

type UploadProviderPlatformPackageToMirrorInput added in v0.28.0

type UploadProviderPlatformPackageToMirrorInput struct {
	Reader          io.Reader
	VersionMirrorID string
	OS              string
	Arch            string
}

UploadProviderPlatformPackageToMirrorInput is the input for uploading a Terraform provider package.

type User

type User struct {
	Username       string
	Email          string
	SCIMExternalID string
	Metadata       ResourceMetadata
	Admin          bool
	Active         bool
}

User represents a Tharsis user.

type UserFilter added in v0.39.0

type UserFilter struct {
	Search *string
}

UserFilter contains the supported fields for filtering User resources

type UserSortableField added in v0.39.0

type UserSortableField string

UserSortableField represents the fields that a user can be sorted by

const (
	UserSortableFieldUpdatedAtAsc  UserSortableField = "UPDATED_AT_ASC"
	UserSortableFieldUpdatedAtDesc UserSortableField = "UPDATED_AT_DESC"
)

UserSortableField constants

type VCSProvider added in v0.15.0

type VCSProvider struct {
	// ID resides in the metadata
	Metadata           ResourceMetadata
	CreatedBy          string
	Name               string
	Description        string
	URL                string
	GroupPath          string
	ResourcePath       string
	Type               VCSProviderType
	AutoCreateWebhooks bool
}

VCSProvider holds the information about a VCS Provider.

type VCSProviderType added in v0.15.0

type VCSProviderType string

VCSProviderType represents the supported VCS provider types

const (
	VCSProviderTypeGitlab VCSProviderType = "gitlab"
	VCSProviderTypeGithub VCSProviderType = "github"
)

VCSProviderType constants

type VariableCategory

type VariableCategory string

VariableCategory represents the categories of variables, Terraform or environment.

const (
	TerraformVariableCategory   VariableCategory = "terraform"
	EnvironmentVariableCategory VariableCategory = "environment"
)

Variable Category types

type Workspace

type Workspace struct {
	CurrentStateVersion *StateVersion
	Metadata            ResourceMetadata
	Name                string
	GroupPath           string
	FullPath            string
	Description         string
	TerraformVersion    string
	MaxJobDuration      int32
	PreventDestroyPlan  bool
}

Workspace holds information about a Tharsis workspace. It is used as input to and output from some operations.

Tharsis API has CurrentRunID and CurrentStateVersionID.

type WorkspaceFilter

type WorkspaceFilter struct {
	GroupPath *string
}

WorkspaceFilter contains the supported field(s) for filtering Workspace resources

type WorkspaceSortableField

type WorkspaceSortableField string

WorkspaceSortableField represents the fields that a workspace can be sorted by

const (
	WorkspaceSortableFieldFullPathAsc   WorkspaceSortableField = "FULL_PATH_ASC"
	WorkspaceSortableFieldFullPathDesc  WorkspaceSortableField = "FULL_PATH_DESC"
	WorkspaceSortableFieldUpdatedAtAsc  WorkspaceSortableField = "UPDATED_AT_ASC"
	WorkspaceSortableFieldUpdatedAtDesc WorkspaceSortableField = "UPDATED_AT_DESC"
)

WorkspaceSortableField constants

type WorkspaceVCSProviderLink struct {
	// ID resides in the metadata
	Metadata            ResourceMetadata
	CreatedBy           string
	WorkspaceID         string
	WorkspacePath       string
	VCSProviderID       string
	RepositoryPath      string
	WebhookID           *string
	ModuleDirectory     *string
	Branch              string
	TagRegex            *string
	GlobPatterns        []string
	AutoSpeculativePlan bool
	WebhookDisabled     bool
}

WorkspaceVCSProviderLink holds the information about a VCS Provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL