Documentation
¶
Overview ¶
Package types contains the type definitions for the SDK
Index ¶
- Constants
- type Apply
- type ApplyRunInput
- type ApplyStatus
- type AssignManagedIdentityInput
- type CancelRunInput
- type CancellationEvent
- type ConfigurationVersion
- type CreateConfigurationVersionInput
- type CreateGPGKeyInput
- type CreateGroupInput
- type CreateManagedIdentityAccessRuleInput
- type CreateManagedIdentityAliasInput
- type CreateManagedIdentityCredentialsInput
- type CreateManagedIdentityInput
- type CreateNamespaceVariableInput
- type CreateRunInput
- type CreateServiceAccountInput
- type CreateStateVersionInput
- type CreateTerraformCLIDownloadURLInput
- type CreateTerraformModuleAttestationInput
- type CreateTerraformModuleInput
- type CreateTerraformModuleVersionInput
- type CreateTerraformProviderInput
- type CreateTerraformProviderPlatformInput
- type CreateTerraformProviderVersionInput
- type CreateVCSProviderInput
- type CreateWorkspaceInput
- type CreateWorkspaceVCSProviderLinkInput
- type CreateWorkspaceVCSProviderLinkResponse
- type DeleteGPGKeyInput
- type DeleteGroupInput
- type DeleteManagedIdentityAccessRuleInput
- type DeleteManagedIdentityAliasInput
- type DeleteManagedIdentityInput
- type DeleteNamespaceVariableInput
- type DeleteServiceAccountInput
- type DeleteTerraformModuleAttestationInput
- type DeleteTerraformModuleInput
- type DeleteTerraformModuleVersionInput
- type DeleteTerraformProviderInput
- type DeleteVCSProviderInput
- type DeleteWorkspaceInput
- type DeleteWorkspaceVCSProviderLinkInput
- type DownloadStateVersionInput
- type GPGKey
- type GetAssignedManagedIdentitiesInput
- type GetConfigurationVersionInput
- type GetGPGKeyInput
- type GetGroupInput
- type GetGroupsInput
- type GetGroupsOutput
- type GetJobInput
- type GetJobLogsInput
- type GetManagedIdentityAccessRuleInput
- type GetManagedIdentityInput
- type GetNamespaceVariableInput
- type GetRunInput
- type GetRunsInput
- type GetRunsOutput
- type GetServiceAccountInput
- type GetStateVersionInput
- type GetTerraformModuleAttestationsInput
- type GetTerraformModuleAttestationsOutput
- type GetTerraformModuleInput
- type GetTerraformModuleVersionInput
- type GetTerraformModuleVersionsInput
- type GetTerraformModuleVersionsOutput
- type GetTerraformModulesInput
- type GetTerraformModulesOutput
- type GetTerraformProviderInput
- type GetTerraformProviderPlatformInput
- type GetTerraformProviderVersionInput
- type GetVCSProviderInput
- type GetWorkspaceInput
- type GetWorkspaceVCSProviderLinkInput
- type GetWorkspacesInput
- type GetWorkspacesOutput
- type Group
- type GroupFilter
- type GroupSortableField
- type Job
- type JobCancellationEventSubscriptionInput
- type JobType
- type ManagedIdentity
- type ManagedIdentityAccessRule
- type ManagedIdentityAccessRuleInput
- type ManagedIdentityAccessRuleModuleAttestationPolicy
- type ManagedIdentityAccessRuleType
- type ManagedIdentityType
- type NamespaceVariable
- type OIDCTrustPolicy
- type PageInfo
- type PaginationOptions
- type Plan
- type PlanStatus
- type ResourceMetadata
- type Run
- type RunFilter
- type RunSortableField
- type RunStatus
- type RunSubscriptionInput
- type RunVariable
- type SaveJobLogsInput
- type ServiceAccount
- type ServiceAccountCreateTokenInput
- type ServiceAccountCreateTokenResponse
- type SetNamespaceVariablesInput
- type SetNamespaceVariablesVariable
- type StateVersion
- type StateVersionOutput
- type Team
- type TerraformModule
- type TerraformModuleAttestation
- type TerraformModuleAttestationFilter
- type TerraformModuleAttestationSortableField
- type TerraformModuleFilter
- type TerraformModuleSortableField
- type TerraformModuleVersion
- type TerraformModuleVersionSortableField
- type TerraformProvider
- type TerraformProviderPlatform
- type TerraformProviderVersion
- type UpdateApplyInput
- type UpdateGroupInput
- type UpdateManagedIdentityAccessRuleInput
- type UpdateManagedIdentityInput
- type UpdateNamespaceVariableInput
- type UpdatePlanInput
- type UpdateServiceAccountInput
- type UpdateTerraformModuleAttestationInput
- type UpdateTerraformModuleInput
- type UpdateTerraformProviderInput
- type UpdateVCSProviderInput
- type UpdateWorkspaceInput
- type UpdateWorkspaceVCSProviderLinkInput
- type UploadConfigurationVersionInput
- type User
- type VCSProvider
- type VCSProviderType
- type VariableCategory
- type Workspace
- type WorkspaceFilter
- type WorkspaceSortableField
- type WorkspaceVCSProviderLink
Constants ¶
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 Apply ¶
type Apply struct { Metadata ResourceMetadata CurrentJobID *string Status ApplyStatus }
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 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 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"` 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 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"` WorkspacePath string `json:"workspacePath"` Variables []RunVariable `json:"variables"` IsDestroy bool `json:"isDestroy"` }
CreateRunInput is the input for creating a new run.
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 ¶
CreateStateVersionInput is the input for creating a state version.
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 CreateVCSProviderInput ¶ added in v0.15.0
type CreateVCSProviderInput struct { Name string `json:"name"` Description string `json:"description"` GroupPath string `json:"groupPath"` Hostname *string `json:"hostname"` 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 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
DeleteManagedIdentityAliasInput is the input for deleting a managed identity alias.
type DeleteManagedIdentityInput ¶
DeleteManagedIdentityInput is the input for deleting a managed identity.
type DeleteNamespaceVariableInput ¶ added in v0.6.0
type DeleteNamespaceVariableInput struct {
ID string `json:"id"`
}
DeleteNamespaceVariableInput is the input for deleting a namespace variable.
type DeleteServiceAccountInput ¶ added in v0.6.0
type DeleteServiceAccountInput struct {
ID string `json:"id"`
}
DeleteServiceAccountInput is the input for deleting a service account.
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 DeleteVCSProviderInput ¶ added in v0.15.0
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
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 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 }
GPGKey holds (most) information about a Tharsis GPG key.
type GetAssignedManagedIdentitiesInput ¶ added in v0.2.0
type GetAssignedManagedIdentitiesInput struct {
Path 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 ¶
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 ¶
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 { ID string `json:"id"` StartOffset int `json:"startOffset"` Limit int `json:"limit"` }
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"`
}
GetManagedIdentityInput is the input for retrieving a managed identity and/or its access rules.
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 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 ¶
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 {
WorkspacePath string
}
GetStateVersionInput is the input for retrieving a State Version for a workspace.
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
GetTerraformModuleInput is the input to specify a single module to fetch.
type GetTerraformModuleVersionInput ¶ added in v0.5.0
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 GetTerraformProviderVersionInput ¶
type GetTerraformProviderVersionInput struct {
ID string
}
GetTerraformProviderVersionInput is the input to specify a single provider version to fetch.
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 ¶
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 ¶
GetWorkspacesOutput is the output when listing groups
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 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 ManagedIdentity ¶
type ManagedIdentity struct { // ID resides in the metadata Metadata ResourceMetadata Type ManagedIdentityType AliasSourceID *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 }
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"` 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 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 ¶
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 ¶
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 }
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 Plan *Plan Apply *Apply ForceCancelAvailableAt *time.Time Metadata ResourceMetadata WorkspaceID string WorkspacePath string Status RunStatus CreatedBy string TerraformVersion string IsDestroy bool ForceCanceled 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 RunSortableField ¶
type RunSortableField string
RunSortableField represents the fields that a workspace can be sorted by
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 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 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 TerraformModule ¶ added in v0.5.0
type TerraformModule struct { Metadata ResourceMetadata Name string System 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 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 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 UpdateApplyInput ¶
type UpdateApplyInput struct { ID string `json:"id"` Status ApplyStatus `json:"status"` }
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.
type UpdateManagedIdentityAccessRuleInput ¶ added in v0.4.0
type UpdateManagedIdentityAccessRuleInput struct { ID string `json:"id"` ModuleAttestationPolicies []ManagedIdentityAccessRuleModuleAttestationPolicy `json:"moduleAttestationPolicies"` RunStage JobType `json:"runStage"` 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 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"` ResourceAdditions int `json:"resourceAdditions"` ResourceChanges int `json:"resourceChanges"` ResourceDestructions int `json:"resourceDestructions"` }
UpdatePlanInput is the input for updating a plan
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 { Name *string `json:"name"` System *string `json:"system"` 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"` Name string `json:"name"` 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.
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 User ¶
type User struct { Username string Email string SCIMExternalID string Metadata ResourceMetadata Admin bool Active bool }
User represents a Tharsis user.
type VCSProvider ¶ added in v0.15.0
type VCSProvider struct { // ID resides in the metadata Metadata ResourceMetadata CreatedBy string Name string Description string Hostname 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 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 ¶ added in v0.15.0
type WorkspaceVCSProviderLink struct { // ID resides in the metadata Metadata ResourceMetadata CreatedBy string WorkspaceID 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.
Source Files
¶
- apply.go
- cli.go
- configuration_version.go
- gpgkey.go
- group.go
- job.go
- managedidentity.go
- metadata.go
- pagination.go
- plan.go
- run.go
- serviceaccount.go
- state_version.go
- team.go
- terraform_module.go
- terraform_module_attestation.go
- terraform_module_version.go
- terraform_provider.go
- terraform_provider_platform.go
- terraform_provider_version.go
- types.go
- user.go
- variable.go
- vcs_provider.go
- workspace.go
- workspace_vcs_provider_link.go