data

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelRun

func CancelRun(c *client.TfxClient, runID string) error

CancelRun cancels a run by ID

func CreateConfigurationVersion

func CreateConfigurationVersion(c *client.TfxClient, orgName, workspaceName, directory string, speculative bool) (*tfe.ConfigurationVersion, error)

CreateConfigurationVersion creates a new configuration version in a workspace and uploads code from a directory

func CreateGPGKey

func CreateGPGKey(c *client.TfxClient, registryName tfe.RegistryName, namespace string, publicKeyPath string) (*tfe.GPGKey, error)

CreateGPGKey creates a new GPG key

func CreateOfficialTerraformVersion

func CreateOfficialTerraformVersion(c *client.TfxClient, version string, enabled bool, beta bool) (*tfe.AdminTerraformVersion, error)

CreateOfficialTerraformVersion creates a Terraform version from the official HashiCorp releases

func CreateRegistryModule

func CreateRegistryModule(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)

CreateRegistryModule creates a new module in the private registry

func CreateRegistryModuleVersion

func CreateRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version, directory string) (*tfe.RegistryModuleVersion, error)

CreateRegistryModuleVersion creates a new module version and uploads the directory

func CreateRegistryProvider

func CreateRegistryProvider(c *client.TfxClient, orgName, name string) (*tfe.RegistryProvider, error)

CreateRegistryProvider creates a new provider in the private registry

func CreateRegistryProviderPlatform

func CreateRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch, shasum, filename string) (*tfe.RegistryProviderPlatform, error)

CreateRegistryProviderPlatform creates a provider platform record

func CreateRegistryProviderVersion

func CreateRegistryProviderVersion(c *client.TfxClient, orgName, name, version, keyID string) (*tfe.RegistryProviderVersion, error)

CreateRegistryProviderVersion creates a provider version

func CreateRun

func CreateRun(c *client.TfxClient, orgName, workspaceName, message, configurationVersionID string) (*tfe.Run, error)

CreateRun creates a run for a workspace, optionally using a specific configuration version

func CreateStateVersionFromFile

func CreateStateVersionFromFile(c *client.TfxClient, orgName, workspaceName, filename string) (*tfe.StateVersion, error)

CreateStateVersionFromFile reads a state file and creates a new state version

func CreateTerraformVersion

func CreateTerraformVersion(c *client.TfxClient, version string, url string, sha string, official bool, enabled bool, beta bool) (*tfe.AdminTerraformVersion, error)

CreateTerraformVersion creates a new Terraform version

func CreateVariable

func CreateVariable(c *client.TfxClient, workspaceID string, opts tfe.VariableCreateOptions) (*tfe.Variable, error)

CreateVariable creates a new variable in a workspace

func CreateVariableSet added in v0.2.1

func CreateVariableSet(c *client.TfxClient, orgName, name, description string, global, priority bool) (*tfe.VariableSet, error)

CreateVariableSet creates a new variable set in the given organization.

func DeleteGPGKey

func DeleteGPGKey(c *client.TfxClient, namespace string, registryName tfe.RegistryName, keyID string) error

DeleteGPGKey deletes a GPG key

func DeleteRegistryModule

func DeleteRegistryModule(c *client.TfxClient, orgName, name, provider string) error

DeleteRegistryModule deletes a module by name and provider

func DeleteRegistryModuleVersion

func DeleteRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version string) error

DeleteRegistryModuleVersion deletes a module version

func DeleteRegistryProvider

func DeleteRegistryProvider(c *client.TfxClient, orgName, name string) error

DeleteRegistryProvider deletes a provider

func DeleteRegistryProviderPlatform

func DeleteRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch string) error

DeleteRegistryProviderPlatform deletes a provider platform

func DeleteRegistryProviderVersion

func DeleteRegistryProviderVersion(c *client.TfxClient, orgName, name, version string) error

DeleteRegistryProviderVersion deletes a provider version

func DeleteTerraformVersion

func DeleteTerraformVersion(c *client.TfxClient, version string) error

DeleteTerraformVersion deletes a Terraform version

func DeleteVariable

func DeleteVariable(c *client.TfxClient, workspaceID string, variableID string) error

DeleteVariable deletes a variable from a workspace

func DeleteVariableSet added in v0.2.1

func DeleteVariableSet(c *client.TfxClient, variableSetID string) error

DeleteVariableSet deletes a variable set by ID.

func DiscardRun

func DiscardRun(c *client.TfxClient, runID string) error

DiscardRun discards a run by ID

func DownloadConfigurationVersion

func DownloadConfigurationVersion(c *client.TfxClient, configurationID string) ([]byte, error)

DownloadConfigurationVersion downloads the configuration version slug bytes

func DownloadRegistryModuleVersion

func DownloadRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version, directory string) (string, error)

DownloadRegistryModuleVersion downloads a module version and unpacks it to directory

func DownloadStateVersion

func DownloadStateVersion(c *client.TfxClient, stateID string) ([]byte, error)

DownloadStateVersion downloads the state version bytes

func DownloadTextFile

func DownloadTextFile(downloadURL string) (string, error)

DownloadTextFile fetches the content at downloadURL and returns it as a string

func FetchConfigurationVersion

func FetchConfigurationVersion(c *client.TfxClient, configurationID string) (*tfe.ConfigurationVersion, error)

FetchConfigurationVersion reads a configuration version with includes

func FetchConfigurationVersions

func FetchConfigurationVersions(c *client.TfxClient, orgName, workspaceName string, maxItems int) ([]*tfe.ConfigurationVersion, error)

FetchConfigurationVersions lists configuration versions for a workspace name with max-items

func FetchGPGKey

func FetchGPGKey(c *client.TfxClient, namespace string, registryName tfe.RegistryName, keyID string) (*tfe.GPGKey, error)

FetchGPGKey fetches a single GPG key by ID

func FetchGPGKeys

func FetchGPGKeys(c *client.TfxClient, namespace string) ([]*tfe.GPGKey, error)

FetchGPGKeys fetches all GPG keys for a given registry namespace Note: Currently only supports private registry

func FetchOrganization

func FetchOrganization(c *client.TfxClient, orgName string, options *tfe.OrganizationReadOptions) (*tfe.Organization, error)

FetchOrganization fetches a single organization by name

func FetchOrganizations

func FetchOrganizations(c *client.TfxClient, searchString string) ([]*tfe.Organization, error)

FetchOrganizations fetches all organizations using pagination with optional search Deprecated: Use FetchOrganizationsWithOptions instead

func FetchOrganizationsWithOptions

func FetchOrganizationsWithOptions(c *client.TfxClient, options *OrganizationListOptions) ([]*tfe.Organization, error)

FetchOrganizationsWithOptions fetches all organizations using pagination with options

func FetchPlan

func FetchPlan(c *client.TfxClient, planID string) (*tfe.Plan, error)

FetchPlan retrieves a plan by ID

func FetchPlanJSONOutput

func FetchPlanJSONOutput(c *client.TfxClient, planID string) ([]byte, error)

FetchPlanJSONOutput retrieves the JSON output for a plan by ID

func FetchPlanLogs

func FetchPlanLogs(c *client.TfxClient, planID string) ([]string, error)

FetchPlanLogs retrieves logs for a plan by ID

func FetchProject

func FetchProject(c *client.TfxClient, projectID string) (*tfe.Project, error)

FetchProject fetches a single project by ID

func FetchProjectByName

func FetchProjectByName(c *client.TfxClient, orgName string, projectName string) (*tfe.Project, error)

FetchProjectByName fetches a single project by name in the specified organization

func FetchProjects

func FetchProjects(c *client.TfxClient, orgName string, searchString string) ([]*tfe.Project, error)

FetchProjects fetches all projects for a given organization using pagination

func FetchProjectsAcrossOrgs

func FetchProjectsAcrossOrgs(c *client.TfxClient, searchString string) ([]*tfe.Project, error)

FetchProjectsAcrossOrgs fetches projects across all organizations Deprecated: Use FetchProjectsWithOrgScope instead

func FetchProjectsWithOrgScope

func FetchProjectsWithOrgScope(c *client.TfxClient, orgName string, options *ProjectListOptions) ([]*tfe.Project, error)

FetchProjectsWithOrgScope fetches projects for either a single organization or across all organizations If allOrgs is true, it will fetch across all organizations. Otherwise it will fetch for the specified orgName.

func FetchRun

func FetchRun(c *client.TfxClient, runID string) (*tfe.Run, error)

FetchRun retrieves a run by ID with optional includes

func FetchRunsForWorkspace

func FetchRunsForWorkspace(c *client.TfxClient, workspaceID string, maxItems int) ([]*tfe.Run, error)

FetchRunsForWorkspace lists runs for a workspace limited by maxItems

func FetchStateVersion

func FetchStateVersion(c *client.TfxClient, stateID string) (*tfe.StateVersion, error)

FetchStateVersion reads a state version with includes

func FetchStateVersions

func FetchStateVersions(c *client.TfxClient, orgName, workspaceName string, maxItems int) ([]*tfe.StateVersion, error)

FetchStateVersions lists state versions for a workspace name with max-items

func FetchTerraformVersion

func FetchTerraformVersion(c *client.TfxClient, version string) (*tfe.AdminTerraformVersion, error)

FetchTerraformVersion fetches a single Terraform version by version string Uses filter which returns exact match

func FetchTerraformVersions

func FetchTerraformVersions(c *client.TfxClient, filter string, search string) ([]*tfe.AdminTerraformVersion, error)

FetchTerraformVersions fetches all Terraform versions with optional filtering

func FetchVariable

func FetchVariable(c *client.TfxClient, workspaceID string, key string) (*tfe.Variable, error)

FetchVariable fetches a single variable by key in the specified workspace

func FetchVariables

func FetchVariables(c *client.TfxClient, workspaceID string) ([]*tfe.Variable, error)

FetchVariables fetches all variables for a given workspace using pagination

func FetchWorkspace

func FetchWorkspace(c *client.TfxClient, orgName string, workspaceName string) (*tfe.Workspace, error)

FetchWorkspace fetches a single workspace by name in the specified organization

func FetchWorkspaceMetrics

func FetchWorkspaceMetrics(c *client.TfxClient, orgName string, runSinceTime time.Time) ([]view.MetricsWorkspace, error)

FetchWorkspaceMetrics fetches metrics for all workspaces in an organization since a given time

func FetchWorkspaceRemoteStateConsumers

func FetchWorkspaceRemoteStateConsumers(c *client.TfxClient, workspaceID string) ([]*tfe.Workspace, error)

FetchWorkspaceRemoteStateConsumers fetches all remote state consumers for a workspace

func FetchWorkspaceTeamAccess

func FetchWorkspaceTeamAccess(c *client.TfxClient, workspaceID string, maxItems int) ([]*tfe.TeamAccess, error)

FetchWorkspaceTeamAccess fetches all team access for a workspace

func FetchWorkspaces

func FetchWorkspaces(c *client.TfxClient, orgName string, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)

FetchWorkspaces fetches all workspaces for a given organization using pagination

func FetchWorkspacesAcrossOrgs

func FetchWorkspacesAcrossOrgs(c *client.TfxClient, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)

FetchWorkspacesAcrossOrgs fetches workspaces across all organizations Deprecated: Use FetchWorkspacesWithOrgScope instead

func FetchWorkspacesWithOrgScope

func FetchWorkspacesWithOrgScope(c *client.TfxClient, orgName string, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)

FetchWorkspacesWithOrgScope fetches workspaces for either a single organization or across all organizations If allOrgs is true, it will fetch across all organizations. Otherwise it will fetch for the specified orgName.

func GetLatestRunID

func GetLatestRunID(c *client.TfxClient, workspaceID string) (string, error)

GetLatestRunID returns the most recent run ID for a workspace

func GetTeamAccessNames

func GetTeamAccessNames(c *client.TfxClient, teamAccess []*tfe.TeamAccess) ([]interface{}, error)

GetTeamAccessNames retrieves team names from team access objects

func GetVariableID

func GetVariableID(c *client.TfxClient, workspaceID string, key string) (string, error)

GetVariableID retrieves the variable ID from a workspace by variable key

func GetWorkspaceID

func GetWorkspaceID(c *client.TfxClient, orgName string, workspaceName string) (string, error)

GetWorkspaceID retrieves the workspace ID from organization and workspace name

func ListRegistryModuleVersions

func ListRegistryModuleVersions(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)

ListRegistryModuleVersions returns the module and its VersionStatuses

func ListRegistryModules

func ListRegistryModules(c *client.TfxClient, orgName string, maxItems int) ([]*tfe.RegistryModule, error)

ListRegistryModules lists modules in the private registry for an organization, up to maxItems

func ListRegistryProviderPlatforms

func ListRegistryProviderPlatforms(c *client.TfxClient, orgName, name, version string) ([]*tfe.RegistryProviderPlatform, error)

ListRegistryProviderPlatforms lists platforms for a provider version

func ListRegistryProviderVersions

func ListRegistryProviderVersions(c *client.TfxClient, orgName, name string) ([]*tfe.RegistryProviderVersion, error)

ListRegistryProviderVersions lists versions for a provider

func ListRegistryProviders

func ListRegistryProviders(c *client.TfxClient, orgName string, maxItems int) ([]*tfe.RegistryProvider, error)

ListRegistryProviders lists providers in the private registry for an organization, up to maxItems

func ListVariableSets added in v0.2.1

func ListVariableSets(c *client.TfxClient, orgName string, search string) ([]*tfe.VariableSet, error)

ListVariableSets lists all variable sets for an organization.

func ReadRegistryModule

func ReadRegistryModule(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)

ReadRegistryModule reads a module by name and provider

func ReadRegistryProvider

func ReadRegistryProvider(c *client.TfxClient, orgName, name string) (*tfe.RegistryProvider, error)

ReadRegistryProvider reads a provider

func ReadRegistryProviderPlatform

func ReadRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch string) (*tfe.RegistryProviderPlatform, error)

ReadRegistryProviderPlatform reads a provider platform

func ReadRegistryProviderVersion

func ReadRegistryProviderVersion(c *client.TfxClient, orgName, name, version string) (*tfe.RegistryProviderVersion, error)

ReadRegistryProviderVersion reads a provider version

func ReadVariableSet added in v0.2.1

func ReadVariableSet(c *client.TfxClient, variableSetID string) (*tfe.VariableSet, error)

ReadVariableSet reads a single variable set by ID, including its workspaces, projects, and variables.

func SetWorkspaceLock

func SetWorkspaceLock(c *client.TfxClient, orgName, workspaceName string, lockSet bool) (string, error)

SetWorkspaceLock locks or unlocks the workspace by name

func UpdateTerraformVersions

func UpdateTerraformVersions(c *client.TfxClient, versions []string, enabled bool) (map[string]string, error)

UpdateTerraformVersions enables or disables multiple Terraform versions

func UpdateVariable

func UpdateVariable(c *client.TfxClient, workspaceID string, variableID string, opts tfe.VariableUpdateOptions) (*tfe.Variable, error)

UpdateVariable updates an existing variable in a workspace

func UploadBinary

func UploadBinary(uploadURL string, path string) error

UploadBinary performs a PUT of the file at path to the given pre-signed URL

func ValidateRunStatus

func ValidateRunStatus(s string) bool

ValidateRunStatus validates if the given run status is valid

Types

type OrganizationListOptions

type OrganizationListOptions struct {
	Search string
}

OrganizationListOptions holds options for listing organizations

type ProjectListOptions

type ProjectListOptions struct {
	Search string
	All    bool
}

ProjectListOptions holds options for listing projects

type StateFile

type StateFile struct {
	Version          int64  `json:"version"`
	TerraformVersion string `json:"terraform_version"`
	Serial           int64  `json:"serial"`
	Lineage          string `json:"lineage"`
}

StateFile mirrors key metadata from state for creation

Jump to

Keyboard shortcuts

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