types

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MPL-2.0 Imports: 2 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 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 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 {
	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

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

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 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 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 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 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 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 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 DownloadStateVersionInput

type DownloadStateVersionInput struct {
	ID string
}

DownloadStateVersionInput is the input for downloading a state version.

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 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 {
	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

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 {
	WorkspacePath string
}

GetStateVersionInput is the input for retrieving a State Version for a workspace.

type GetTerraformModuleInput added in v0.5.0

type GetTerraformModuleInput struct {
	ID string
}

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

type GetTerraformModuleVersionInput added in v0.5.0

type GetTerraformModuleVersionInput struct {
	ID string
}

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

type GetTerraformProviderInput

type GetTerraformProviderInput struct {
	ID string
}

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 GetWorkspaceInput

type GetWorkspaceInput struct {
	Path *string
	ID   *string
}

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

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 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 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
	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
}

ManagedIdentityAccessRule represents an access rule for a managed identity.

type ManagedIdentityAccessRuleInput

type ManagedIdentityAccessRuleInput struct {
	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 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

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
}

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 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 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 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 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"`
	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 UpdateTerraformModuleInput added in v0.5.0

type UpdateTerraformModuleInput struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	System        string `json:"system"`
	RepositoryURL string `json:"repositoryUrl"`
	Private       bool   `json:"private"`
}

UpdateTerraformModuleInput is the input for updating a module.

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 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 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

Jump to

Keyboard shortcuts

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