Documentation
¶
Index ¶
- func CancelRun(c *client.TfxClient, runID string) error
- func CreateConfigurationVersion(c *client.TfxClient, orgName, workspaceName, directory string, ...) (*tfe.ConfigurationVersion, error)
- func CreateGPGKey(c *client.TfxClient, registryName tfe.RegistryName, namespace string, ...) (*tfe.GPGKey, error)
- func CreateOfficialTerraformVersion(c *client.TfxClient, version string, enabled bool, beta bool) (*tfe.AdminTerraformVersion, error)
- func CreateRegistryModule(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)
- func CreateRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version, directory string) (*tfe.RegistryModuleVersion, error)
- func CreateRegistryProvider(c *client.TfxClient, orgName, name string) (*tfe.RegistryProvider, error)
- func CreateRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch, shasum, filename string) (*tfe.RegistryProviderPlatform, error)
- func CreateRegistryProviderVersion(c *client.TfxClient, orgName, name, version, keyID string) (*tfe.RegistryProviderVersion, error)
- func CreateRun(c *client.TfxClient, ...) (*tfe.Run, error)
- func CreateStateVersionFromFile(c *client.TfxClient, orgName, workspaceName, filename string) (*tfe.StateVersion, error)
- func CreateTerraformVersion(c *client.TfxClient, version string, url string, sha string, official bool, ...) (*tfe.AdminTerraformVersion, error)
- func CreateVariable(c *client.TfxClient, workspaceID string, opts tfe.VariableCreateOptions) (*tfe.Variable, error)
- func CreateVariableSet(c *client.TfxClient, orgName, name, description string, global, priority bool) (*tfe.VariableSet, error)
- func DeleteGPGKey(c *client.TfxClient, namespace string, registryName tfe.RegistryName, ...) error
- func DeleteRegistryModule(c *client.TfxClient, orgName, name, provider string) error
- func DeleteRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version string) error
- func DeleteRegistryProvider(c *client.TfxClient, orgName, name string) error
- func DeleteRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch string) error
- func DeleteRegistryProviderVersion(c *client.TfxClient, orgName, name, version string) error
- func DeleteTerraformVersion(c *client.TfxClient, version string) error
- func DeleteVariable(c *client.TfxClient, workspaceID string, variableID string) error
- func DeleteVariableSet(c *client.TfxClient, variableSetID string) error
- func DiscardRun(c *client.TfxClient, runID string) error
- func DownloadConfigurationVersion(c *client.TfxClient, configurationID string) ([]byte, error)
- func DownloadRegistryModuleVersion(c *client.TfxClient, orgName, name, provider, version, directory string) (string, error)
- func DownloadStateVersion(c *client.TfxClient, stateID string) ([]byte, error)
- func DownloadTextFile(downloadURL string) (string, error)
- func FetchConfigurationVersion(c *client.TfxClient, configurationID string) (*tfe.ConfigurationVersion, error)
- func FetchConfigurationVersions(c *client.TfxClient, orgName, workspaceName string, maxItems int) ([]*tfe.ConfigurationVersion, error)
- func FetchGPGKey(c *client.TfxClient, namespace string, registryName tfe.RegistryName, ...) (*tfe.GPGKey, error)
- func FetchGPGKeys(c *client.TfxClient, namespace string) ([]*tfe.GPGKey, error)
- func FetchOrganization(c *client.TfxClient, orgName string, options *tfe.OrganizationReadOptions) (*tfe.Organization, error)
- func FetchOrganizations(c *client.TfxClient, searchString string) ([]*tfe.Organization, error)
- func FetchOrganizationsWithOptions(c *client.TfxClient, options *OrganizationListOptions) ([]*tfe.Organization, error)
- func FetchPlan(c *client.TfxClient, planID string) (*tfe.Plan, error)
- func FetchPlanJSONOutput(c *client.TfxClient, planID string) ([]byte, error)
- func FetchPlanLogs(c *client.TfxClient, planID string) ([]string, error)
- func FetchProject(c *client.TfxClient, projectID string) (*tfe.Project, error)
- func FetchProjectByName(c *client.TfxClient, orgName string, projectName string) (*tfe.Project, error)
- func FetchProjects(c *client.TfxClient, orgName string, searchString string) ([]*tfe.Project, error)
- func FetchProjectsAcrossOrgs(c *client.TfxClient, searchString string) ([]*tfe.Project, error)
- func FetchProjectsWithOrgScope(c *client.TfxClient, orgName string, options *ProjectListOptions) ([]*tfe.Project, error)
- func FetchRun(c *client.TfxClient, runID string) (*tfe.Run, error)
- func FetchRunsForWorkspace(c *client.TfxClient, workspaceID string, maxItems int) ([]*tfe.Run, error)
- func FetchStateVersion(c *client.TfxClient, stateID string) (*tfe.StateVersion, error)
- func FetchStateVersions(c *client.TfxClient, orgName, workspaceName string, maxItems int) ([]*tfe.StateVersion, error)
- func FetchTerraformVersion(c *client.TfxClient, version string) (*tfe.AdminTerraformVersion, error)
- func FetchTerraformVersions(c *client.TfxClient, filter string, search string) ([]*tfe.AdminTerraformVersion, error)
- func FetchVariable(c *client.TfxClient, workspaceID string, key string) (*tfe.Variable, error)
- func FetchVariables(c *client.TfxClient, workspaceID string) ([]*tfe.Variable, error)
- func FetchWorkspace(c *client.TfxClient, orgName string, workspaceName string) (*tfe.Workspace, error)
- func FetchWorkspaceMetrics(c *client.TfxClient, orgName string, runSinceTime time.Time) ([]view.MetricsWorkspace, error)
- func FetchWorkspaceRemoteStateConsumers(c *client.TfxClient, workspaceID string) ([]*tfe.Workspace, error)
- func FetchWorkspaceTeamAccess(c *client.TfxClient, workspaceID string, maxItems int) ([]*tfe.TeamAccess, error)
- func FetchWorkspaces(c *client.TfxClient, orgName string, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)
- func FetchWorkspacesAcrossOrgs(c *client.TfxClient, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)
- func FetchWorkspacesWithOrgScope(c *client.TfxClient, orgName string, options *flags.WorkspaceListFlags) ([]*tfe.Workspace, error)
- func GetLatestRunID(c *client.TfxClient, workspaceID string) (string, error)
- func GetTeamAccessNames(c *client.TfxClient, teamAccess []*tfe.TeamAccess) ([]interface{}, error)
- func GetVariableID(c *client.TfxClient, workspaceID string, key string) (string, error)
- func GetWorkspaceID(c *client.TfxClient, orgName string, workspaceName string) (string, error)
- func ListRegistryModuleVersions(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)
- func ListRegistryModules(c *client.TfxClient, orgName string, maxItems int) ([]*tfe.RegistryModule, error)
- func ListRegistryProviderPlatforms(c *client.TfxClient, orgName, name, version string) ([]*tfe.RegistryProviderPlatform, error)
- func ListRegistryProviderVersions(c *client.TfxClient, orgName, name string) ([]*tfe.RegistryProviderVersion, error)
- func ListRegistryProviders(c *client.TfxClient, orgName string, maxItems int) ([]*tfe.RegistryProvider, error)
- func ListVariableSets(c *client.TfxClient, orgName string, search string) ([]*tfe.VariableSet, error)
- func ReadRegistryModule(c *client.TfxClient, orgName, name, provider string) (*tfe.RegistryModule, error)
- func ReadRegistryProvider(c *client.TfxClient, orgName, name string) (*tfe.RegistryProvider, error)
- func ReadRegistryProviderPlatform(c *client.TfxClient, orgName, name, version, os, arch string) (*tfe.RegistryProviderPlatform, error)
- func ReadRegistryProviderVersion(c *client.TfxClient, orgName, name, version string) (*tfe.RegistryProviderVersion, error)
- func ReadVariableSet(c *client.TfxClient, variableSetID string) (*tfe.VariableSet, error)
- func SetWorkspaceLock(c *client.TfxClient, orgName, workspaceName string, lockSet bool) (string, error)
- func UpdateTerraformVersions(c *client.TfxClient, versions []string, enabled bool) (map[string]string, error)
- func UpdateVariable(c *client.TfxClient, workspaceID string, variableID string, ...) (*tfe.Variable, error)
- func UploadBinary(uploadURL string, path string) error
- func ValidateRunStatus(s string) bool
- type OrganizationListOptions
- type ProjectListOptions
- type StateFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 ¶
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 ¶
DeleteRegistryProviderVersion deletes a provider version
func DeleteTerraformVersion ¶
DeleteTerraformVersion deletes a Terraform version
func DeleteVariable ¶
DeleteVariable deletes a variable from a workspace
func DeleteVariableSet ¶ added in v0.2.1
DeleteVariableSet deletes a variable set by ID.
func DiscardRun ¶
DiscardRun discards a run by ID
func DownloadConfigurationVersion ¶
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 ¶
DownloadStateVersion downloads the state version bytes
func DownloadTextFile ¶
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 ¶
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 ¶
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 FetchPlanJSONOutput ¶
FetchPlanJSONOutput retrieves the JSON output for a plan by ID
func FetchPlanLogs ¶
FetchPlanLogs retrieves logs for a plan by ID
func FetchProject ¶
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 ¶
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 FetchRunsForWorkspace ¶
func FetchRunsForWorkspace(c *client.TfxClient, workspaceID string, maxItems int) ([]*tfe.Run, error)
FetchRunsForWorkspace lists runs for a workspace limited by maxItems
func FetchStateVersion ¶
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 ¶
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 ¶
FetchVariable fetches a single variable by key in the specified workspace
func FetchVariables ¶
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 ¶
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 ¶
GetVariableID retrieves the variable ID from a workspace by variable key
func GetWorkspaceID ¶
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 ¶
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
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 ¶
UploadBinary performs a PUT of the file at path to the given pre-signed URL
func ValidateRunStatus ¶
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 ¶
ProjectListOptions holds options for listing projects