tfe

package module
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MPL-2.0 Imports: 25 Imported by: 225

README

Terraform Cloud/Enterprise Go Client

Build Status GitHub license GoDoc Go Report Card GitHub issues

The official Go API client for Terraform Cloud/Enterprise.

This client supports the Terraform Cloud V2 API. As Terraform Enterprise is a self-hosted distribution of Terraform Cloud, this client supports both Cloud and Enterprise use cases. In all package documentation and API, the platform will always be stated as 'Terraform Enterprise' - but a feature will be explicitly noted as only supported in one or the other, if applicable (rare).

Note this client is in beta and is subject to change (though it is generally quite stable). We will indicate any breaking changes by releasing new versions. Until the release of v1.0, any minor version changes will indicate possible breaking changes. Patch version changes will be used for both bugfixes and non-breaking changes.

Installation

Installation can be done with a normal go get:

go get -u github.com/hashicorp/go-tfe

Usage

import tfe "github.com/hashicorp/go-tfe"

Construct a new TFE client, then use the various endpoints on the client to access different parts of the Terraform Enterprise API. For example, to list all organizations:

config := &tfe.Config{
	Token: "insert-your-token-here",
}

client, err := tfe.NewClient(config)
if err != nil {
	log.Fatal(err)
}

orgs, err := client.Organizations.List(context.Background(), tfe.OrganizationListOptions{})
if err != nil {
	log.Fatal(err)
}

Documentation

For complete usage of the API client, see the full package docs.

Examples

See the examples directory.

Running tests

See TESTS.md.

Issues and Contributing

If you find an issue with this package, please report an issue. If you'd like, we welcome any contributions. Fork this repository and submit a pull request.

Releases

Documentation updates and test fixes that only touch test files don't require a release or tag. You can just merge these changes into main once they have been approved.

Creating a release
  1. Create a new release in GitHub by clicking on "Releases" and then "Draft a new release"

  2. Set the Tag version to a new tag, using Semantic Versioning as a guideline.

  3. Set the Target as main.

  4. Set the Release title to the tag you created, vX.Y.Z

  5. Use the description section to describe why you're releasing and what changes you've made. You should include links to merged PRs. Use the following headers in the description of your release:

    • BREAKING CHANGES: Use this for any changes that aren't backwards compatible. Include details on how to handle these changes.
    • FEATURES: Use this for any large new features added,
    • ENHANCEMENTS: Use this for smaller new features added
    • BUG FIXES: Use this for any bugs that were fixed.
    • NOTES: Use this section if you need to include any additional notes on things like upgrading, upcoming deprecations, or any other information you might want to highlight.

    Markdown example:

    ENHANCEMENTS
    * Add description of new small feature (#3)[link-to-pull-request]
    
    BUG FIXES
    * Fix description of a bug (#2)[link-to-pull-request]
    * Fix description of another bug (#1)[link-to-pull-request]
    
  6. Don't attach any binaries. The zip and tar.gz assets are automatically created and attached after you publish your release.

  7. Click "Publish release" to save and publish your release.

Documentation

Overview

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Package tfe is a generated GoMock package.

Index

Constants

View Source
const (
	NotificationTriggerCreated        string = "run:created"
	NotificationTriggerPlanning       string = "run:planning"
	NotificationTriggerNeedsAttention string = "run:needs_attention"
	NotificationTriggerApplying       string = "run:applying"
	NotificationTriggerCompleted      string = "run:completed"
	NotificationTriggerErrored        string = "run:errored"
)

List of available notification triggers.

View Source
const (
	OrganizationMembershipActive  = "active"
	OrganizationMembershipInvited = "invited"
)

List all available organization membership statuses.

View Source
const (
	AccessAdmin  AccessType = "admin"
	AccessPlan   AccessType = "plan"
	AccessRead   AccessType = "read"
	AccessWrite  AccessType = "write"
	AccessCustom AccessType = "custom"

	RunsPermissionRead  RunsPermissionType = "read"
	RunsPermissionPlan  RunsPermissionType = "plan"
	RunsPermissionApply RunsPermissionType = "apply"

	VariablesPermissionNone  VariablesPermissionType = "none"
	VariablesPermissionRead  VariablesPermissionType = "read"
	VariablesPermissionWrite VariablesPermissionType = "write"

	StateVersionsPermissionNone        StateVersionsPermissionType = "none"
	StateVersionsPermissionReadOutputs StateVersionsPermissionType = "read-outputs"
	StateVersionsPermissionRead        StateVersionsPermissionType = "read"
	StateVersionsPermissionWrite       StateVersionsPermissionType = "write"

	SentinelMocksPermissionNone SentinelMocksPermissionType = "none"
	SentinelMocksPermissionRead SentinelMocksPermissionType = "read"
)

List all available team access types and permissions.

View Source
const (

	// DefaultAddress of Terraform Enterprise.
	DefaultAddress = "https://app.terraform.io"
	// DefaultBasePath on which the API is served.
	DefaultBasePath = "/api/v2/"
	// PingEndpoint is a no-op API endpoint used to configure the rate limiter
	PingEndpoint = "ping"
)

Variables

View Source
var (
	// ErrUnauthorized is returned when a receiving a 401.
	ErrUnauthorized = errors.New("unauthorized")

	// ErrResourceNotFound is returned when a receiving a 404.
	ErrResourceNotFound = errors.New("resource not found")

	// ErrRequiredName is returned when a name option is not present.
	ErrRequiredName = errors.New("name is required")

	// ErrInvalidName is returned when the name option has invalid value.
	ErrInvalidName = errors.New("invalid value for name")

	// ErrMissingDirectory is returned when the path does not have an existing directory.
	ErrMissingDirectory = errors.New("path needs to be an existing directory")
)

Generic errors applicable to all resources.

View Source
var (
	// ErrWorkspaceLocked is returned when trying to lock a
	// locked workspace.
	ErrWorkspaceLocked = errors.New("workspace already locked")

	// ErrWorkspaceNotLocked is returned when trying to unlock
	// a unlocked workspace.
	ErrWorkspaceNotLocked = errors.New("workspace already unlocked")

	// ErrInvalidWorkspaceID is returned when the workspace ID is invalid.
	ErrInvalidWorkspaceID = errors.New("invalid value for workspace ID")

	// ErrInvalidWorkspaceValue is returned when workspace value is invalid.
	ErrInvalidWorkspaceValue = errors.New("invalid value for workspace")

	// ErrWorkspacesRequired is returned when the Workspaces are not present.
	ErrWorkspacesRequired = errors.New("workspaces is required")

	// ErrWorkspaceMinLimit is returned when the length of Workspaces is 0.
	ErrWorkspaceMinLimit = errors.New("must provide at least one workspace")

	// ErrMissingTagIdentifier is returned when tag resource identifiers are invalid
	ErrMissingTagIdentifier = errors.New("must specify at least one tag by ID or name")

	// ErrInvalidRunID is returned when the run ID is invalid.
	ErrInvalidRunID = errors.New("invalid value for run ID")

	// ErrInvalidApplyID is returned when the apply ID is invalid.
	ErrInvalidApplyID = errors.New("invalid value for apply ID")

	// ErrInvalidOrg is returned when the organization option has an invalid value.
	ErrInvalidOrg = errors.New("invalid value for organization")

	// ErrInvalidAgentPoolID is returned when the agent pool ID is invalid.
	ErrInvalidAgentPoolID = errors.New("invalid value for agent pool ID")

	// ErrInvalidAgentTokenID is returned when the agent toek ID is invalid.
	ErrInvalidAgentTokenID = errors.New("invalid value for agent token ID")

	// ErrAgentTokenDescription is returned when the description is blank.
	ErrAgentTokenDescription = errors.New("agent token description can't be blank")

	// ErrInvalidConfigVersionID is returned when the configuration version ID is invalid.
	ErrInvalidConfigVersionID = errors.New("invalid value for configuration version ID")

	// ErrInvalidCostEstimateID is returned when the cost estimate ID is invalid.
	ErrInvalidCostEstimateID = errors.New("invalid value for cost estimate ID")

	// ErrInvalidUservalue is invalid.
	ErrInvalidUserValue = errors.New("invalid value for user")

	// ErrInvalidSMTPAuth is returned when the smtp auth type is not valid.
	ErrInvalidSMTPAuth = errors.New("invalid smtp auth type")

	// ErrInvalidTerraformVersionID is returned when the ID for a terraform
	// version is invalid.
	ErrInvalidTerraformVersionID = errors.New("invalid value for terraform version ID")

	// ErrInvalidTerraformVersionType is returned when the type is not valid.
	ErrInvalidTerraformVersionType = errors.New("invalid type for terraform version. Please use 'terraform-version'")
)

Resource Errors

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to the given bool

func Int added in v0.1.2

func Int(v int) *int

Int returns a pointer to the given int.

func Int64

func Int64(v int64) *int64

Int64 returns a pointer to the given int64.

func String

func String(v string) *string

String returns a pointer to the given string.

Types

type AccessType added in v0.1.2

type AccessType string

AccessType represents a team access type.

func Access

func Access(v AccessType) *AccessType

Access returns a pointer to the given team access type.

type Admin added in v0.13.0

type Admin struct {
	Organizations     AdminOrganizations
	Workspaces        AdminWorkspaces
	Runs              AdminRuns
	TerraformVersions AdminTerraformVersions
	Users             AdminUsers
	Settings          *AdminSettings
}

Admin is the the Terraform Enterprise Admin API. It provides access to site wide admin settings. These are only available for Terraform Enterprise and do not function against Terraform Cloud.

type AdminCostEstimationSetting added in v0.13.0

type AdminCostEstimationSetting struct {
	ID                        string `jsonapi:"primary,cost-estimation-settings"`
	Enabled                   bool   `jsonapi:"attr,enabled"`
	AWSAccessKeyID            string `jsonapi:"attr,aws-access-key-id"`
	AWSAccessKey              string `jsonapi:"attr,aws-secret-key"`
	AWSEnabled                bool   `jsonapi:"attr,aws-enabled"`
	AWSInstanceProfileEnabled bool   `jsonapi:"attr,aws-instance-profile-enabled"`
	GCPCredentials            string `jsonapi:"attr,gcp-credentials"`
	GCPEnabled                bool   `jsonapi:"attr,gcp-enabled"`
	AzureEnabled              bool   `jsonapi:"attr,azure-enabled"`
	AzureClientID             string `jsonapi:"attr,azure-client-id"`
	AzureClientSecret         string `jsonapi:"attr,azure-client-secret"`
	AzureSubscriptionID       string `jsonapi:"attr,azure-subscription-id"`
	AzureTenantID             string `jsonapi:"attr,azure-tenant-id"`
}

AdminCostEstimationSetting represents the admin cost estimation settings.

type AdminCostEstimationSettingOptions added in v0.13.0

type AdminCostEstimationSettingOptions struct {
	Enabled             *bool   `jsonapi:"attr,enabled,omitempty"`
	AWSAccessKeyID      *string `jsonapi:"attr,aws-access-key-id,omitempty"`
	AWSAccessKey        *string `jsonapi:"attr,aws-secret-key,omitempty"`
	GCPCredentials      *string `jsonapi:"attr,gcp-credentials,omitempty"`
	AzureClientID       *string `jsonapi:"attr,azure-client-id,omitempty"`
	AzureClientSecret   *string `jsonapi:"attr,azure-client-secret,omitempty"`
	AzureSubscriptionID *string `jsonapi:"attr,azure-subscription-id,omitempty"`
	AzureTenantID       *string `jsonapi:"attr,azure-tenant-id,omitempty"`
}

AdminCostEstimationSettingOptions represents the admin options for updating the cost estimation settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body-1

type AdminCustomizationSetting added in v0.13.0

type AdminCustomizationSetting struct {
	ID           string `jsonapi:"primary,customization-settings"`
	SupportEmail string `jsonapi:"attr,support-email-address"`
	LoginHelp    string `jsonapi:"attr,login-help"`
	Footer       string `jsonapi:"attr,footer"`
	Error        string `jsonapi:"attr,error"`
	NewUser      string `jsonapi:"attr,new-user"`
}

AdminCustomizationSetting represents the Customization settings in Terraform Enterprise.

type AdminCustomizationSettingsUpdateOptions added in v0.13.0

type AdminCustomizationSettingsUpdateOptions struct {
	SupportEmail *string `jsonapi:"attr,support-email-address,omitempty"`
	LoginHelp    *string `jsonapi:"attr,login-help,omitempty"`
	Footer       *string `jsonapi:"attr,footer,omitempty"`
	Error        *string `jsonapi:"attr,error,omitempty"`
	NewUser      *string `jsonapi:"attr,new-user,omitempty"`
}

AdminCustomizationSettingsUpdateOptions represents the admin options for updating Customization settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body-6

type AdminGeneralSetting added in v0.13.0

type AdminGeneralSetting struct {
	ID                               string `jsonapi:"primary,general-settings"`
	LimitUserOrganizationCreation    bool   `jsonapi:"attr,limit-user-organization-creation"`
	APIRateLimitingEnabled           bool   `jsonapi:"attr,api-rate-limiting-enabled"`
	APIRateLimit                     int    `jsonapi:"attr,api-rate-limit"`
	SendPassingStatusesEnabled       bool   `jsonapi:"attr,send-passing-statuses-for-untriggered-speculative-plans"`
	AllowSpeculativePlansOnPR        bool   `jsonapi:"attr,allow-speculative-plans-on-pull-requests-from-forks"`
	RequireTwoFactorForAdmin         bool   `jsonapi:"attr,require-two-factor-for-admins"`
	FairRunQueuingEnabled            bool   `jsonapi:"attr,fair-run-queuing-enabled"`
	LimitOrgsPerUser                 bool   `jsonapi:"attr,limit-organizations-per-user"`
	DefaultOrgsPerUserCeiling        int    `jsonapi:"attr,default-organizations-per-user-ceiling"`
	LimitWorkspacesPerOrg            bool   `jsonapi:"attr,limit-workspaces-per-organization"`
	DefaultWorkspacesPerOrgCeiling   int    `jsonapi:"attr,default-workspaces-per-organization-ceiling"`
	TerraformBuildWorkerApplyTimeout string `jsonapi:"attr,terraform-build-worker-apply-timeout"`
	TerraformBuildWorkerPlanTimeout  string `jsonapi:"attr,terraform-build-worker-plan-timeout"`
	DefaultRemoteStateAccess         bool   `jsonapi:"attr,default-remote-state-access"`
}

AdminGeneralSetting represents a the general settings in Terraform Enterprise.

type AdminGeneralSettingsUpdateOptions added in v0.13.0

type AdminGeneralSettingsUpdateOptions struct {
	LimitUserOrgCreation              *bool `jsonapi:"attr,limit-user-organization-creation,omitempty"`
	APIRateLimitingEnabled            *bool `jsonapi:"attr,api-rate-limiting-enabled,omitempty"`
	APIRateLimit                      *int  `jsonapi:"attr,api-rate-limit,omitempty"`
	SendPassingStatusUntriggeredPlans *bool `jsonapi:"attr,send-passing-statuses-for-untriggered-speculative-plans,omitempty"`
	AllowSpeculativePlansOnPR         *bool `jsonapi:"attr,allow-speculative-plans-on-pull-requests-from-forks,omitempty"`
	DefaultRemoteStateAccess          *bool `jsonapi:"attr,default-remote-state-access,omitempty"`
}

AdminGeneralSettingsUpdateOptions represents the admin options for updating general settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body

type AdminOrganization added in v0.13.0

type AdminOrganization struct {
	Name                             string `jsonapi:"primary,organizations"`
	AccessBetaTools                  bool   `jsonapi:"attr,access-beta-tools"`
	ExternalID                       string `jsonapi:"attr,external-id"`
	IsDisabled                       bool   `jsonapi:"attr,is-disabled"`
	NotificationEmail                string `jsonapi:"attr,notification-email"`
	SsoEnabled                       bool   `jsonapi:"attr,sso-enabled"`
	TerraformBuildWorkerApplyTimeout string `jsonapi:"attr,terraform-build-worker-apply-timeout"`
	TerraformBuildWorkerPlanTimeout  string `jsonapi:"attr,terraform-build-worker-plan-timeout"`
	TerraformWorkerSudoEnabled       bool   `jsonapi:"attr,terraform-worker-sudo-enabled"`

	// Relations
	Owners []*User `jsonapi:"relation,owners"`
}

AdminOrganization represents a Terraform Enterprise organization returned from the Admin API.

type AdminOrganizationList added in v0.13.0

type AdminOrganizationList struct {
	*Pagination
	Items []*AdminOrganization
}

AdminOrganizationList represents a list of organizations via Admin API.

type AdminOrganizationListOptions added in v0.13.0

type AdminOrganizationListOptions struct {
	ListOptions

	// A query string used to filter organizations.
	// Any organizations with a name or notification email partially matching this value will be returned.
	Query *string `url:"q,omitempty"`

	// A list of relations to include. See available resources
	// https://www.terraform.io/docs/cloud/api/admin/organizations.html#available-related-resources
	Include *string `url:"include"`
}

AdminOrganizationListOptions represents the options for listing organizations via Admin API.

type AdminOrganizationUpdateOptions added in v0.13.0

type AdminOrganizationUpdateOptions struct {
	AccessBetaTools                  *bool   `jsonapi:"attr,access-beta-tools,omitempty"`
	IsDisabled                       *bool   `jsonapi:"attr,is-disabled,omitempty"`
	TerraformBuildWorkerApplyTimeout *string `jsonapi:"attr,terraform-build-worker-apply-timeout,omitempty"`
	TerraformBuildWorkerPlanTimeout  *string `jsonapi:"attr,terraform-build-worker-plan-timeout,omitempty"`
	TerraformWorkerSudoEnabled       bool    `jsonapi:"attr,terraform-worker-sudo-enabled,omitempty"`
}

AdminOrganizationUpdateOptions represents the admin options for updating an organization. https://www.terraform.io/docs/cloud/api/admin/organizations.html#request-body

type AdminOrganizations added in v0.13.0

type AdminOrganizations interface {
	// List all the organizations visible to the current user.
	List(ctx context.Context, options AdminOrganizationListOptions) (*AdminOrganizationList, error)

	// Read attributes of an existing organization via admin API.
	Read(ctx context.Context, organization string) (*AdminOrganization, error)

	// Update attributes of an existing organization via admin API.
	Update(ctx context.Context, organization string, options AdminOrganizationUpdateOptions) (*AdminOrganization, error)

	// Delete an organization by its name via admin API
	Delete(ctx context.Context, organization string) error
}

AdminOrganizations describes all of the admin organization related methods that the Terraform Enterprise API supports. Note that admin settings are only available in Terraform Enterprise.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/organizations.html

type AdminRun added in v0.13.0

type AdminRun struct {
	ID               string               `jsonapi:"primary,runs"`
	CreatedAt        time.Time            `jsonapi:"attr,created-at,iso8601"`
	HasChanges       bool                 `jsonapi:"attr,has-changes"`
	Status           RunStatus            `jsonapi:"attr,status"`
	StatusTimestamps *RunStatusTimestamps `jsonapi:"attr,status-timestamps"`

	// Relations
	Workspace    *AdminWorkspace    `jsonapi:"relation,workspace"`
	Organization *AdminOrganization `jsonapi:"relation,workspace.organization"`
}

type AdminRunForceCancelOptions added in v0.13.0

type AdminRunForceCancelOptions struct {
	// An optional comment explaining the reason for the force-cancel.
	// https://www.terraform.io/docs/cloud/api/admin/runs.html#request-body
	Comment *string `json:"comment,omitempty"`
}

AdminRunForceCancelOptions represents the options for force-canceling a run.

type AdminRuns added in v0.13.0

type AdminRuns interface {
	// List all the runs of the given installation.
	List(ctx context.Context, options AdminRunsListOptions) (*AdminRunsList, error)

	// Force-cancel a run by its ID.
	ForceCancel(ctx context.Context, runID string, options AdminRunForceCancelOptions) error
}

AdminRuns describes all the admin run related methods that the Terraform Enterprise API supports. It contains endpoints to help site administrators manage their runs.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/runs.html

type AdminRunsList added in v0.13.0

type AdminRunsList struct {
	*Pagination
	Items []*AdminRun
}

AdminRunsList represents a list of runs.

type AdminRunsListOptions added in v0.13.0

type AdminRunsListOptions struct {
	ListOptions

	RunStatus *string `url:"filter[status],omitempty"`
	Query     *string `url:"q,omitempty"`
	Include   *string `url:"include,omitempty"`
}

AdminRunsListOptions represents the options for listing runs. https://www.terraform.io/docs/cloud/api/admin/runs.html#query-parameters

type AdminSAMLSetting added in v0.13.0

type AdminSAMLSetting struct {
	ID                        string `jsonapi:"primary,saml-settings"`
	Enabled                   bool   `jsonapi:"attr,enabled"`
	Debug                     bool   `jsonapi:"attr,debug"`
	OldIDPCert                string `jsonapi:"attr,old-idp-cert"`
	IDPCert                   string `jsonapi:"attr,idp-cert"`
	SLOEndpointURL            string `jsonapi:"attr,slo-endpoint-url"`
	SSOEndpointURL            string `jsonapi:"attr,sso-endpoint-url"`
	AttrUsername              string `jsonapi:"attr,attr-username"`
	AttrGroups                string `jsonapi:"attr,attr-groups"`
	AttrSiteAdmin             string `jsonapi:"attr,attr-site-admin"`
	SiteAdminRole             string `jsonapi:"attr,site-admin-role"`
	SSOAPITokenSessionTimeout int    `jsonapi:"attr,sso-api-token-session-timeout"`
	ACSConsumerURL            string `jsonapi:"attr,acs-consumer-url"`
	MetadataURL               string `jsonapi:"attr,metadata-url"`
	TeamManagementEnabled     bool   `jsonapi:"attr,team-management-enabled"`
	Certificate               string `jsonapi:"attr,certificate"`
	AuthnRequestsSigned       bool   `jsonapi:"attr,authn-requests-signed"`
	WantAssertionsSigned      bool   `jsonapi:"attr,want-assertions-signed"`
	PrivateKey                string `jsonapi:"attr,private-key"`
}

AdminSAMLSetting represents the SAML settings in Terraform Enterprise.

type AdminSAMLSettingsUpdateOptions added in v0.13.0

type AdminSAMLSettingsUpdateOptions struct {
	Enabled                   *bool   `jsonapi:"attr,enabled,omitempty"`
	Debug                     *bool   `jsonapi:"attr,debug,omitempty"`
	IDPCert                   *string `jsonapi:"attr,idp-cert,omitempty"`
	SLOEndpointURL            *string `jsonapi:"attr,slo-endpoint-url,omitempty"`
	SSOEndpointURL            *string `jsonapi:"attr,sso-endpoint-url,omitempty"`
	AttrUsername              *string `jsonapi:"attr,attr-username,omitempty"`
	AttrGroups                *string `jsonapi:"attr,attr-groups,omitempty"`
	AttrSiteAdmin             *string `jsonapi:"attr,attr-site-admin,omitempty"`
	SiteAdminRole             *string `jsonapi:"attr,site-admin-role,omitempty"`
	SSOAPITokenSessionTimeout *int    `jsonapi:"attr,sso-api-token-session-timeout,omitempty"`
}

AdminSAMLSettingsUpdateOptions represents the admin options for updating SAML settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body-2

type AdminSMTPSetting added in v0.13.0

type AdminSMTPSetting struct {
	ID       string       `jsonapi:"primary,smtp-settings"`
	Enabled  bool         `jsonapi:"attr,enabled"`
	Host     string       `jsonapi:"attr,host"`
	Port     int          `jsonapi:"attr,port"`
	Sender   string       `jsonapi:"attr,sender"`
	Auth     SMTPAuthType `jsonapi:"attr,auth"`
	Username string       `jsonapi:"attr,username"`
}

AdminSMTPSetting represents a the SMTP settings in Terraform Enterprise.

type AdminSMTPSettingsUpdateOptions added in v0.13.0

type AdminSMTPSettingsUpdateOptions struct {
	Enabled          *bool         `jsonapi:"attr,enabled,omitempty"`
	Host             *string       `jsonapi:"attr,host,omitempty"`
	Port             *int          `jsonapi:"attr,port,omitempty"`
	Sender           *string       `jsonapi:"attr,sender,omitempty"`
	Auth             *SMTPAuthType `jsonapi:"attr,auth,omitempty"`
	Username         *string       `jsonapi:"attr,username,omitempty"`
	Password         *string       `jsonapi:"attr,password,omitempty"`
	TestEmailAddress *string       `jsonapi:"attr,test-email-address,omitempty"`
}

AdminSMTPSettingsUpdateOptions represents the admin options for updating SMTP settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body-3

type AdminSettings added in v0.13.0

type AdminSettings struct {
	General        GeneralSettings
	SAML           SAMLSettings
	CostEstimation CostEstimationSettings
	SMTP           SMTPSettings
	Twilio         TwilioSettings
	Customization  CustomizationSettings
}

AdminSettings describes all the admin settings related methods that the Terraform Enterprise API supports. Note that admin settings are only available in Terraform Enterprise.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/settings.html AdminSettings todo

type AdminTerraformVersion added in v0.13.0

type AdminTerraformVersion struct {
	ID        string    `jsonapi:"primary,terraform-versions"`
	Version   string    `jsonapi:"attr,version"`
	URL       string    `jsonapi:"attr,url"`
	Sha       string    `jsonapi:"attr,sha"`
	Official  bool      `jsonapi:"attr,official"`
	Enabled   bool      `jsonapi:"attr,enabled"`
	Beta      bool      `jsonapi:"attr,beta"`
	Usage     int       `jsonapi:"attr,usage"`
	CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
}

AdminTerraformVersion represents a Terraform Version

type AdminTerraformVersionCreateOptions added in v0.13.0

type AdminTerraformVersionCreateOptions struct {
	Type     string  `jsonapi:"primary,terraform-versions"`
	Version  *string `jsonapi:"attr,version"`
	URL      *string `jsonapi:"attr,url"`
	Sha      *string `jsonapi:"attr,sha"`
	Official *bool   `jsonapi:"attr,official,omitempty"`
	Enabled  *bool   `jsonapi:"attr,enabled,omitempty"`
	Beta     *bool   `jsonapi:"attr,beta,omitempty"`
}

AdminTerraformVersionCreateOptions for creating a terraform version. https://www.terraform.io/docs/cloud/api/admin/terraform-versions.html#request-body

type AdminTerraformVersionUpdateOptions added in v0.13.0

type AdminTerraformVersionUpdateOptions struct {
	Type     string  `jsonapi:"primary,terraform-versions"`
	Version  *string `jsonapi:"attr,version,omitempty"`
	URL      *string `jsonapi:"attr,url,omitempty"`
	Sha      *string `jsonapi:"attr,sha,omitempty"`
	Official *bool   `jsonapi:"attr,official,omitempty"`
	Enabled  *bool   `jsonapi:"attr,enabled,omitempty"`
	Beta     *bool   `jsonapi:"attr,beta,omitempty"`
}

AdminTerraformVersionUpdateOptions for updating terraform version. https://www.terraform.io/docs/cloud/api/admin/terraform-versions.html#request-body

type AdminTerraformVersions added in v0.13.0

type AdminTerraformVersions interface {
	// List all the terraform versions.
	List(ctx context.Context, options AdminTerraformVersionsListOptions) (*AdminTerraformVersionsList, error)

	// Read a terraform version by its ID.
	Read(ctx context.Context, id string) (*AdminTerraformVersion, error)

	// Create a terraform version.
	Create(ctx context.Context, options AdminTerraformVersionCreateOptions) (*AdminTerraformVersion, error)

	// Update a terraform version.
	Update(ctx context.Context, id string, options AdminTerraformVersionUpdateOptions) (*AdminTerraformVersion, error)

	// Delete a terraform version
	Delete(ctx context.Context, id string) error
}

AdminTerraformVersions describes all the admin terraform versions related methods that the Terraform Enterprise API supports. Note that admin terraform versions are only available in Terraform Enterprise.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/terraform-versions.html

type AdminTerraformVersionsList added in v0.13.0

type AdminTerraformVersionsList struct {
	*Pagination
	Items []*AdminTerraformVersion
}

AdminTerraformVersionsList represents a list of terraform versions.

type AdminTerraformVersionsListOptions added in v0.13.0

type AdminTerraformVersionsListOptions struct {
	ListOptions
}

AdminTerraformVersionsListOptions represents the options for listing terraform versions.

type AdminTwilioSetting added in v0.13.0

type AdminTwilioSetting struct {
	ID         string `jsonapi:"primary,twilio-settings"`
	Enabled    bool   `jsonapi:"attr,enabled"`
	AccountSid string `jsonapi:"attr,account-sid"`
	FromNumber string `jsonapi:"attr,from-number"`
}

AdminTwilioSetting represents the Twilio settings in Terraform Enterprise.

type AdminTwilioSettingsUpdateOptions added in v0.13.0

type AdminTwilioSettingsUpdateOptions struct {
	Enabled    *bool   `jsonapi:"attr,enabled,omitempty"`
	AccountSid *string `jsonapi:"attr,account-sid,omitempty"`
	AuthToken  *string `jsonapi:"attr,auth-token,omitempty"`
	FromNumber *string `jsonapi:"attr,from-number,omitempty"`
}

AdminTwilioSettingsUpdateOptions represents the admin options for updating Twilio settings. https://www.terraform.io/docs/cloud/api/admin/settings.html#request-body-4

type AdminTwilioSettingsVerifyOptions added in v0.13.0

type AdminTwilioSettingsVerifyOptions struct {
	TestNumber *string `jsonapi:"attr,test-number"`
}

AdminTwilioSettingsVerifyOptions represents the test number to verify Twilio. https://www.terraform.io/docs/cloud/api/admin/settings.html#verify-twilio-settings

type AdminUser added in v0.13.0

type AdminUser struct {
	ID               string     `jsonapi:"primary,users"`
	Email            string     `jsonapi:"attr,email"`
	Username         string     `jsonapi:"attr,username"`
	AvatarURL        string     `jsonapi:"attr,avatar-url"`
	TwoFactor        *TwoFactor `jsonapi:"attr,two-factor"`
	IsAdmin          bool       `jsonapi:"attr,is-admin"`
	IsSuspended      bool       `jsonapi:"attr,is-suspended"`
	IsServiceAccount bool       `jsonapi:"attr,is-service-account"`

	// Relations
	Organizations []*Organization `jsonapi:"relation,organizations"`
}

AdminUser represents a user as seen by an Admin.

type AdminUserList added in v0.13.0

type AdminUserList struct {
	*Pagination
	Items []*AdminUser
}

AdminUserList represents a list of users.

type AdminUserListOptions added in v0.13.0

type AdminUserListOptions struct {
	ListOptions

	// A search query string. Users are searchable by username and email address.
	Query *string `url:"q,omitempty"`

	// Can be "true" or "false" to show only administrators or non-administrators.
	Administrators *string `url:"filter[admin]"`

	// Can be "true" or "false" to show only suspended users or users who are not suspended.
	SuspendedUsers *string `url:"filter[suspended]"`

	// A list of relations to include. See available resources
	// https://www.terraform.io/docs/cloud/api/admin/users.html#available-related-resources
	Include *string `url:"include"`
}

AdminUserListOptions represents the options for listing users. https://www.terraform.io/docs/cloud/api/admin/users.html#query-parameters

type AdminUsers added in v0.13.0

type AdminUsers interface {
	// List all the users of the given installation.
	List(ctx context.Context, options AdminUserListOptions) (*AdminUserList, error)

	// Delete a user by its ID.
	Delete(ctx context.Context, userID string) error

	// Suspend a user by its ID.
	Suspend(ctx context.Context, userID string) (*AdminUser, error)

	// Unsuspend a user by its ID.
	Unsuspend(ctx context.Context, userID string) (*AdminUser, error)

	// GrantAdmin grants admin privilages to a user by its ID.
	GrantAdmin(ctx context.Context, userID string) (*AdminUser, error)

	// RevokeAdmin revokees admin privilages to a user by its ID.
	RevokeAdmin(ctx context.Context, userID string) (*AdminUser, error)

	// Disable2FA disables a user's two-factor authentication in the situation
	// where they have lost access to their device and recovery codes.
	Disable2FA(ctx context.Context, userID string) (*AdminUser, error)
}

AdminUsers describes all the admin user related methods that the Terraform Enterprise API supports. It contains endpoints to help site administrators manage their users.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/users.html

type AdminVCSRepo added in v0.13.0

type AdminVCSRepo struct {
	Identifier string `jsonapi:"attr,identifier"`
}

type AdminWorkspace added in v0.13.0

type AdminWorkspace struct {
	ID      string        `jsonapi:"primary,workspaces"`
	Name    string        `jsonapi:"attr,name"`
	Locked  bool          `jsonapi:"attr,locked"`
	VCSRepo *AdminVCSRepo `jsonapi:"attr,vcs-repo"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
	CurrentRun   *Run          `jsonapi:"relation,current-run"`
}

AdminWorkspaces represents a Terraform Enterprise admin workspace.

type AdminWorkspaceList added in v0.13.0

type AdminWorkspaceList struct {
	*Pagination
	Items []*AdminWorkspace
}

AdminWorkspaceList represents a list of workspaces.

type AdminWorkspaceListOptions added in v0.13.0

type AdminWorkspaceListOptions struct {
	ListOptions

	// A query string (partial workspace name) used to filter the results.
	// https://www.terraform.io/docs/cloud/api/admin/workspaces.html#query-parameters
	Query *string `url:"q,omitempty"`

	// A list of relations to include. See available resources
	// https://www.terraform.io/docs/cloud/api/admin/workspaces.html#available-related-resources
	Include *string `url:"include"`
}

AdminWorkspaceListOptions represents the options for listing workspaces.

type AdminWorkspaces added in v0.13.0

type AdminWorkspaces interface {
	// List all the workspaces within a workspace.
	List(ctx context.Context, options AdminWorkspaceListOptions) (*AdminWorkspaceList, error)

	// Read a workspace by its ID.
	Read(ctx context.Context, workspaceID string) (*AdminWorkspace, error)

	// Delete a workspace by its ID.
	Delete(ctx context.Context, workspaceID string) error
}

AdminWorkspaces describes all the admin workspace related methods that the Terraform Enterprise API supports. Note that admin settings are only available in Terraform Enterprise.

TFE API docs: https://www.terraform.io/docs/cloud/api/admin/workspaces.html

type AgentPool added in v0.11.0

type AgentPool struct {
	ID   string `jsonapi:"primary,agent-pools"`
	Name string `jsonapi:"attr,name"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
}

AgentPool represents a Terraform Cloud agent pool.

type AgentPoolCreateOptions added in v0.11.0

type AgentPoolCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,agent-pools"`

	// A name to identify the agent pool.
	Name *string `jsonapi:"attr,name"`
}

AgentPoolCreateOptions represents the options for creating an agent pool.

type AgentPoolList added in v0.11.0

type AgentPoolList struct {
	*Pagination
	Items []*AgentPool
}

AgentPoolList represents a list of agent pools.

type AgentPoolListOptions added in v0.11.0

type AgentPoolListOptions struct {
	ListOptions
}

AgentPoolListOptions represents the options for listing agent pools.

type AgentPoolUpdateOptions added in v0.11.0

type AgentPoolUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,agent-pools"`

	// A new name to identify the agent pool.
	Name *string `jsonapi:"attr,name"`
}

AgentPoolUpdateOptions represents the options for updating an agent pool.

type AgentPools added in v0.11.0

type AgentPools interface {
	// List all the agent pools of the given organization.
	List(ctx context.Context, organization string, options AgentPoolListOptions) (*AgentPoolList, error)

	// Create a new agent pool with the given options.
	Create(ctx context.Context, organization string, options AgentPoolCreateOptions) (*AgentPool, error)

	// Read a agent pool by its ID.
	Read(ctx context.Context, agentPoolID string) (*AgentPool, error)

	// Update an agent pool by its ID.
	Update(ctx context.Context, agentPool string, options AgentPoolUpdateOptions) (*AgentPool, error)

	// Delete an agent pool by its ID.
	Delete(ctx context.Context, agentPoolID string) error
}

AgentPools describes all the agent pool related methods that the Terraform Cloud API supports. Note that agents are not available in Terraform Enterprise.

TFE API docs: https://www.terraform.io/docs/cloud/api/agents.html

type AgentToken added in v0.12.0

type AgentToken struct {
	ID          string    `jsonapi:"primary,authentication-tokens"`
	CreatedAt   time.Time `jsonapi:"attr,created-at,iso8601"`
	Description string    `jsonapi:"attr,description"`
	LastUsedAt  time.Time `jsonapi:"attr,last-used-at,iso8601"`
	Token       string    `jsonapi:"attr,token"`
}

AgentToken represents a Terraform Cloud agent token.

type AgentTokenGenerateOptions added in v0.12.0

type AgentTokenGenerateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,agent-tokens"`

	// Description of the token
	Description *string `jsonapi:"attr,description"`
}

AgentTokenGenerateOptions represents the options for creating an agent token.

type AgentTokenList added in v0.12.0

type AgentTokenList struct {
	*Pagination
	Items []*AgentToken
}

AgentTokenList represents a list of agent tokens.

type AgentTokens added in v0.12.0

type AgentTokens interface {
	// List all the agent tokens of the given agent pool.
	List(ctx context.Context, agentPoolID string) (*AgentTokenList, error)

	// Generate a new agent token with the given options.
	Generate(ctx context.Context, agentPoolID string, options AgentTokenGenerateOptions) (*AgentToken, error)

	// Read an agent token by its ID.
	Read(ctx context.Context, agentTokenID string) (*AgentToken, error)

	// Delete an agent token by its ID.
	Delete(ctx context.Context, agentTokenID string) error
}

AgentTokens describes all the agent token related methods that the Terraform Cloud API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/agent-tokens.html

type Applies added in v0.2.3

type Applies interface {
	// Read an apply by its ID.
	Read(ctx context.Context, applyID string) (*Apply, error)

	// Logs retrieves the logs of an apply.
	Logs(ctx context.Context, applyID string) (io.Reader, error)
}

Applies describes all the apply related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/applies.html

type Apply added in v0.2.3

type Apply struct {
	ID                   string                 `jsonapi:"primary,applies"`
	LogReadURL           string                 `jsonapi:"attr,log-read-url"`
	ResourceAdditions    int                    `jsonapi:"attr,resource-additions"`
	ResourceChanges      int                    `jsonapi:"attr,resource-changes"`
	ResourceDestructions int                    `jsonapi:"attr,resource-destructions"`
	Status               ApplyStatus            `jsonapi:"attr,status"`
	StatusTimestamps     *ApplyStatusTimestamps `jsonapi:"attr,status-timestamps"`
}

Apply represents a Terraform Enterprise apply.

type ApplyStatus added in v0.2.3

type ApplyStatus string

ApplyStatus represents an apply state.

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

List all available apply statuses.

type ApplyStatusTimestamps added in v0.2.3

type ApplyStatusTimestamps struct {
	CanceledAt      time.Time `jsonapi:"attr,canceled-at,rfc3339"`
	ErroredAt       time.Time `jsonapi:"attr,errored-at,rfc3339"`
	FinishedAt      time.Time `jsonapi:"attr,finished-at,rfc3339"`
	ForceCanceledAt time.Time `jsonapi:"attr,force-canceled-at,rfc3339"`
	QueuedAt        time.Time `jsonapi:"attr,queued-at,rfc3339"`
	StartedAt       time.Time `jsonapi:"attr,started-at,rfc3339"`
}

ApplyStatusTimestamps holds the timestamps for individual apply statuses.

type AuthPolicyType

type AuthPolicyType string

AuthPolicyType represents an authentication policy type.

const (
	AuthPolicyPassword  AuthPolicyType = "password"
	AuthPolicyTwoFactor AuthPolicyType = "two_factor_mandatory"
)

List of available authentication policies.

func AuthPolicy

func AuthPolicy(v AuthPolicyType) *AuthPolicyType

AuthPolicy returns a pointer to the given authentication poliy.

type CVStatusTimestamps

type CVStatusTimestamps struct {
	FinishedAt time.Time `jsonapi:"attr,finished-at,rfc3339"`
	QueuedAt   time.Time `jsonapi:"attr,queued-at,rfc3339"`
	StartedAt  time.Time `jsonapi:"attr,started-at,rfc3339"`
}

CVStatusTimestamps holds the timestamps for individual configuration version statuses.

type Capacity added in v0.2.4

type Capacity struct {
	Organization string `jsonapi:"primary,organization-capacity"`
	Pending      int    `jsonapi:"attr,pending"`
	Running      int    `jsonapi:"attr,running"`
}

Capacity represents the current run capacity of an organization.

type CategoryType

type CategoryType string

CategoryType represents a category type.

const (
	CategoryEnv       CategoryType = "env"
	CategoryPolicySet CategoryType = "policy-set"
	CategoryTerraform CategoryType = "terraform"
)

List all available categories.

func Category

func Category(v CategoryType) *CategoryType

Category returns a pointer to the given category type.

type Client

type Client struct {
	Admin                      Admin
	AgentPools                 AgentPools
	AgentTokens                AgentTokens
	Applies                    Applies
	ConfigurationVersions      ConfigurationVersions
	CostEstimates              CostEstimates
	NotificationConfigurations NotificationConfigurations
	OAuthClients               OAuthClients
	OAuthTokens                OAuthTokens
	Organizations              Organizations
	OrganizationMemberships    OrganizationMemberships
	OrganizationTokens         OrganizationTokens
	Plans                      Plans
	PlanExports                PlanExports
	Policies                   Policies
	PolicyChecks               PolicyChecks
	PolicySetParameters        PolicySetParameters
	PolicySetVersions          PolicySetVersions
	PolicySets                 PolicySets
	RegistryModules            RegistryModules
	Runs                       Runs
	RunTriggers                RunTriggers
	SSHKeys                    SSHKeys
	StateVersionOutputs        StateVersionOutputs
	StateVersions              StateVersions
	Teams                      Teams
	TeamAccess                 TeamAccesses
	TeamMembers                TeamMembers
	TeamTokens                 TeamTokens
	Users                      Users
	UserTokens                 UserTokens
	Variables                  Variables
	Workspaces                 Workspaces

	Meta Meta
	// contains filtered or unexported fields
}

Client is the Terraform Enterprise API client. It provides the basic connectivity and configuration for accessing the TFE API.

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient creates a new Terraform Enterprise API client.

func (*Client) RemoteAPIVersion added in v0.8.0

func (c *Client) RemoteAPIVersion() string

RemoteAPIVersion returns the server's declared API version string.

A Terraform Cloud or Enterprise API server returns its API version in an HTTP header field in all responses. The NewClient function saves the version number returned in its initial setup request and RemoteAPIVersion returns that cached value.

The API protocol calls for this string to be a dotted-decimal version number like 2.3.0, where the first number indicates the API major version while the second indicates a minor version which may have introduced some backward-compatible additional features compared to its predecessor.

Explicit API versioning was added to the Terraform Cloud and Enterprise APIs as a later addition, so older servers will not return version information. In that case, this function returns an empty string as the version.

func (*Client) RetryServerErrors added in v0.3.11

func (c *Client) RetryServerErrors(retry bool)

RetryServerErrors configures the retry HTTP check to also retry unexpected errors or requests that failed with a server error.

func (*Client) SetFakeRemoteAPIVersion added in v0.8.1

func (c *Client) SetFakeRemoteAPIVersion(fakeAPIVersion string)

SetFakeRemoteAPIVersion allows setting a given string as the client's remoteAPIVersion, overriding the value pulled from the API header during client initialization.

This is intended for use in tests, when you may want to configure your TFE client to return something different than the actual API version in order to test error handling.

type Config

type Config struct {
	// The address of the Terraform Enterprise API.
	Address string

	// The base path on which the API is served.
	BasePath string

	// API token used to access the Terraform Enterprise API.
	Token string

	// Headers that will be added to every request.
	Headers http.Header

	// A custom HTTP client to use.
	HTTPClient *http.Client

	// RetryLogHook is invoked each time a request is retried.
	RetryLogHook RetryLogHook
}

Config provides configuration details to the API client.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default config structure.

type ConfigurationSource

type ConfigurationSource string

ConfigurationSource represents a source of a configuration version.

const (
	ConfigurationSourceAPI       ConfigurationSource = "tfe-api"
	ConfigurationSourceBitbucket ConfigurationSource = "bitbucket"
	ConfigurationSourceGithub    ConfigurationSource = "github"
	ConfigurationSourceGitlab    ConfigurationSource = "gitlab"
	ConfigurationSourceTerraform ConfigurationSource = "terraform"
)

List all available configuration version sources.

type ConfigurationStatus

type ConfigurationStatus string

ConfigurationStatus represents a configuration version status.

const (
	ConfigurationErrored  ConfigurationStatus = "errored"
	ConfigurationPending  ConfigurationStatus = "pending"
	ConfigurationUploaded ConfigurationStatus = "uploaded"
)

List all available configuration version statuses.

type ConfigurationVersion

type ConfigurationVersion struct {
	ID               string              `jsonapi:"primary,configuration-versions"`
	AutoQueueRuns    bool                `jsonapi:"attr,auto-queue-runs"`
	Error            string              `jsonapi:"attr,error"`
	ErrorMessage     string              `jsonapi:"attr,error-message"`
	Source           ConfigurationSource `jsonapi:"attr,source"`
	Speculative      bool                `jsonapi:"attr,speculative "`
	Status           ConfigurationStatus `jsonapi:"attr,status"`
	StatusTimestamps *CVStatusTimestamps `jsonapi:"attr,status-timestamps"`
	UploadURL        string              `jsonapi:"attr,upload-url"`

	// Relations
	IngressAttributes *IngressAttributes `jsonapi:"relation,ingress-attributes"`
}

ConfigurationVersion is a representation of an uploaded or ingressed Terraform configuration in TFE. A workspace must have at least one configuration version before any runs may be queued on it.

type ConfigurationVersionCreateOptions

type ConfigurationVersionCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,configuration-versions"`

	// When true, runs are queued automatically when the configuration version
	// is uploaded.
	AutoQueueRuns *bool `jsonapi:"attr,auto-queue-runs,omitempty"`

	// When true, this configuration version can only be used for planning.
	Speculative *bool `jsonapi:"attr,speculative,omitempty"`
}

ConfigurationVersionCreateOptions represents the options for creating a configuration version.

type ConfigurationVersionList added in v0.2.0

type ConfigurationVersionList struct {
	*Pagination
	Items []*ConfigurationVersion
}

ConfigurationVersionList represents a list of configuration versions.

type ConfigurationVersionListOptions

type ConfigurationVersionListOptions struct {
	ListOptions

	// A list of relations to include. See available resources:
	// https://www.terraform.io/docs/cloud/api/configuration-versions.html#available-related-resources
	Include *string `url:"include"`
}

ConfigurationVersionListOptions represents the options for listing configuration versions.

type ConfigurationVersionReadOptions added in v0.16.0

type ConfigurationVersionReadOptions struct {
	Include string `url:"include"`
}

ConfigurationVersionReadOptions represents the options for reading a configuration version.

type ConfigurationVersions

type ConfigurationVersions interface {
	// List returns all configuration versions of a workspace.
	List(ctx context.Context, workspaceID string, options ConfigurationVersionListOptions) (*ConfigurationVersionList, error)

	// Create is used to create a new configuration version. The created
	// configuration version will be usable once data is uploaded to it.
	Create(ctx context.Context, workspaceID string, options ConfigurationVersionCreateOptions) (*ConfigurationVersion, error)

	// Read a configuration version by its ID.
	Read(ctx context.Context, cvID string) (*ConfigurationVersion, error)

	// ReadWithOptions reads a configuration version by its ID using the options supplied
	ReadWithOptions(ctx context.Context, cvID string, options *ConfigurationVersionReadOptions) (*ConfigurationVersion, error)

	// Upload packages and uploads Terraform configuration files. It requires
	// the upload URL from a configuration version and the full path to the
	// configuration files on disk.
	Upload(ctx context.Context, url string, path string) error
}

ConfigurationVersions describes all the configuration version related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/enterprise/api/configuration-versions.html

type CostEstimate added in v0.3.20

type CostEstimate struct {
	ID                      string                        `jsonapi:"primary,cost-estimates"`
	DeltaMonthlyCost        string                        `jsonapi:"attr,delta-monthly-cost"`
	ErrorMessage            string                        `jsonapi:"attr,error-message"`
	MatchedResourcesCount   int                           `jsonapi:"attr,matched-resources-count"`
	PriorMonthlyCost        string                        `jsonapi:"attr,prior-monthly-cost"`
	ProposedMonthlyCost     string                        `jsonapi:"attr,proposed-monthly-cost"`
	ResourcesCount          int                           `jsonapi:"attr,resources-count"`
	Status                  CostEstimateStatus            `jsonapi:"attr,status"`
	StatusTimestamps        *CostEstimateStatusTimestamps `jsonapi:"attr,status-timestamps"`
	UnmatchedResourcesCount int                           `jsonapi:"attr,unmatched-resources-count"`
}

CostEstimate represents a Terraform Enterprise costEstimate.

type CostEstimateStatus added in v0.3.20

type CostEstimateStatus string

CostEstimateStatus represents a costEstimate state.

const (
	CostEstimateCanceled              CostEstimateStatus = "canceled"
	CostEstimateErrored               CostEstimateStatus = "errored"
	CostEstimateFinished              CostEstimateStatus = "finished"
	CostEstimatePending               CostEstimateStatus = "pending"
	CostEstimateQueued                CostEstimateStatus = "queued"
	CostEstimateSkippedDueToTargeting CostEstimateStatus = "skipped_due_to_targeting"
)

List all available costEstimate statuses.

type CostEstimateStatusTimestamps added in v0.3.20

type CostEstimateStatusTimestamps struct {
	CanceledAt              time.Time `jsonapi:"attr,canceled-at,rfc3339"`
	ErroredAt               time.Time `jsonapi:"attr,errored-at,rfc3339"`
	FinishedAt              time.Time `jsonapi:"attr,finished-at,rfc3339"`
	PendingAt               time.Time `jsonapi:"attr,pending-at,rfc3339"`
	QueuedAt                time.Time `jsonapi:"attr,queued-at,rfc3339"`
	SkippedDueToTargetingAt time.Time `jsonapi:"attr,skipped-due-to-targeting-at,rfc3339"`
}

CostEstimateStatusTimestamps holds the timestamps for individual costEstimate statuses.

type CostEstimates added in v0.3.20

type CostEstimates interface {
	// Read a costEstimate by its ID.
	Read(ctx context.Context, costEstimateID string) (*CostEstimate, error)

	// Logs retrieves the logs of a costEstimate.
	Logs(ctx context.Context, costEstimateID string) (io.Reader, error)
}

CostEstimates describes all the costEstimate related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/cost-estimates.html

type CostEstimationSettings added in v0.13.0

type CostEstimationSettings interface {
	// Read returns the cost estimation settings.
	Read(ctx context.Context) (*AdminCostEstimationSetting, error)

	// Update updates the cost estimation settings.
	Update(ctx context.Context, options AdminCostEstimationSettingOptions) (*AdminCostEstimationSetting, error)
}

CostEstimationSettings describes all the cost estimation admin settings.

type CustomizationSettings added in v0.13.0

type CustomizationSettings interface {
	// Read returns the customization settings.
	Read(ctx context.Context) (*AdminCustomizationSetting, error)

	// Update updates the customization settings.
	Update(ctx context.Context, options AdminCustomizationSettingsUpdateOptions) (*AdminCustomizationSetting, error)
}

CustomizationSettings describes all the Customization admin settings.

type DeliveryResponse added in v0.3.12

type DeliveryResponse struct {
	Body       string              `jsonapi:"attr,body"`
	Code       string              `jsonapi:"attr,code"`
	Headers    map[string][]string `jsonapi:"attr,headers"`
	SentAt     time.Time           `jsonapi:"attr,sent-at,rfc3339"`
	Successful string              `jsonapi:"attr,successful"`
	URL        string              `jsonapi:"attr,url"`
}

DeliveryResponse represents a notification configuration delivery response.

type Enforcement

type Enforcement struct {
	Path string           `jsonapi:"attr,path"`
	Mode EnforcementLevel `jsonapi:"attr,mode"`
}

Enforcement describes a enforcement.

type EnforcementLevel

type EnforcementLevel string

EnforcementLevel represents an enforcement level.

const (
	EnforcementAdvisory EnforcementLevel = "advisory"
	EnforcementHard     EnforcementLevel = "hard-mandatory"
	EnforcementSoft     EnforcementLevel = "soft-mandatory"
)

List the available enforcement types.

func EnforcementMode

func EnforcementMode(v EnforcementLevel) *EnforcementLevel

EnforcementMode returns a pointer to the given enforcement level.

type EnforcementOptions

type EnforcementOptions struct {
	Path *string           `json:"path,omitempty"`
	Mode *EnforcementLevel `json:"mode"`
}

EnforcementOptions represents the enforcement options of a policy.

type Entitlements added in v0.3.4

type Entitlements struct {
	ID                    string `jsonapi:"primary,entitlement-sets"`
	Agents                bool   `jsonapi:"attr,agents"`
	AuditLogging          bool   `jsonapi:"attr,audit-logging"`
	CostEstimation        bool   `jsonapi:"attr,cost-estimation"`
	Operations            bool   `jsonapi:"attr,operations"`
	PrivateModuleRegistry bool   `jsonapi:"attr,private-module-registry"`
	SSO                   bool   `jsonapi:"attr,sso"`
	Sentinel              bool   `jsonapi:"attr,sentinel"`
	StateStorage          bool   `jsonapi:"attr,state-storage"`
	Teams                 bool   `jsonapi:"attr,teams"`
	VCSIntegrations       bool   `jsonapi:"attr,vcs-integrations"`
}

Entitlements represents the entitlements of an organization.

type GeneralSettings added in v0.13.0

type GeneralSettings interface {
	// Read returns the general settings
	Read(ctx context.Context) (*AdminGeneralSetting, error)

	// Update updates general settings.
	Update(ctx context.Context, options AdminGeneralSettingsUpdateOptions) (*AdminGeneralSetting, error)
}

GeneralSettings describes the general admin settings.

type IPRange added in v0.12.0

type IPRange struct {
	// List of IP ranges in CIDR notation used for connections from user site to Terraform Cloud APIs
	API []string `json:"api"`
	// List of IP ranges in CIDR notation used for notifications
	Notifications []string `json:"notifications"`
	// List of IP ranges in CIDR notation used for outbound requests from Sentinel policies
	Sentinel []string `json:"sentinel"`
	// List of IP ranges in CIDR notation used for connecting to VCS providers
	VCS []string `json:"vcs"`
}

type IPRanges added in v0.12.0

type IPRanges interface {
	// Retrieve TFC IP ranges. If `modifiedSince` is not an empty string
	// then it will only return the IP ranges changes since that date.
	// The format for `modifiedSince` can be found here:
	// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
	Read(ctx context.Context, modifiedSince string) (*IPRange, error)
}

IP Ranges provides a list of Terraform Cloud and Enterprise's IP ranges.

TFE API docs: https://www.terraform.io/docs/cloud/api/ip-ranges.html

type IngressAttributes added in v0.16.0

type IngressAttributes struct {
	ID                string `jsonapi:"primary,ingress-attributes"`
	Branch            string `jsonapi:"attr,branch"`
	CloneURL          string `jsonapi:"attr,clone-url"`
	CommitMessage     string `jsonapi:"attr,commit-message"`
	CommitSHA         string `jsonapi:"attr,commit-sha"`
	CommitURL         string `jsonapi:"attr,commit-url"`
	CompareURL        string `jsonapi:"attr,compare-url"`
	Identifier        string `jsonapi:"attr,identifier"`
	IsPullRequest     bool   `jsonapi:"attr,is-pull-request"`
	OnDefaultBranch   bool   `jsonapi:"attr,on-default-branch"`
	PullRequestNumber int    `jsonapi:"attr,pull-request-number"`
	PullRequestURL    string `jsonapi:"attr,pull-request-url"`
	PullRequestTitle  string `jsonapi:"attr,pull-request-title"`
	PullRequestBody   string `jsonapi:"attr,pull-request-body"`
	Tag               string `jsonapi:"attr,tag"`
	SenderUsername    string `jsonapi:"attr,sender-username"`
	SenderAvatarURL   string `jsonapi:"attr,sender-avatar-url"`
	SenderHTMLURL     string `jsonapi:"attr,sender-html-url"`

	// Links
	Links map[string]interface{} `jsonapi:"links,omitempty"`
}

IngressAttributes include commit information associated with configuration versions sourced from VCS.

type ListOptions

type ListOptions struct {
	// The page number to request. The results vary based on the PageSize.
	PageNumber int `url:"page[number],omitempty"`

	// The number of elements returned in a single page.
	PageSize int `url:"page[size],omitempty"`
}

ListOptions is used to specify pagination options when making API requests. Pagination allows breaking up large result sets into chunks, or "pages".

type LogReader added in v0.1.1

type LogReader struct {
	// contains filtered or unexported fields
}

LogReader implements io.Reader for streaming logs.

func (*LogReader) Read added in v0.1.1

func (r *LogReader) Read(l []byte) (int, error)

type Meta added in v0.12.0

type Meta struct {
	IPRanges IPRanges
}

Meta contains any Terraform Cloud APIs which provide data about the API itself.

type MockAdminOrganizations added in v0.20.0

type MockAdminOrganizations struct {
	// contains filtered or unexported fields
}

MockAdminOrganizations is a mock of AdminOrganizations interface.

func NewMockAdminOrganizations added in v0.20.0

func NewMockAdminOrganizations(ctrl *gomock.Controller) *MockAdminOrganizations

NewMockAdminOrganizations creates a new mock instance.

func (*MockAdminOrganizations) Delete added in v0.20.0

func (m *MockAdminOrganizations) Delete(ctx context.Context, organization string) error

Delete mocks base method.

func (*MockAdminOrganizations) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdminOrganizations) List added in v0.20.0

List mocks base method.

func (*MockAdminOrganizations) Read added in v0.20.0

func (m *MockAdminOrganizations) Read(ctx context.Context, organization string) (*AdminOrganization, error)

Read mocks base method.

func (*MockAdminOrganizations) Update added in v0.20.0

Update mocks base method.

type MockAdminOrganizationsMockRecorder added in v0.20.0

type MockAdminOrganizationsMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdminOrganizationsMockRecorder is the mock recorder for MockAdminOrganizations.

func (*MockAdminOrganizationsMockRecorder) Delete added in v0.20.0

func (mr *MockAdminOrganizationsMockRecorder) Delete(ctx, organization interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAdminOrganizationsMockRecorder) List added in v0.20.0

func (mr *MockAdminOrganizationsMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAdminOrganizationsMockRecorder) Read added in v0.20.0

func (mr *MockAdminOrganizationsMockRecorder) Read(ctx, organization interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockAdminOrganizationsMockRecorder) Update added in v0.20.0

func (mr *MockAdminOrganizationsMockRecorder) Update(ctx, organization, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockAdminRuns added in v0.20.0

type MockAdminRuns struct {
	// contains filtered or unexported fields
}

MockAdminRuns is a mock of AdminRuns interface.

func NewMockAdminRuns added in v0.20.0

func NewMockAdminRuns(ctrl *gomock.Controller) *MockAdminRuns

NewMockAdminRuns creates a new mock instance.

func (*MockAdminRuns) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdminRuns) ForceCancel added in v0.20.0

func (m *MockAdminRuns) ForceCancel(ctx context.Context, runID string, options AdminRunForceCancelOptions) error

ForceCancel mocks base method.

func (*MockAdminRuns) List added in v0.20.0

List mocks base method.

type MockAdminRunsMockRecorder added in v0.20.0

type MockAdminRunsMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdminRunsMockRecorder is the mock recorder for MockAdminRuns.

func (*MockAdminRunsMockRecorder) ForceCancel added in v0.20.0

func (mr *MockAdminRunsMockRecorder) ForceCancel(ctx, runID, options interface{}) *gomock.Call

ForceCancel indicates an expected call of ForceCancel.

func (*MockAdminRunsMockRecorder) List added in v0.20.0

func (mr *MockAdminRunsMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

type MockAdminTerraformVersions added in v0.20.0

type MockAdminTerraformVersions struct {
	// contains filtered or unexported fields
}

MockAdminTerraformVersions is a mock of AdminTerraformVersions interface.

func NewMockAdminTerraformVersions added in v0.20.0

func NewMockAdminTerraformVersions(ctrl *gomock.Controller) *MockAdminTerraformVersions

NewMockAdminTerraformVersions creates a new mock instance.

func (*MockAdminTerraformVersions) Create added in v0.20.0

Create mocks base method.

func (*MockAdminTerraformVersions) Delete added in v0.20.0

Delete mocks base method.

func (*MockAdminTerraformVersions) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdminTerraformVersions) List added in v0.20.0

List mocks base method.

func (*MockAdminTerraformVersions) Read added in v0.20.0

Read mocks base method.

func (*MockAdminTerraformVersions) Update added in v0.20.0

Update mocks base method.

type MockAdminTerraformVersionsMockRecorder added in v0.20.0

type MockAdminTerraformVersionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdminTerraformVersionsMockRecorder is the mock recorder for MockAdminTerraformVersions.

func (*MockAdminTerraformVersionsMockRecorder) Create added in v0.20.0

func (mr *MockAdminTerraformVersionsMockRecorder) Create(ctx, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockAdminTerraformVersionsMockRecorder) Delete added in v0.20.0

func (mr *MockAdminTerraformVersionsMockRecorder) Delete(ctx, id interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAdminTerraformVersionsMockRecorder) List added in v0.20.0

func (mr *MockAdminTerraformVersionsMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAdminTerraformVersionsMockRecorder) Read added in v0.20.0

func (mr *MockAdminTerraformVersionsMockRecorder) Read(ctx, id interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockAdminTerraformVersionsMockRecorder) Update added in v0.20.0

func (mr *MockAdminTerraformVersionsMockRecorder) Update(ctx, id, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockAdminUsers added in v0.20.0

type MockAdminUsers struct {
	// contains filtered or unexported fields
}

MockAdminUsers is a mock of AdminUsers interface.

func NewMockAdminUsers added in v0.20.0

func NewMockAdminUsers(ctrl *gomock.Controller) *MockAdminUsers

NewMockAdminUsers creates a new mock instance.

func (*MockAdminUsers) Delete added in v0.20.0

func (m *MockAdminUsers) Delete(ctx context.Context, userID string) error

Delete mocks base method.

func (*MockAdminUsers) Disable2FA added in v0.20.0

func (m *MockAdminUsers) Disable2FA(ctx context.Context, userID string) (*AdminUser, error)

Disable2FA mocks base method.

func (*MockAdminUsers) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdminUsers) GrantAdmin added in v0.20.0

func (m *MockAdminUsers) GrantAdmin(ctx context.Context, userID string) (*AdminUser, error)

GrantAdmin mocks base method.

func (*MockAdminUsers) List added in v0.20.0

List mocks base method.

func (*MockAdminUsers) RevokeAdmin added in v0.20.0

func (m *MockAdminUsers) RevokeAdmin(ctx context.Context, userID string) (*AdminUser, error)

RevokeAdmin mocks base method.

func (*MockAdminUsers) Suspend added in v0.20.0

func (m *MockAdminUsers) Suspend(ctx context.Context, userID string) (*AdminUser, error)

Suspend mocks base method.

func (*MockAdminUsers) Unsuspend added in v0.20.0

func (m *MockAdminUsers) Unsuspend(ctx context.Context, userID string) (*AdminUser, error)

Unsuspend mocks base method.

type MockAdminUsersMockRecorder added in v0.20.0

type MockAdminUsersMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdminUsersMockRecorder is the mock recorder for MockAdminUsers.

func (*MockAdminUsersMockRecorder) Delete added in v0.20.0

func (mr *MockAdminUsersMockRecorder) Delete(ctx, userID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAdminUsersMockRecorder) Disable2FA added in v0.20.0

func (mr *MockAdminUsersMockRecorder) Disable2FA(ctx, userID interface{}) *gomock.Call

Disable2FA indicates an expected call of Disable2FA.

func (*MockAdminUsersMockRecorder) GrantAdmin added in v0.20.0

func (mr *MockAdminUsersMockRecorder) GrantAdmin(ctx, userID interface{}) *gomock.Call

GrantAdmin indicates an expected call of GrantAdmin.

func (*MockAdminUsersMockRecorder) List added in v0.20.0

func (mr *MockAdminUsersMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAdminUsersMockRecorder) RevokeAdmin added in v0.20.0

func (mr *MockAdminUsersMockRecorder) RevokeAdmin(ctx, userID interface{}) *gomock.Call

RevokeAdmin indicates an expected call of RevokeAdmin.

func (*MockAdminUsersMockRecorder) Suspend added in v0.20.0

func (mr *MockAdminUsersMockRecorder) Suspend(ctx, userID interface{}) *gomock.Call

Suspend indicates an expected call of Suspend.

func (*MockAdminUsersMockRecorder) Unsuspend added in v0.20.0

func (mr *MockAdminUsersMockRecorder) Unsuspend(ctx, userID interface{}) *gomock.Call

Unsuspend indicates an expected call of Unsuspend.

type MockAdminWorkspaces added in v0.20.0

type MockAdminWorkspaces struct {
	// contains filtered or unexported fields
}

MockAdminWorkspaces is a mock of AdminWorkspaces interface.

func NewMockAdminWorkspaces added in v0.20.0

func NewMockAdminWorkspaces(ctrl *gomock.Controller) *MockAdminWorkspaces

NewMockAdminWorkspaces creates a new mock instance.

func (*MockAdminWorkspaces) Delete added in v0.20.0

func (m *MockAdminWorkspaces) Delete(ctx context.Context, workspaceID string) error

Delete mocks base method.

func (*MockAdminWorkspaces) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdminWorkspaces) List added in v0.20.0

List mocks base method.

func (*MockAdminWorkspaces) Read added in v0.20.0

func (m *MockAdminWorkspaces) Read(ctx context.Context, workspaceID string) (*AdminWorkspace, error)

Read mocks base method.

type MockAdminWorkspacesMockRecorder added in v0.20.0

type MockAdminWorkspacesMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdminWorkspacesMockRecorder is the mock recorder for MockAdminWorkspaces.

func (*MockAdminWorkspacesMockRecorder) Delete added in v0.20.0

func (mr *MockAdminWorkspacesMockRecorder) Delete(ctx, workspaceID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAdminWorkspacesMockRecorder) List added in v0.20.0

func (mr *MockAdminWorkspacesMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAdminWorkspacesMockRecorder) Read added in v0.20.0

func (mr *MockAdminWorkspacesMockRecorder) Read(ctx, workspaceID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockAgentPools added in v0.20.0

type MockAgentPools struct {
	// contains filtered or unexported fields
}

MockAgentPools is a mock of AgentPools interface.

func NewMockAgentPools added in v0.20.0

func NewMockAgentPools(ctrl *gomock.Controller) *MockAgentPools

NewMockAgentPools creates a new mock instance.

func (*MockAgentPools) Create added in v0.20.0

func (m *MockAgentPools) Create(ctx context.Context, organization string, options AgentPoolCreateOptions) (*AgentPool, error)

Create mocks base method.

func (*MockAgentPools) Delete added in v0.20.0

func (m *MockAgentPools) Delete(ctx context.Context, agentPoolID string) error

Delete mocks base method.

func (*MockAgentPools) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAgentPools) List added in v0.20.0

func (m *MockAgentPools) List(ctx context.Context, organization string, options AgentPoolListOptions) (*AgentPoolList, error)

List mocks base method.

func (*MockAgentPools) Read added in v0.20.0

func (m *MockAgentPools) Read(ctx context.Context, agentPoolID string) (*AgentPool, error)

Read mocks base method.

func (*MockAgentPools) Update added in v0.20.0

func (m *MockAgentPools) Update(ctx context.Context, agentPool string, options AgentPoolUpdateOptions) (*AgentPool, error)

Update mocks base method.

type MockAgentPoolsMockRecorder added in v0.20.0

type MockAgentPoolsMockRecorder struct {
	// contains filtered or unexported fields
}

MockAgentPoolsMockRecorder is the mock recorder for MockAgentPools.

func (*MockAgentPoolsMockRecorder) Create added in v0.20.0

func (mr *MockAgentPoolsMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockAgentPoolsMockRecorder) Delete added in v0.20.0

func (mr *MockAgentPoolsMockRecorder) Delete(ctx, agentPoolID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAgentPoolsMockRecorder) List added in v0.20.0

func (mr *MockAgentPoolsMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAgentPoolsMockRecorder) Read added in v0.20.0

func (mr *MockAgentPoolsMockRecorder) Read(ctx, agentPoolID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockAgentPoolsMockRecorder) Update added in v0.20.0

func (mr *MockAgentPoolsMockRecorder) Update(ctx, agentPool, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockAgentTokens added in v0.20.0

type MockAgentTokens struct {
	// contains filtered or unexported fields
}

MockAgentTokens is a mock of AgentTokens interface.

func NewMockAgentTokens added in v0.20.0

func NewMockAgentTokens(ctrl *gomock.Controller) *MockAgentTokens

NewMockAgentTokens creates a new mock instance.

func (*MockAgentTokens) Delete added in v0.20.0

func (m *MockAgentTokens) Delete(ctx context.Context, agentTokenID string) error

Delete mocks base method.

func (*MockAgentTokens) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAgentTokens) Generate added in v0.20.0

func (m *MockAgentTokens) Generate(ctx context.Context, agentPoolID string, options AgentTokenGenerateOptions) (*AgentToken, error)

Generate mocks base method.

func (*MockAgentTokens) List added in v0.20.0

func (m *MockAgentTokens) List(ctx context.Context, agentPoolID string) (*AgentTokenList, error)

List mocks base method.

func (*MockAgentTokens) Read added in v0.20.0

func (m *MockAgentTokens) Read(ctx context.Context, agentTokenID string) (*AgentToken, error)

Read mocks base method.

type MockAgentTokensMockRecorder added in v0.20.0

type MockAgentTokensMockRecorder struct {
	// contains filtered or unexported fields
}

MockAgentTokensMockRecorder is the mock recorder for MockAgentTokens.

func (*MockAgentTokensMockRecorder) Delete added in v0.20.0

func (mr *MockAgentTokensMockRecorder) Delete(ctx, agentTokenID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockAgentTokensMockRecorder) Generate added in v0.20.0

func (mr *MockAgentTokensMockRecorder) Generate(ctx, agentPoolID, options interface{}) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockAgentTokensMockRecorder) List added in v0.20.0

func (mr *MockAgentTokensMockRecorder) List(ctx, agentPoolID interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockAgentTokensMockRecorder) Read added in v0.20.0

func (mr *MockAgentTokensMockRecorder) Read(ctx, agentTokenID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockApplies added in v0.20.0

type MockApplies struct {
	// contains filtered or unexported fields
}

MockApplies is a mock of Applies interface.

func NewMockApplies added in v0.20.0

func NewMockApplies(ctrl *gomock.Controller) *MockApplies

NewMockApplies creates a new mock instance.

func (*MockApplies) EXPECT added in v0.20.0

func (m *MockApplies) EXPECT() *MockAppliesMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockApplies) Logs added in v0.20.0

func (m *MockApplies) Logs(ctx context.Context, applyID string) (io.Reader, error)

Logs mocks base method.

func (*MockApplies) Read added in v0.20.0

func (m *MockApplies) Read(ctx context.Context, applyID string) (*Apply, error)

Read mocks base method.

type MockAppliesMockRecorder added in v0.20.0

type MockAppliesMockRecorder struct {
	// contains filtered or unexported fields
}

MockAppliesMockRecorder is the mock recorder for MockApplies.

func (*MockAppliesMockRecorder) Logs added in v0.20.0

func (mr *MockAppliesMockRecorder) Logs(ctx, applyID interface{}) *gomock.Call

Logs indicates an expected call of Logs.

func (*MockAppliesMockRecorder) Read added in v0.20.0

func (mr *MockAppliesMockRecorder) Read(ctx, applyID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockConfigurationVersions added in v0.20.0

type MockConfigurationVersions struct {
	// contains filtered or unexported fields
}

MockConfigurationVersions is a mock of ConfigurationVersions interface.

func NewMockConfigurationVersions added in v0.20.0

func NewMockConfigurationVersions(ctrl *gomock.Controller) *MockConfigurationVersions

NewMockConfigurationVersions creates a new mock instance.

func (*MockConfigurationVersions) Create added in v0.20.0

Create mocks base method.

func (*MockConfigurationVersions) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConfigurationVersions) List added in v0.20.0

List mocks base method.

func (*MockConfigurationVersions) Read added in v0.20.0

Read mocks base method.

func (*MockConfigurationVersions) ReadWithOptions added in v0.20.0

ReadWithOptions mocks base method.

func (*MockConfigurationVersions) Upload added in v0.20.0

func (m *MockConfigurationVersions) Upload(ctx context.Context, url, path string) error

Upload mocks base method.

type MockConfigurationVersionsMockRecorder added in v0.20.0

type MockConfigurationVersionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockConfigurationVersionsMockRecorder is the mock recorder for MockConfigurationVersions.

func (*MockConfigurationVersionsMockRecorder) Create added in v0.20.0

func (mr *MockConfigurationVersionsMockRecorder) Create(ctx, workspaceID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockConfigurationVersionsMockRecorder) List added in v0.20.0

func (mr *MockConfigurationVersionsMockRecorder) List(ctx, workspaceID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockConfigurationVersionsMockRecorder) Read added in v0.20.0

func (mr *MockConfigurationVersionsMockRecorder) Read(ctx, cvID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockConfigurationVersionsMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockConfigurationVersionsMockRecorder) ReadWithOptions(ctx, cvID, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

func (*MockConfigurationVersionsMockRecorder) Upload added in v0.20.0

func (mr *MockConfigurationVersionsMockRecorder) Upload(ctx, url, path interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockCostEstimates added in v0.20.0

type MockCostEstimates struct {
	// contains filtered or unexported fields
}

MockCostEstimates is a mock of CostEstimates interface.

func NewMockCostEstimates added in v0.20.0

func NewMockCostEstimates(ctrl *gomock.Controller) *MockCostEstimates

NewMockCostEstimates creates a new mock instance.

func (*MockCostEstimates) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCostEstimates) Logs added in v0.20.0

func (m *MockCostEstimates) Logs(ctx context.Context, costEstimateID string) (io.Reader, error)

Logs mocks base method.

func (*MockCostEstimates) Read added in v0.20.0

func (m *MockCostEstimates) Read(ctx context.Context, costEstimateID string) (*CostEstimate, error)

Read mocks base method.

type MockCostEstimatesMockRecorder added in v0.20.0

type MockCostEstimatesMockRecorder struct {
	// contains filtered or unexported fields
}

MockCostEstimatesMockRecorder is the mock recorder for MockCostEstimates.

func (*MockCostEstimatesMockRecorder) Logs added in v0.20.0

func (mr *MockCostEstimatesMockRecorder) Logs(ctx, costEstimateID interface{}) *gomock.Call

Logs indicates an expected call of Logs.

func (*MockCostEstimatesMockRecorder) Read added in v0.20.0

func (mr *MockCostEstimatesMockRecorder) Read(ctx, costEstimateID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockCostEstimationSettings added in v0.20.0

type MockCostEstimationSettings struct {
	// contains filtered or unexported fields
}

MockCostEstimationSettings is a mock of CostEstimationSettings interface.

func NewMockCostEstimationSettings added in v0.20.0

func NewMockCostEstimationSettings(ctrl *gomock.Controller) *MockCostEstimationSettings

NewMockCostEstimationSettings creates a new mock instance.

func (*MockCostEstimationSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCostEstimationSettings) Read added in v0.20.0

Read mocks base method.

func (*MockCostEstimationSettings) Update added in v0.20.0

Update mocks base method.

type MockCostEstimationSettingsMockRecorder added in v0.20.0

type MockCostEstimationSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockCostEstimationSettingsMockRecorder is the mock recorder for MockCostEstimationSettings.

func (*MockCostEstimationSettingsMockRecorder) Read added in v0.20.0

func (mr *MockCostEstimationSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockCostEstimationSettingsMockRecorder) Update added in v0.20.0

func (mr *MockCostEstimationSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockCustomizationSettings added in v0.20.0

type MockCustomizationSettings struct {
	// contains filtered or unexported fields
}

MockCustomizationSettings is a mock of CustomizationSettings interface.

func NewMockCustomizationSettings added in v0.20.0

func NewMockCustomizationSettings(ctrl *gomock.Controller) *MockCustomizationSettings

NewMockCustomizationSettings creates a new mock instance.

func (*MockCustomizationSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCustomizationSettings) Read added in v0.20.0

Read mocks base method.

func (*MockCustomizationSettings) Update added in v0.20.0

Update mocks base method.

type MockCustomizationSettingsMockRecorder added in v0.20.0

type MockCustomizationSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockCustomizationSettingsMockRecorder is the mock recorder for MockCustomizationSettings.

func (*MockCustomizationSettingsMockRecorder) Read added in v0.20.0

func (mr *MockCustomizationSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockCustomizationSettingsMockRecorder) Update added in v0.20.0

func (mr *MockCustomizationSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockGeneralSettings added in v0.20.0

type MockGeneralSettings struct {
	// contains filtered or unexported fields
}

MockGeneralSettings is a mock of GeneralSettings interface.

func NewMockGeneralSettings added in v0.20.0

func NewMockGeneralSettings(ctrl *gomock.Controller) *MockGeneralSettings

NewMockGeneralSettings creates a new mock instance.

func (*MockGeneralSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGeneralSettings) Read added in v0.20.0

Read mocks base method.

func (*MockGeneralSettings) Update added in v0.20.0

Update mocks base method.

type MockGeneralSettingsMockRecorder added in v0.20.0

type MockGeneralSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockGeneralSettingsMockRecorder is the mock recorder for MockGeneralSettings.

func (*MockGeneralSettingsMockRecorder) Read added in v0.20.0

func (mr *MockGeneralSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockGeneralSettingsMockRecorder) Update added in v0.20.0

func (mr *MockGeneralSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockIPRanges added in v0.20.0

type MockIPRanges struct {
	// contains filtered or unexported fields
}

MockIPRanges is a mock of IPRanges interface.

func NewMockIPRanges added in v0.20.0

func NewMockIPRanges(ctrl *gomock.Controller) *MockIPRanges

NewMockIPRanges creates a new mock instance.

func (*MockIPRanges) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIPRanges) Read added in v0.20.0

func (m *MockIPRanges) Read(ctx context.Context, modifiedSince string) (*IPRange, error)

Read mocks base method.

type MockIPRangesMockRecorder added in v0.20.0

type MockIPRangesMockRecorder struct {
	// contains filtered or unexported fields
}

MockIPRangesMockRecorder is the mock recorder for MockIPRanges.

func (*MockIPRangesMockRecorder) Read added in v0.20.0

func (mr *MockIPRangesMockRecorder) Read(ctx, modifiedSince interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockNotificationConfigurations added in v0.20.0

type MockNotificationConfigurations struct {
	// contains filtered or unexported fields
}

MockNotificationConfigurations is a mock of NotificationConfigurations interface.

func NewMockNotificationConfigurations added in v0.20.0

func NewMockNotificationConfigurations(ctrl *gomock.Controller) *MockNotificationConfigurations

NewMockNotificationConfigurations creates a new mock instance.

func (*MockNotificationConfigurations) Create added in v0.20.0

Create mocks base method.

func (*MockNotificationConfigurations) Delete added in v0.20.0

func (m *MockNotificationConfigurations) Delete(ctx context.Context, notificationConfigurationID string) error

Delete mocks base method.

func (*MockNotificationConfigurations) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotificationConfigurations) List added in v0.20.0

List mocks base method.

func (*MockNotificationConfigurations) Read added in v0.20.0

func (m *MockNotificationConfigurations) Read(ctx context.Context, notificationConfigurationID string) (*NotificationConfiguration, error)

Read mocks base method.

func (*MockNotificationConfigurations) Update added in v0.20.0

Update mocks base method.

func (*MockNotificationConfigurations) Verify added in v0.20.0

func (m *MockNotificationConfigurations) Verify(ctx context.Context, notificationConfigurationID string) (*NotificationConfiguration, error)

Verify mocks base method.

type MockNotificationConfigurationsMockRecorder added in v0.20.0

type MockNotificationConfigurationsMockRecorder struct {
	// contains filtered or unexported fields
}

MockNotificationConfigurationsMockRecorder is the mock recorder for MockNotificationConfigurations.

func (*MockNotificationConfigurationsMockRecorder) Create added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) Create(ctx, workspaceID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockNotificationConfigurationsMockRecorder) Delete added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) Delete(ctx, notificationConfigurationID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockNotificationConfigurationsMockRecorder) List added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) List(ctx, workspaceID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockNotificationConfigurationsMockRecorder) Read added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) Read(ctx, notificationConfigurationID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockNotificationConfigurationsMockRecorder) Update added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) Update(ctx, notificationConfigurationID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockNotificationConfigurationsMockRecorder) Verify added in v0.20.0

func (mr *MockNotificationConfigurationsMockRecorder) Verify(ctx, notificationConfigurationID interface{}) *gomock.Call

Verify indicates an expected call of Verify.

type MockOAuthClients added in v0.20.0

type MockOAuthClients struct {
	// contains filtered or unexported fields
}

MockOAuthClients is a mock of OAuthClients interface.

func NewMockOAuthClients added in v0.20.0

func NewMockOAuthClients(ctrl *gomock.Controller) *MockOAuthClients

NewMockOAuthClients creates a new mock instance.

func (*MockOAuthClients) Create added in v0.20.0

func (m *MockOAuthClients) Create(ctx context.Context, organization string, options OAuthClientCreateOptions) (*OAuthClient, error)

Create mocks base method.

func (*MockOAuthClients) Delete added in v0.20.0

func (m *MockOAuthClients) Delete(ctx context.Context, oAuthClientID string) error

Delete mocks base method.

func (*MockOAuthClients) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOAuthClients) List added in v0.20.0

func (m *MockOAuthClients) List(ctx context.Context, organization string, options OAuthClientListOptions) (*OAuthClientList, error)

List mocks base method.

func (*MockOAuthClients) Read added in v0.20.0

func (m *MockOAuthClients) Read(ctx context.Context, oAuthClientID string) (*OAuthClient, error)

Read mocks base method.

type MockOAuthClientsMockRecorder added in v0.20.0

type MockOAuthClientsMockRecorder struct {
	// contains filtered or unexported fields
}

MockOAuthClientsMockRecorder is the mock recorder for MockOAuthClients.

func (*MockOAuthClientsMockRecorder) Create added in v0.20.0

func (mr *MockOAuthClientsMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockOAuthClientsMockRecorder) Delete added in v0.20.0

func (mr *MockOAuthClientsMockRecorder) Delete(ctx, oAuthClientID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockOAuthClientsMockRecorder) List added in v0.20.0

func (mr *MockOAuthClientsMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockOAuthClientsMockRecorder) Read added in v0.20.0

func (mr *MockOAuthClientsMockRecorder) Read(ctx, oAuthClientID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockOAuthTokens added in v0.20.0

type MockOAuthTokens struct {
	// contains filtered or unexported fields
}

MockOAuthTokens is a mock of OAuthTokens interface.

func NewMockOAuthTokens added in v0.20.0

func NewMockOAuthTokens(ctrl *gomock.Controller) *MockOAuthTokens

NewMockOAuthTokens creates a new mock instance.

func (*MockOAuthTokens) Delete added in v0.20.0

func (m *MockOAuthTokens) Delete(ctx context.Context, oAuthTokenID string) error

Delete mocks base method.

func (*MockOAuthTokens) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOAuthTokens) List added in v0.20.0

func (m *MockOAuthTokens) List(ctx context.Context, organization string, options OAuthTokenListOptions) (*OAuthTokenList, error)

List mocks base method.

func (*MockOAuthTokens) Read added in v0.20.0

func (m *MockOAuthTokens) Read(ctx context.Context, oAuthTokenID string) (*OAuthToken, error)

Read mocks base method.

func (*MockOAuthTokens) Update added in v0.20.0

func (m *MockOAuthTokens) Update(ctx context.Context, oAuthTokenID string, options OAuthTokenUpdateOptions) (*OAuthToken, error)

Update mocks base method.

type MockOAuthTokensMockRecorder added in v0.20.0

type MockOAuthTokensMockRecorder struct {
	// contains filtered or unexported fields
}

MockOAuthTokensMockRecorder is the mock recorder for MockOAuthTokens.

func (*MockOAuthTokensMockRecorder) Delete added in v0.20.0

func (mr *MockOAuthTokensMockRecorder) Delete(ctx, oAuthTokenID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockOAuthTokensMockRecorder) List added in v0.20.0

func (mr *MockOAuthTokensMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockOAuthTokensMockRecorder) Read added in v0.20.0

func (mr *MockOAuthTokensMockRecorder) Read(ctx, oAuthTokenID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockOAuthTokensMockRecorder) Update added in v0.20.0

func (mr *MockOAuthTokensMockRecorder) Update(ctx, oAuthTokenID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockOrganizationMemberships added in v0.20.0

type MockOrganizationMemberships struct {
	// contains filtered or unexported fields
}

MockOrganizationMemberships is a mock of OrganizationMemberships interface.

func NewMockOrganizationMemberships added in v0.20.0

func NewMockOrganizationMemberships(ctrl *gomock.Controller) *MockOrganizationMemberships

NewMockOrganizationMemberships creates a new mock instance.

func (*MockOrganizationMemberships) Create added in v0.20.0

Create mocks base method.

func (*MockOrganizationMemberships) Delete added in v0.20.0

func (m *MockOrganizationMemberships) Delete(ctx context.Context, organizationMembershipID string) error

Delete mocks base method.

func (*MockOrganizationMemberships) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOrganizationMemberships) List added in v0.20.0

List mocks base method.

func (*MockOrganizationMemberships) Read added in v0.20.0

func (m *MockOrganizationMemberships) Read(ctx context.Context, organizationMembershipID string) (*OrganizationMembership, error)

Read mocks base method.

func (*MockOrganizationMemberships) ReadWithOptions added in v0.20.0

func (m *MockOrganizationMemberships) ReadWithOptions(ctx context.Context, organizationMembershipID string, options OrganizationMembershipReadOptions) (*OrganizationMembership, error)

ReadWithOptions mocks base method.

type MockOrganizationMembershipsMockRecorder added in v0.20.0

type MockOrganizationMembershipsMockRecorder struct {
	// contains filtered or unexported fields
}

MockOrganizationMembershipsMockRecorder is the mock recorder for MockOrganizationMemberships.

func (*MockOrganizationMembershipsMockRecorder) Create added in v0.20.0

func (mr *MockOrganizationMembershipsMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockOrganizationMembershipsMockRecorder) Delete added in v0.20.0

func (mr *MockOrganizationMembershipsMockRecorder) Delete(ctx, organizationMembershipID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockOrganizationMembershipsMockRecorder) List added in v0.20.0

func (mr *MockOrganizationMembershipsMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockOrganizationMembershipsMockRecorder) Read added in v0.20.0

func (mr *MockOrganizationMembershipsMockRecorder) Read(ctx, organizationMembershipID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockOrganizationMembershipsMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockOrganizationMembershipsMockRecorder) ReadWithOptions(ctx, organizationMembershipID, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

type MockOrganizationTokens added in v0.20.0

type MockOrganizationTokens struct {
	// contains filtered or unexported fields
}

MockOrganizationTokens is a mock of OrganizationTokens interface.

func NewMockOrganizationTokens added in v0.20.0

func NewMockOrganizationTokens(ctrl *gomock.Controller) *MockOrganizationTokens

NewMockOrganizationTokens creates a new mock instance.

func (*MockOrganizationTokens) Delete added in v0.20.0

func (m *MockOrganizationTokens) Delete(ctx context.Context, organization string) error

Delete mocks base method.

func (*MockOrganizationTokens) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOrganizationTokens) Generate added in v0.20.0

func (m *MockOrganizationTokens) Generate(ctx context.Context, organization string) (*OrganizationToken, error)

Generate mocks base method.

func (*MockOrganizationTokens) Read added in v0.20.0

func (m *MockOrganizationTokens) Read(ctx context.Context, organization string) (*OrganizationToken, error)

Read mocks base method.

type MockOrganizationTokensMockRecorder added in v0.20.0

type MockOrganizationTokensMockRecorder struct {
	// contains filtered or unexported fields
}

MockOrganizationTokensMockRecorder is the mock recorder for MockOrganizationTokens.

func (*MockOrganizationTokensMockRecorder) Delete added in v0.20.0

func (mr *MockOrganizationTokensMockRecorder) Delete(ctx, organization interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockOrganizationTokensMockRecorder) Generate added in v0.20.0

func (mr *MockOrganizationTokensMockRecorder) Generate(ctx, organization interface{}) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockOrganizationTokensMockRecorder) Read added in v0.20.0

func (mr *MockOrganizationTokensMockRecorder) Read(ctx, organization interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockOrganizations added in v0.20.0

type MockOrganizations struct {
	// contains filtered or unexported fields
}

MockOrganizations is a mock of Organizations interface.

func NewMockOrganizations added in v0.20.0

func NewMockOrganizations(ctrl *gomock.Controller) *MockOrganizations

NewMockOrganizations creates a new mock instance.

func (*MockOrganizations) Capacity added in v0.20.0

func (m *MockOrganizations) Capacity(ctx context.Context, organization string) (*Capacity, error)

Capacity mocks base method.

func (*MockOrganizations) Create added in v0.20.0

Create mocks base method.

func (*MockOrganizations) Delete added in v0.20.0

func (m *MockOrganizations) Delete(ctx context.Context, organization string) error

Delete mocks base method.

func (*MockOrganizations) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOrganizations) Entitlements added in v0.20.0

func (m *MockOrganizations) Entitlements(ctx context.Context, organization string) (*Entitlements, error)

Entitlements mocks base method.

func (*MockOrganizations) List added in v0.20.0

List mocks base method.

func (*MockOrganizations) Read added in v0.20.0

func (m *MockOrganizations) Read(ctx context.Context, organization string) (*Organization, error)

Read mocks base method.

func (*MockOrganizations) RunQueue added in v0.20.0

func (m *MockOrganizations) RunQueue(ctx context.Context, organization string, options RunQueueOptions) (*RunQueue, error)

RunQueue mocks base method.

func (*MockOrganizations) Update added in v0.20.0

func (m *MockOrganizations) Update(ctx context.Context, organization string, options OrganizationUpdateOptions) (*Organization, error)

Update mocks base method.

type MockOrganizationsMockRecorder added in v0.20.0

type MockOrganizationsMockRecorder struct {
	// contains filtered or unexported fields
}

MockOrganizationsMockRecorder is the mock recorder for MockOrganizations.

func (*MockOrganizationsMockRecorder) Capacity added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Capacity(ctx, organization interface{}) *gomock.Call

Capacity indicates an expected call of Capacity.

func (*MockOrganizationsMockRecorder) Create added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Create(ctx, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockOrganizationsMockRecorder) Delete added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Delete(ctx, organization interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockOrganizationsMockRecorder) Entitlements added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Entitlements(ctx, organization interface{}) *gomock.Call

Entitlements indicates an expected call of Entitlements.

func (*MockOrganizationsMockRecorder) List added in v0.20.0

func (mr *MockOrganizationsMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockOrganizationsMockRecorder) Read added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Read(ctx, organization interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockOrganizationsMockRecorder) RunQueue added in v0.20.0

func (mr *MockOrganizationsMockRecorder) RunQueue(ctx, organization, options interface{}) *gomock.Call

RunQueue indicates an expected call of RunQueue.

func (*MockOrganizationsMockRecorder) Update added in v0.20.0

func (mr *MockOrganizationsMockRecorder) Update(ctx, organization, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockPlanExports added in v0.20.0

type MockPlanExports struct {
	// contains filtered or unexported fields
}

MockPlanExports is a mock of PlanExports interface.

func NewMockPlanExports added in v0.20.0

func NewMockPlanExports(ctrl *gomock.Controller) *MockPlanExports

NewMockPlanExports creates a new mock instance.

func (*MockPlanExports) Create added in v0.20.0

Create mocks base method.

func (*MockPlanExports) Delete added in v0.20.0

func (m *MockPlanExports) Delete(ctx context.Context, planExportID string) error

Delete mocks base method.

func (*MockPlanExports) Download added in v0.20.0

func (m *MockPlanExports) Download(ctx context.Context, planExportID string) ([]byte, error)

Download mocks base method.

func (*MockPlanExports) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPlanExports) Read added in v0.20.0

func (m *MockPlanExports) Read(ctx context.Context, planExportID string) (*PlanExport, error)

Read mocks base method.

type MockPlanExportsMockRecorder added in v0.20.0

type MockPlanExportsMockRecorder struct {
	// contains filtered or unexported fields
}

MockPlanExportsMockRecorder is the mock recorder for MockPlanExports.

func (*MockPlanExportsMockRecorder) Create added in v0.20.0

func (mr *MockPlanExportsMockRecorder) Create(ctx, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPlanExportsMockRecorder) Delete added in v0.20.0

func (mr *MockPlanExportsMockRecorder) Delete(ctx, planExportID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPlanExportsMockRecorder) Download added in v0.20.0

func (mr *MockPlanExportsMockRecorder) Download(ctx, planExportID interface{}) *gomock.Call

Download indicates an expected call of Download.

func (*MockPlanExportsMockRecorder) Read added in v0.20.0

func (mr *MockPlanExportsMockRecorder) Read(ctx, planExportID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockPlans added in v0.20.0

type MockPlans struct {
	// contains filtered or unexported fields
}

MockPlans is a mock of Plans interface.

func NewMockPlans added in v0.20.0

func NewMockPlans(ctrl *gomock.Controller) *MockPlans

NewMockPlans creates a new mock instance.

func (*MockPlans) EXPECT added in v0.20.0

func (m *MockPlans) EXPECT() *MockPlansMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPlans) JSONOutput added in v0.20.0

func (m *MockPlans) JSONOutput(ctx context.Context, planID string) ([]byte, error)

JSONOutput mocks base method.

func (*MockPlans) Logs added in v0.20.0

func (m *MockPlans) Logs(ctx context.Context, planID string) (io.Reader, error)

Logs mocks base method.

func (*MockPlans) Read added in v0.20.0

func (m *MockPlans) Read(ctx context.Context, planID string) (*Plan, error)

Read mocks base method.

type MockPlansMockRecorder added in v0.20.0

type MockPlansMockRecorder struct {
	// contains filtered or unexported fields
}

MockPlansMockRecorder is the mock recorder for MockPlans.

func (*MockPlansMockRecorder) JSONOutput added in v0.20.0

func (mr *MockPlansMockRecorder) JSONOutput(ctx, planID interface{}) *gomock.Call

JSONOutput indicates an expected call of JSONOutput.

func (*MockPlansMockRecorder) Logs added in v0.20.0

func (mr *MockPlansMockRecorder) Logs(ctx, planID interface{}) *gomock.Call

Logs indicates an expected call of Logs.

func (*MockPlansMockRecorder) Read added in v0.20.0

func (mr *MockPlansMockRecorder) Read(ctx, planID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockPolicies added in v0.20.0

type MockPolicies struct {
	// contains filtered or unexported fields
}

MockPolicies is a mock of Policies interface.

func NewMockPolicies added in v0.20.0

func NewMockPolicies(ctrl *gomock.Controller) *MockPolicies

NewMockPolicies creates a new mock instance.

func (*MockPolicies) Create added in v0.20.0

func (m *MockPolicies) Create(ctx context.Context, organization string, options PolicyCreateOptions) (*Policy, error)

Create mocks base method.

func (*MockPolicies) Delete added in v0.20.0

func (m *MockPolicies) Delete(ctx context.Context, policyID string) error

Delete mocks base method.

func (*MockPolicies) Download added in v0.20.0

func (m *MockPolicies) Download(ctx context.Context, policyID string) ([]byte, error)

Download mocks base method.

func (*MockPolicies) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPolicies) List added in v0.20.0

func (m *MockPolicies) List(ctx context.Context, organization string, options PolicyListOptions) (*PolicyList, error)

List mocks base method.

func (*MockPolicies) Read added in v0.20.0

func (m *MockPolicies) Read(ctx context.Context, policyID string) (*Policy, error)

Read mocks base method.

func (*MockPolicies) Update added in v0.20.0

func (m *MockPolicies) Update(ctx context.Context, policyID string, options PolicyUpdateOptions) (*Policy, error)

Update mocks base method.

func (*MockPolicies) Upload added in v0.20.0

func (m *MockPolicies) Upload(ctx context.Context, policyID string, content []byte) error

Upload mocks base method.

type MockPoliciesMockRecorder added in v0.20.0

type MockPoliciesMockRecorder struct {
	// contains filtered or unexported fields
}

MockPoliciesMockRecorder is the mock recorder for MockPolicies.

func (*MockPoliciesMockRecorder) Create added in v0.20.0

func (mr *MockPoliciesMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPoliciesMockRecorder) Delete added in v0.20.0

func (mr *MockPoliciesMockRecorder) Delete(ctx, policyID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPoliciesMockRecorder) Download added in v0.20.0

func (mr *MockPoliciesMockRecorder) Download(ctx, policyID interface{}) *gomock.Call

Download indicates an expected call of Download.

func (*MockPoliciesMockRecorder) List added in v0.20.0

func (mr *MockPoliciesMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockPoliciesMockRecorder) Read added in v0.20.0

func (mr *MockPoliciesMockRecorder) Read(ctx, policyID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockPoliciesMockRecorder) Update added in v0.20.0

func (mr *MockPoliciesMockRecorder) Update(ctx, policyID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockPoliciesMockRecorder) Upload added in v0.20.0

func (mr *MockPoliciesMockRecorder) Upload(ctx, policyID, content interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockPolicyChecks added in v0.20.0

type MockPolicyChecks struct {
	// contains filtered or unexported fields
}

MockPolicyChecks is a mock of PolicyChecks interface.

func NewMockPolicyChecks added in v0.20.0

func NewMockPolicyChecks(ctrl *gomock.Controller) *MockPolicyChecks

NewMockPolicyChecks creates a new mock instance.

func (*MockPolicyChecks) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPolicyChecks) List added in v0.20.0

List mocks base method.

func (*MockPolicyChecks) Logs added in v0.20.0

func (m *MockPolicyChecks) Logs(ctx context.Context, policyCheckID string) (io.Reader, error)

Logs mocks base method.

func (*MockPolicyChecks) Override added in v0.20.0

func (m *MockPolicyChecks) Override(ctx context.Context, policyCheckID string) (*PolicyCheck, error)

Override mocks base method.

func (*MockPolicyChecks) Read added in v0.20.0

func (m *MockPolicyChecks) Read(ctx context.Context, policyCheckID string) (*PolicyCheck, error)

Read mocks base method.

type MockPolicyChecksMockRecorder added in v0.20.0

type MockPolicyChecksMockRecorder struct {
	// contains filtered or unexported fields
}

MockPolicyChecksMockRecorder is the mock recorder for MockPolicyChecks.

func (*MockPolicyChecksMockRecorder) List added in v0.20.0

func (mr *MockPolicyChecksMockRecorder) List(ctx, runID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockPolicyChecksMockRecorder) Logs added in v0.20.0

func (mr *MockPolicyChecksMockRecorder) Logs(ctx, policyCheckID interface{}) *gomock.Call

Logs indicates an expected call of Logs.

func (*MockPolicyChecksMockRecorder) Override added in v0.20.0

func (mr *MockPolicyChecksMockRecorder) Override(ctx, policyCheckID interface{}) *gomock.Call

Override indicates an expected call of Override.

func (*MockPolicyChecksMockRecorder) Read added in v0.20.0

func (mr *MockPolicyChecksMockRecorder) Read(ctx, policyCheckID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockPolicySetParameters added in v0.20.0

type MockPolicySetParameters struct {
	// contains filtered or unexported fields
}

MockPolicySetParameters is a mock of PolicySetParameters interface.

func NewMockPolicySetParameters added in v0.20.0

func NewMockPolicySetParameters(ctrl *gomock.Controller) *MockPolicySetParameters

NewMockPolicySetParameters creates a new mock instance.

func (*MockPolicySetParameters) Create added in v0.20.0

Create mocks base method.

func (*MockPolicySetParameters) Delete added in v0.20.0

func (m *MockPolicySetParameters) Delete(ctx context.Context, policySetID, parameterID string) error

Delete mocks base method.

func (*MockPolicySetParameters) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPolicySetParameters) List added in v0.20.0

List mocks base method.

func (*MockPolicySetParameters) Read added in v0.20.0

func (m *MockPolicySetParameters) Read(ctx context.Context, policySetID, parameterID string) (*PolicySetParameter, error)

Read mocks base method.

func (*MockPolicySetParameters) Update added in v0.20.0

func (m *MockPolicySetParameters) Update(ctx context.Context, policySetID, parameterID string, options PolicySetParameterUpdateOptions) (*PolicySetParameter, error)

Update mocks base method.

type MockPolicySetParametersMockRecorder added in v0.20.0

type MockPolicySetParametersMockRecorder struct {
	// contains filtered or unexported fields
}

MockPolicySetParametersMockRecorder is the mock recorder for MockPolicySetParameters.

func (*MockPolicySetParametersMockRecorder) Create added in v0.20.0

func (mr *MockPolicySetParametersMockRecorder) Create(ctx, policySetID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPolicySetParametersMockRecorder) Delete added in v0.20.0

func (mr *MockPolicySetParametersMockRecorder) Delete(ctx, policySetID, parameterID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPolicySetParametersMockRecorder) List added in v0.20.0

func (mr *MockPolicySetParametersMockRecorder) List(ctx, policySetID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockPolicySetParametersMockRecorder) Read added in v0.20.0

func (mr *MockPolicySetParametersMockRecorder) Read(ctx, policySetID, parameterID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockPolicySetParametersMockRecorder) Update added in v0.20.0

func (mr *MockPolicySetParametersMockRecorder) Update(ctx, policySetID, parameterID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockPolicySetVersions added in v0.20.0

type MockPolicySetVersions struct {
	// contains filtered or unexported fields
}

MockPolicySetVersions is a mock of PolicySetVersions interface.

func NewMockPolicySetVersions added in v0.20.0

func NewMockPolicySetVersions(ctrl *gomock.Controller) *MockPolicySetVersions

NewMockPolicySetVersions creates a new mock instance.

func (*MockPolicySetVersions) Create added in v0.20.0

func (m *MockPolicySetVersions) Create(ctx context.Context, policySetID string) (*PolicySetVersion, error)

Create mocks base method.

func (*MockPolicySetVersions) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPolicySetVersions) Read added in v0.20.0

func (m *MockPolicySetVersions) Read(ctx context.Context, policySetVersionID string) (*PolicySetVersion, error)

Read mocks base method.

func (*MockPolicySetVersions) Upload added in v0.20.0

Upload mocks base method.

type MockPolicySetVersionsMockRecorder added in v0.20.0

type MockPolicySetVersionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockPolicySetVersionsMockRecorder is the mock recorder for MockPolicySetVersions.

func (*MockPolicySetVersionsMockRecorder) Create added in v0.20.0

func (mr *MockPolicySetVersionsMockRecorder) Create(ctx, policySetID interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPolicySetVersionsMockRecorder) Read added in v0.20.0

func (mr *MockPolicySetVersionsMockRecorder) Read(ctx, policySetVersionID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockPolicySetVersionsMockRecorder) Upload added in v0.20.0

func (mr *MockPolicySetVersionsMockRecorder) Upload(ctx, psv, path interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockPolicySets added in v0.20.0

type MockPolicySets struct {
	// contains filtered or unexported fields
}

MockPolicySets is a mock of PolicySets interface.

func NewMockPolicySets added in v0.20.0

func NewMockPolicySets(ctrl *gomock.Controller) *MockPolicySets

NewMockPolicySets creates a new mock instance.

func (*MockPolicySets) AddPolicies added in v0.20.0

func (m *MockPolicySets) AddPolicies(ctx context.Context, policySetID string, options PolicySetAddPoliciesOptions) error

AddPolicies mocks base method.

func (*MockPolicySets) AddWorkspaces added in v0.20.0

func (m *MockPolicySets) AddWorkspaces(ctx context.Context, policySetID string, options PolicySetAddWorkspacesOptions) error

AddWorkspaces mocks base method.

func (*MockPolicySets) Create added in v0.20.0

func (m *MockPolicySets) Create(ctx context.Context, organization string, options PolicySetCreateOptions) (*PolicySet, error)

Create mocks base method.

func (*MockPolicySets) Delete added in v0.20.0

func (m *MockPolicySets) Delete(ctx context.Context, policyID string) error

Delete mocks base method.

func (*MockPolicySets) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPolicySets) List added in v0.20.0

func (m *MockPolicySets) List(ctx context.Context, organization string, options PolicySetListOptions) (*PolicySetList, error)

List mocks base method.

func (*MockPolicySets) Read added in v0.20.0

func (m *MockPolicySets) Read(ctx context.Context, policySetID string) (*PolicySet, error)

Read mocks base method.

func (*MockPolicySets) ReadWithOptions added in v0.20.0

func (m *MockPolicySets) ReadWithOptions(ctx context.Context, policySetID string, options *PolicySetReadOptions) (*PolicySet, error)

ReadWithOptions mocks base method.

func (*MockPolicySets) RemovePolicies added in v0.20.0

func (m *MockPolicySets) RemovePolicies(ctx context.Context, policySetID string, options PolicySetRemovePoliciesOptions) error

RemovePolicies mocks base method.

func (*MockPolicySets) RemoveWorkspaces added in v0.20.0

func (m *MockPolicySets) RemoveWorkspaces(ctx context.Context, policySetID string, options PolicySetRemoveWorkspacesOptions) error

RemoveWorkspaces mocks base method.

func (*MockPolicySets) Update added in v0.20.0

func (m *MockPolicySets) Update(ctx context.Context, policySetID string, options PolicySetUpdateOptions) (*PolicySet, error)

Update mocks base method.

type MockPolicySetsMockRecorder added in v0.20.0

type MockPolicySetsMockRecorder struct {
	// contains filtered or unexported fields
}

MockPolicySetsMockRecorder is the mock recorder for MockPolicySets.

func (*MockPolicySetsMockRecorder) AddPolicies added in v0.20.0

func (mr *MockPolicySetsMockRecorder) AddPolicies(ctx, policySetID, options interface{}) *gomock.Call

AddPolicies indicates an expected call of AddPolicies.

func (*MockPolicySetsMockRecorder) AddWorkspaces added in v0.20.0

func (mr *MockPolicySetsMockRecorder) AddWorkspaces(ctx, policySetID, options interface{}) *gomock.Call

AddWorkspaces indicates an expected call of AddWorkspaces.

func (*MockPolicySetsMockRecorder) Create added in v0.20.0

func (mr *MockPolicySetsMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPolicySetsMockRecorder) Delete added in v0.20.0

func (mr *MockPolicySetsMockRecorder) Delete(ctx, policyID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPolicySetsMockRecorder) List added in v0.20.0

func (mr *MockPolicySetsMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockPolicySetsMockRecorder) Read added in v0.20.0

func (mr *MockPolicySetsMockRecorder) Read(ctx, policySetID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockPolicySetsMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockPolicySetsMockRecorder) ReadWithOptions(ctx, policySetID, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

func (*MockPolicySetsMockRecorder) RemovePolicies added in v0.20.0

func (mr *MockPolicySetsMockRecorder) RemovePolicies(ctx, policySetID, options interface{}) *gomock.Call

RemovePolicies indicates an expected call of RemovePolicies.

func (*MockPolicySetsMockRecorder) RemoveWorkspaces added in v0.20.0

func (mr *MockPolicySetsMockRecorder) RemoveWorkspaces(ctx, policySetID, options interface{}) *gomock.Call

RemoveWorkspaces indicates an expected call of RemoveWorkspaces.

func (*MockPolicySetsMockRecorder) Update added in v0.20.0

func (mr *MockPolicySetsMockRecorder) Update(ctx, policySetID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockRegistryModules added in v0.20.0

type MockRegistryModules struct {
	// contains filtered or unexported fields
}

MockRegistryModules is a mock of RegistryModules interface.

func NewMockRegistryModules added in v0.20.0

func NewMockRegistryModules(ctrl *gomock.Controller) *MockRegistryModules

NewMockRegistryModules creates a new mock instance.

func (*MockRegistryModules) Create added in v0.20.0

func (m *MockRegistryModules) Create(ctx context.Context, organization string, options RegistryModuleCreateOptions) (*RegistryModule, error)

Create mocks base method.

func (*MockRegistryModules) CreateVersion added in v0.20.0

func (m *MockRegistryModules) CreateVersion(ctx context.Context, organization, name, provider string, options RegistryModuleCreateVersionOptions) (*RegistryModuleVersion, error)

CreateVersion mocks base method.

func (*MockRegistryModules) CreateWithVCSConnection added in v0.20.0

CreateWithVCSConnection mocks base method.

func (*MockRegistryModules) Delete added in v0.20.0

func (m *MockRegistryModules) Delete(ctx context.Context, organization, name string) error

Delete mocks base method.

func (*MockRegistryModules) DeleteProvider added in v0.20.0

func (m *MockRegistryModules) DeleteProvider(ctx context.Context, organization, name, provider string) error

DeleteProvider mocks base method.

func (*MockRegistryModules) DeleteVersion added in v0.20.0

func (m *MockRegistryModules) DeleteVersion(ctx context.Context, organization, name, provider, version string) error

DeleteVersion mocks base method.

func (*MockRegistryModules) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRegistryModules) Read added in v0.20.0

func (m *MockRegistryModules) Read(ctx context.Context, organization, name, provider string) (*RegistryModule, error)

Read mocks base method.

func (*MockRegistryModules) Upload added in v0.20.0

Upload mocks base method.

type MockRegistryModulesMockRecorder added in v0.20.0

type MockRegistryModulesMockRecorder struct {
	// contains filtered or unexported fields
}

MockRegistryModulesMockRecorder is the mock recorder for MockRegistryModules.

func (*MockRegistryModulesMockRecorder) Create added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockRegistryModulesMockRecorder) CreateVersion added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) CreateVersion(ctx, organization, name, provider, options interface{}) *gomock.Call

CreateVersion indicates an expected call of CreateVersion.

func (*MockRegistryModulesMockRecorder) CreateWithVCSConnection added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) CreateWithVCSConnection(ctx, options interface{}) *gomock.Call

CreateWithVCSConnection indicates an expected call of CreateWithVCSConnection.

func (*MockRegistryModulesMockRecorder) Delete added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) Delete(ctx, organization, name interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockRegistryModulesMockRecorder) DeleteProvider added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) DeleteProvider(ctx, organization, name, provider interface{}) *gomock.Call

DeleteProvider indicates an expected call of DeleteProvider.

func (*MockRegistryModulesMockRecorder) DeleteVersion added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) DeleteVersion(ctx, organization, name, provider, version interface{}) *gomock.Call

DeleteVersion indicates an expected call of DeleteVersion.

func (*MockRegistryModulesMockRecorder) Read added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) Read(ctx, organization, name, provider interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockRegistryModulesMockRecorder) Upload added in v0.20.0

func (mr *MockRegistryModulesMockRecorder) Upload(ctx, rmv, path interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockRunTriggers added in v0.20.0

type MockRunTriggers struct {
	// contains filtered or unexported fields
}

MockRunTriggers is a mock of RunTriggers interface.

func NewMockRunTriggers added in v0.20.0

func NewMockRunTriggers(ctrl *gomock.Controller) *MockRunTriggers

NewMockRunTriggers creates a new mock instance.

func (*MockRunTriggers) Create added in v0.20.0

func (m *MockRunTriggers) Create(ctx context.Context, workspaceID string, options RunTriggerCreateOptions) (*RunTrigger, error)

Create mocks base method.

func (*MockRunTriggers) Delete added in v0.20.0

func (m *MockRunTriggers) Delete(ctx context.Context, RunTriggerID string) error

Delete mocks base method.

func (*MockRunTriggers) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRunTriggers) List added in v0.20.0

func (m *MockRunTriggers) List(ctx context.Context, workspaceID string, options RunTriggerListOptions) (*RunTriggerList, error)

List mocks base method.

func (*MockRunTriggers) Read added in v0.20.0

func (m *MockRunTriggers) Read(ctx context.Context, RunTriggerID string) (*RunTrigger, error)

Read mocks base method.

type MockRunTriggersMockRecorder added in v0.20.0

type MockRunTriggersMockRecorder struct {
	// contains filtered or unexported fields
}

MockRunTriggersMockRecorder is the mock recorder for MockRunTriggers.

func (*MockRunTriggersMockRecorder) Create added in v0.20.0

func (mr *MockRunTriggersMockRecorder) Create(ctx, workspaceID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockRunTriggersMockRecorder) Delete added in v0.20.0

func (mr *MockRunTriggersMockRecorder) Delete(ctx, RunTriggerID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockRunTriggersMockRecorder) List added in v0.20.0

func (mr *MockRunTriggersMockRecorder) List(ctx, workspaceID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockRunTriggersMockRecorder) Read added in v0.20.0

func (mr *MockRunTriggersMockRecorder) Read(ctx, RunTriggerID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockRuns added in v0.20.0

type MockRuns struct {
	// contains filtered or unexported fields
}

MockRuns is a mock of Runs interface.

func NewMockRuns added in v0.20.0

func NewMockRuns(ctrl *gomock.Controller) *MockRuns

NewMockRuns creates a new mock instance.

func (*MockRuns) Apply added in v0.20.0

func (m *MockRuns) Apply(ctx context.Context, runID string, options RunApplyOptions) error

Apply mocks base method.

func (*MockRuns) Cancel added in v0.20.0

func (m *MockRuns) Cancel(ctx context.Context, runID string, options RunCancelOptions) error

Cancel mocks base method.

func (*MockRuns) Create added in v0.20.0

func (m *MockRuns) Create(ctx context.Context, options RunCreateOptions) (*Run, error)

Create mocks base method.

func (*MockRuns) Discard added in v0.20.0

func (m *MockRuns) Discard(ctx context.Context, runID string, options RunDiscardOptions) error

Discard mocks base method.

func (*MockRuns) EXPECT added in v0.20.0

func (m *MockRuns) EXPECT() *MockRunsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRuns) ForceCancel added in v0.20.0

func (m *MockRuns) ForceCancel(ctx context.Context, runID string, options RunForceCancelOptions) error

ForceCancel mocks base method.

func (*MockRuns) List added in v0.20.0

func (m *MockRuns) List(ctx context.Context, workspaceID string, options RunListOptions) (*RunList, error)

List mocks base method.

func (*MockRuns) Read added in v0.20.0

func (m *MockRuns) Read(ctx context.Context, runID string) (*Run, error)

Read mocks base method.

func (*MockRuns) ReadWithOptions added in v0.20.0

func (m *MockRuns) ReadWithOptions(ctx context.Context, runID string, options *RunReadOptions) (*Run, error)

ReadWithOptions mocks base method.

type MockRunsMockRecorder added in v0.20.0

type MockRunsMockRecorder struct {
	// contains filtered or unexported fields
}

MockRunsMockRecorder is the mock recorder for MockRuns.

func (*MockRunsMockRecorder) Apply added in v0.20.0

func (mr *MockRunsMockRecorder) Apply(ctx, runID, options interface{}) *gomock.Call

Apply indicates an expected call of Apply.

func (*MockRunsMockRecorder) Cancel added in v0.20.0

func (mr *MockRunsMockRecorder) Cancel(ctx, runID, options interface{}) *gomock.Call

Cancel indicates an expected call of Cancel.

func (*MockRunsMockRecorder) Create added in v0.20.0

func (mr *MockRunsMockRecorder) Create(ctx, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockRunsMockRecorder) Discard added in v0.20.0

func (mr *MockRunsMockRecorder) Discard(ctx, runID, options interface{}) *gomock.Call

Discard indicates an expected call of Discard.

func (*MockRunsMockRecorder) ForceCancel added in v0.20.0

func (mr *MockRunsMockRecorder) ForceCancel(ctx, runID, options interface{}) *gomock.Call

ForceCancel indicates an expected call of ForceCancel.

func (*MockRunsMockRecorder) List added in v0.20.0

func (mr *MockRunsMockRecorder) List(ctx, workspaceID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockRunsMockRecorder) Read added in v0.20.0

func (mr *MockRunsMockRecorder) Read(ctx, runID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockRunsMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockRunsMockRecorder) ReadWithOptions(ctx, runID, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

type MockSAMLSettings added in v0.20.0

type MockSAMLSettings struct {
	// contains filtered or unexported fields
}

MockSAMLSettings is a mock of SAMLSettings interface.

func NewMockSAMLSettings added in v0.20.0

func NewMockSAMLSettings(ctrl *gomock.Controller) *MockSAMLSettings

NewMockSAMLSettings creates a new mock instance.

func (*MockSAMLSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSAMLSettings) Read added in v0.20.0

Read mocks base method.

func (*MockSAMLSettings) RevokeIdpCert added in v0.20.0

func (m *MockSAMLSettings) RevokeIdpCert(ctx context.Context) (*AdminSAMLSetting, error)

RevokeIdpCert mocks base method.

func (*MockSAMLSettings) Update added in v0.20.0

Update mocks base method.

type MockSAMLSettingsMockRecorder added in v0.20.0

type MockSAMLSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockSAMLSettingsMockRecorder is the mock recorder for MockSAMLSettings.

func (*MockSAMLSettingsMockRecorder) Read added in v0.20.0

func (mr *MockSAMLSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockSAMLSettingsMockRecorder) RevokeIdpCert added in v0.20.0

func (mr *MockSAMLSettingsMockRecorder) RevokeIdpCert(ctx interface{}) *gomock.Call

RevokeIdpCert indicates an expected call of RevokeIdpCert.

func (*MockSAMLSettingsMockRecorder) Update added in v0.20.0

func (mr *MockSAMLSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockSMTPSettings added in v0.20.0

type MockSMTPSettings struct {
	// contains filtered or unexported fields
}

MockSMTPSettings is a mock of SMTPSettings interface.

func NewMockSMTPSettings added in v0.20.0

func NewMockSMTPSettings(ctrl *gomock.Controller) *MockSMTPSettings

NewMockSMTPSettings creates a new mock instance.

func (*MockSMTPSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSMTPSettings) Read added in v0.20.0

Read mocks base method.

func (*MockSMTPSettings) Update added in v0.20.0

Update mocks base method.

type MockSMTPSettingsMockRecorder added in v0.20.0

type MockSMTPSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockSMTPSettingsMockRecorder is the mock recorder for MockSMTPSettings.

func (*MockSMTPSettingsMockRecorder) Read added in v0.20.0

func (mr *MockSMTPSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockSMTPSettingsMockRecorder) Update added in v0.20.0

func (mr *MockSMTPSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockSSHKeys added in v0.20.0

type MockSSHKeys struct {
	// contains filtered or unexported fields
}

MockSSHKeys is a mock of SSHKeys interface.

func NewMockSSHKeys added in v0.20.0

func NewMockSSHKeys(ctrl *gomock.Controller) *MockSSHKeys

NewMockSSHKeys creates a new mock instance.

func (*MockSSHKeys) Create added in v0.20.0

func (m *MockSSHKeys) Create(ctx context.Context, organization string, options SSHKeyCreateOptions) (*SSHKey, error)

Create mocks base method.

func (*MockSSHKeys) Delete added in v0.20.0

func (m *MockSSHKeys) Delete(ctx context.Context, sshKeyID string) error

Delete mocks base method.

func (*MockSSHKeys) EXPECT added in v0.20.0

func (m *MockSSHKeys) EXPECT() *MockSSHKeysMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSSHKeys) List added in v0.20.0

func (m *MockSSHKeys) List(ctx context.Context, organization string, options SSHKeyListOptions) (*SSHKeyList, error)

List mocks base method.

func (*MockSSHKeys) Read added in v0.20.0

func (m *MockSSHKeys) Read(ctx context.Context, sshKeyID string) (*SSHKey, error)

Read mocks base method.

func (*MockSSHKeys) Update added in v0.20.0

func (m *MockSSHKeys) Update(ctx context.Context, sshKeyID string, options SSHKeyUpdateOptions) (*SSHKey, error)

Update mocks base method.

type MockSSHKeysMockRecorder added in v0.20.0

type MockSSHKeysMockRecorder struct {
	// contains filtered or unexported fields
}

MockSSHKeysMockRecorder is the mock recorder for MockSSHKeys.

func (*MockSSHKeysMockRecorder) Create added in v0.20.0

func (mr *MockSSHKeysMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockSSHKeysMockRecorder) Delete added in v0.20.0

func (mr *MockSSHKeysMockRecorder) Delete(ctx, sshKeyID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockSSHKeysMockRecorder) List added in v0.20.0

func (mr *MockSSHKeysMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockSSHKeysMockRecorder) Read added in v0.20.0

func (mr *MockSSHKeysMockRecorder) Read(ctx, sshKeyID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockSSHKeysMockRecorder) Update added in v0.20.0

func (mr *MockSSHKeysMockRecorder) Update(ctx, sshKeyID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockStateVersionOutputs added in v0.20.0

type MockStateVersionOutputs struct {
	// contains filtered or unexported fields
}

MockStateVersionOutputs is a mock of StateVersionOutputs interface.

func NewMockStateVersionOutputs added in v0.20.0

func NewMockStateVersionOutputs(ctrl *gomock.Controller) *MockStateVersionOutputs

NewMockStateVersionOutputs creates a new mock instance.

func (*MockStateVersionOutputs) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStateVersionOutputs) Read added in v0.20.0

Read mocks base method.

type MockStateVersionOutputsMockRecorder added in v0.20.0

type MockStateVersionOutputsMockRecorder struct {
	// contains filtered or unexported fields
}

MockStateVersionOutputsMockRecorder is the mock recorder for MockStateVersionOutputs.

func (*MockStateVersionOutputsMockRecorder) Read added in v0.20.0

func (mr *MockStateVersionOutputsMockRecorder) Read(ctx, outputID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockStateVersions added in v0.20.0

type MockStateVersions struct {
	// contains filtered or unexported fields
}

MockStateVersions is a mock of StateVersions interface.

func NewMockStateVersions added in v0.20.0

func NewMockStateVersions(ctrl *gomock.Controller) *MockStateVersions

NewMockStateVersions creates a new mock instance.

func (*MockStateVersions) Create added in v0.20.0

func (m *MockStateVersions) Create(ctx context.Context, workspaceID string, options StateVersionCreateOptions) (*StateVersion, error)

Create mocks base method.

func (*MockStateVersions) Current added in v0.20.0

func (m *MockStateVersions) Current(ctx context.Context, workspaceID string) (*StateVersion, error)

Current mocks base method.

func (*MockStateVersions) CurrentWithOptions added in v0.20.0

func (m *MockStateVersions) CurrentWithOptions(ctx context.Context, workspaceID string, options *StateVersionCurrentOptions) (*StateVersion, error)

CurrentWithOptions mocks base method.

func (*MockStateVersions) Download added in v0.20.0

func (m *MockStateVersions) Download(ctx context.Context, url string) ([]byte, error)

Download mocks base method.

func (*MockStateVersions) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStateVersions) List added in v0.20.0

List mocks base method.

func (*MockStateVersions) Outputs added in v0.20.0

Outputs mocks base method.

func (*MockStateVersions) Read added in v0.20.0

func (m *MockStateVersions) Read(ctx context.Context, svID string) (*StateVersion, error)

Read mocks base method.

func (*MockStateVersions) ReadWithOptions added in v0.20.0

func (m *MockStateVersions) ReadWithOptions(ctx context.Context, svID string, options *StateVersionReadOptions) (*StateVersion, error)

ReadWithOptions mocks base method.

type MockStateVersionsMockRecorder added in v0.20.0

type MockStateVersionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockStateVersionsMockRecorder is the mock recorder for MockStateVersions.

func (*MockStateVersionsMockRecorder) Create added in v0.20.0

func (mr *MockStateVersionsMockRecorder) Create(ctx, workspaceID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockStateVersionsMockRecorder) Current added in v0.20.0

func (mr *MockStateVersionsMockRecorder) Current(ctx, workspaceID interface{}) *gomock.Call

Current indicates an expected call of Current.

func (*MockStateVersionsMockRecorder) CurrentWithOptions added in v0.20.0

func (mr *MockStateVersionsMockRecorder) CurrentWithOptions(ctx, workspaceID, options interface{}) *gomock.Call

CurrentWithOptions indicates an expected call of CurrentWithOptions.

func (*MockStateVersionsMockRecorder) Download added in v0.20.0

func (mr *MockStateVersionsMockRecorder) Download(ctx, url interface{}) *gomock.Call

Download indicates an expected call of Download.

func (*MockStateVersionsMockRecorder) List added in v0.20.0

func (mr *MockStateVersionsMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockStateVersionsMockRecorder) Outputs added in v0.20.0

func (mr *MockStateVersionsMockRecorder) Outputs(ctx, svID, options interface{}) *gomock.Call

Outputs indicates an expected call of Outputs.

func (*MockStateVersionsMockRecorder) Read added in v0.20.0

func (mr *MockStateVersionsMockRecorder) Read(ctx, svID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockStateVersionsMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockStateVersionsMockRecorder) ReadWithOptions(ctx, svID, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

type MockTeamAccesses added in v0.20.0

type MockTeamAccesses struct {
	// contains filtered or unexported fields
}

MockTeamAccesses is a mock of TeamAccesses interface.

func NewMockTeamAccesses added in v0.20.0

func NewMockTeamAccesses(ctrl *gomock.Controller) *MockTeamAccesses

NewMockTeamAccesses creates a new mock instance.

func (*MockTeamAccesses) Add added in v0.20.0

Add mocks base method.

func (*MockTeamAccesses) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTeamAccesses) List added in v0.20.0

List mocks base method.

func (*MockTeamAccesses) Read added in v0.20.0

func (m *MockTeamAccesses) Read(ctx context.Context, teamAccessID string) (*TeamAccess, error)

Read mocks base method.

func (*MockTeamAccesses) Remove added in v0.20.0

func (m *MockTeamAccesses) Remove(ctx context.Context, teamAccessID string) error

Remove mocks base method.

func (*MockTeamAccesses) Update added in v0.20.0

func (m *MockTeamAccesses) Update(ctx context.Context, teamAccessID string, options TeamAccessUpdateOptions) (*TeamAccess, error)

Update mocks base method.

type MockTeamAccessesMockRecorder added in v0.20.0

type MockTeamAccessesMockRecorder struct {
	// contains filtered or unexported fields
}

MockTeamAccessesMockRecorder is the mock recorder for MockTeamAccesses.

func (*MockTeamAccessesMockRecorder) Add added in v0.20.0

func (mr *MockTeamAccessesMockRecorder) Add(ctx, options interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockTeamAccessesMockRecorder) List added in v0.20.0

func (mr *MockTeamAccessesMockRecorder) List(ctx, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockTeamAccessesMockRecorder) Read added in v0.20.0

func (mr *MockTeamAccessesMockRecorder) Read(ctx, teamAccessID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockTeamAccessesMockRecorder) Remove added in v0.20.0

func (mr *MockTeamAccessesMockRecorder) Remove(ctx, teamAccessID interface{}) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockTeamAccessesMockRecorder) Update added in v0.20.0

func (mr *MockTeamAccessesMockRecorder) Update(ctx, teamAccessID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockTeamMembers added in v0.20.0

type MockTeamMembers struct {
	// contains filtered or unexported fields
}

MockTeamMembers is a mock of TeamMembers interface.

func NewMockTeamMembers added in v0.20.0

func NewMockTeamMembers(ctrl *gomock.Controller) *MockTeamMembers

NewMockTeamMembers creates a new mock instance.

func (*MockTeamMembers) Add added in v0.20.0

func (m *MockTeamMembers) Add(ctx context.Context, teamID string, options TeamMemberAddOptions) error

Add mocks base method.

func (*MockTeamMembers) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTeamMembers) List added in v0.20.0

func (m *MockTeamMembers) List(ctx context.Context, teamID string) ([]*User, error)

List mocks base method.

func (*MockTeamMembers) ListOrganizationMemberships added in v0.20.0

func (m *MockTeamMembers) ListOrganizationMemberships(ctx context.Context, teamID string) ([]*OrganizationMembership, error)

ListOrganizationMemberships mocks base method.

func (*MockTeamMembers) ListUsers added in v0.20.0

func (m *MockTeamMembers) ListUsers(ctx context.Context, teamID string) ([]*User, error)

ListUsers mocks base method.

func (*MockTeamMembers) Remove added in v0.20.0

func (m *MockTeamMembers) Remove(ctx context.Context, teamID string, options TeamMemberRemoveOptions) error

Remove mocks base method.

type MockTeamMembersMockRecorder added in v0.20.0

type MockTeamMembersMockRecorder struct {
	// contains filtered or unexported fields
}

MockTeamMembersMockRecorder is the mock recorder for MockTeamMembers.

func (*MockTeamMembersMockRecorder) Add added in v0.20.0

func (mr *MockTeamMembersMockRecorder) Add(ctx, teamID, options interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockTeamMembersMockRecorder) List added in v0.20.0

func (mr *MockTeamMembersMockRecorder) List(ctx, teamID interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockTeamMembersMockRecorder) ListOrganizationMemberships added in v0.20.0

func (mr *MockTeamMembersMockRecorder) ListOrganizationMemberships(ctx, teamID interface{}) *gomock.Call

ListOrganizationMemberships indicates an expected call of ListOrganizationMemberships.

func (*MockTeamMembersMockRecorder) ListUsers added in v0.20.0

func (mr *MockTeamMembersMockRecorder) ListUsers(ctx, teamID interface{}) *gomock.Call

ListUsers indicates an expected call of ListUsers.

func (*MockTeamMembersMockRecorder) Remove added in v0.20.0

func (mr *MockTeamMembersMockRecorder) Remove(ctx, teamID, options interface{}) *gomock.Call

Remove indicates an expected call of Remove.

type MockTeamTokens added in v0.20.0

type MockTeamTokens struct {
	// contains filtered or unexported fields
}

MockTeamTokens is a mock of TeamTokens interface.

func NewMockTeamTokens added in v0.20.0

func NewMockTeamTokens(ctrl *gomock.Controller) *MockTeamTokens

NewMockTeamTokens creates a new mock instance.

func (*MockTeamTokens) Delete added in v0.20.0

func (m *MockTeamTokens) Delete(ctx context.Context, teamID string) error

Delete mocks base method.

func (*MockTeamTokens) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTeamTokens) Generate added in v0.20.0

func (m *MockTeamTokens) Generate(ctx context.Context, teamID string) (*TeamToken, error)

Generate mocks base method.

func (*MockTeamTokens) Read added in v0.20.0

func (m *MockTeamTokens) Read(ctx context.Context, teamID string) (*TeamToken, error)

Read mocks base method.

type MockTeamTokensMockRecorder added in v0.20.0

type MockTeamTokensMockRecorder struct {
	// contains filtered or unexported fields
}

MockTeamTokensMockRecorder is the mock recorder for MockTeamTokens.

func (*MockTeamTokensMockRecorder) Delete added in v0.20.0

func (mr *MockTeamTokensMockRecorder) Delete(ctx, teamID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockTeamTokensMockRecorder) Generate added in v0.20.0

func (mr *MockTeamTokensMockRecorder) Generate(ctx, teamID interface{}) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockTeamTokensMockRecorder) Read added in v0.20.0

func (mr *MockTeamTokensMockRecorder) Read(ctx, teamID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockTeams added in v0.20.0

type MockTeams struct {
	// contains filtered or unexported fields
}

MockTeams is a mock of Teams interface.

func NewMockTeams added in v0.20.0

func NewMockTeams(ctrl *gomock.Controller) *MockTeams

NewMockTeams creates a new mock instance.

func (*MockTeams) Create added in v0.20.0

func (m *MockTeams) Create(ctx context.Context, organization string, options TeamCreateOptions) (*Team, error)

Create mocks base method.

func (*MockTeams) Delete added in v0.20.0

func (m *MockTeams) Delete(ctx context.Context, teamID string) error

Delete mocks base method.

func (*MockTeams) EXPECT added in v0.20.0

func (m *MockTeams) EXPECT() *MockTeamsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTeams) List added in v0.20.0

func (m *MockTeams) List(ctx context.Context, organization string, options TeamListOptions) (*TeamList, error)

List mocks base method.

func (*MockTeams) Read added in v0.20.0

func (m *MockTeams) Read(ctx context.Context, teamID string) (*Team, error)

Read mocks base method.

func (*MockTeams) Update added in v0.20.0

func (m *MockTeams) Update(ctx context.Context, teamID string, options TeamUpdateOptions) (*Team, error)

Update mocks base method.

type MockTeamsMockRecorder added in v0.20.0

type MockTeamsMockRecorder struct {
	// contains filtered or unexported fields
}

MockTeamsMockRecorder is the mock recorder for MockTeams.

func (*MockTeamsMockRecorder) Create added in v0.20.0

func (mr *MockTeamsMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockTeamsMockRecorder) Delete added in v0.20.0

func (mr *MockTeamsMockRecorder) Delete(ctx, teamID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockTeamsMockRecorder) List added in v0.20.0

func (mr *MockTeamsMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockTeamsMockRecorder) Read added in v0.20.0

func (mr *MockTeamsMockRecorder) Read(ctx, teamID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockTeamsMockRecorder) Update added in v0.20.0

func (mr *MockTeamsMockRecorder) Update(ctx, teamID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockTwilioSettings added in v0.20.0

type MockTwilioSettings struct {
	// contains filtered or unexported fields
}

MockTwilioSettings is a mock of TwilioSettings interface.

func NewMockTwilioSettings added in v0.20.0

func NewMockTwilioSettings(ctrl *gomock.Controller) *MockTwilioSettings

NewMockTwilioSettings creates a new mock instance.

func (*MockTwilioSettings) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTwilioSettings) Read added in v0.20.0

Read mocks base method.

func (*MockTwilioSettings) Update added in v0.20.0

Update mocks base method.

func (*MockTwilioSettings) Verify added in v0.20.0

Verify mocks base method.

type MockTwilioSettingsMockRecorder added in v0.20.0

type MockTwilioSettingsMockRecorder struct {
	// contains filtered or unexported fields
}

MockTwilioSettingsMockRecorder is the mock recorder for MockTwilioSettings.

func (*MockTwilioSettingsMockRecorder) Read added in v0.20.0

func (mr *MockTwilioSettingsMockRecorder) Read(ctx interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockTwilioSettingsMockRecorder) Update added in v0.20.0

func (mr *MockTwilioSettingsMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockTwilioSettingsMockRecorder) Verify added in v0.20.0

func (mr *MockTwilioSettingsMockRecorder) Verify(ctx, options interface{}) *gomock.Call

Verify indicates an expected call of Verify.

type MockUserTokens added in v0.20.0

type MockUserTokens struct {
	// contains filtered or unexported fields
}

MockUserTokens is a mock of UserTokens interface.

func NewMockUserTokens added in v0.20.0

func NewMockUserTokens(ctrl *gomock.Controller) *MockUserTokens

NewMockUserTokens creates a new mock instance.

func (*MockUserTokens) Delete added in v0.20.0

func (m *MockUserTokens) Delete(ctx context.Context, tokenID string) error

Delete mocks base method.

func (*MockUserTokens) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserTokens) Generate added in v0.20.0

func (m *MockUserTokens) Generate(ctx context.Context, userID string, options UserTokenGenerateOptions) (*UserToken, error)

Generate mocks base method.

func (*MockUserTokens) List added in v0.20.0

func (m *MockUserTokens) List(ctx context.Context, userID string) (*UserTokenList, error)

List mocks base method.

func (*MockUserTokens) Read added in v0.20.0

func (m *MockUserTokens) Read(ctx context.Context, tokenID string) (*UserToken, error)

Read mocks base method.

type MockUserTokensMockRecorder added in v0.20.0

type MockUserTokensMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserTokensMockRecorder is the mock recorder for MockUserTokens.

func (*MockUserTokensMockRecorder) Delete added in v0.20.0

func (mr *MockUserTokensMockRecorder) Delete(ctx, tokenID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserTokensMockRecorder) Generate added in v0.20.0

func (mr *MockUserTokensMockRecorder) Generate(ctx, userID, options interface{}) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockUserTokensMockRecorder) List added in v0.20.0

func (mr *MockUserTokensMockRecorder) List(ctx, userID interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockUserTokensMockRecorder) Read added in v0.20.0

func (mr *MockUserTokensMockRecorder) Read(ctx, tokenID interface{}) *gomock.Call

Read indicates an expected call of Read.

type MockUsers added in v0.20.0

type MockUsers struct {
	// contains filtered or unexported fields
}

MockUsers is a mock of Users interface.

func NewMockUsers added in v0.20.0

func NewMockUsers(ctrl *gomock.Controller) *MockUsers

NewMockUsers creates a new mock instance.

func (*MockUsers) EXPECT added in v0.20.0

func (m *MockUsers) EXPECT() *MockUsersMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUsers) ReadCurrent added in v0.20.0

func (m *MockUsers) ReadCurrent(ctx context.Context) (*User, error)

ReadCurrent mocks base method.

func (*MockUsers) Update added in v0.20.0

func (m *MockUsers) Update(ctx context.Context, options UserUpdateOptions) (*User, error)

Update mocks base method.

type MockUsersMockRecorder added in v0.20.0

type MockUsersMockRecorder struct {
	// contains filtered or unexported fields
}

MockUsersMockRecorder is the mock recorder for MockUsers.

func (*MockUsersMockRecorder) ReadCurrent added in v0.20.0

func (mr *MockUsersMockRecorder) ReadCurrent(ctx interface{}) *gomock.Call

ReadCurrent indicates an expected call of ReadCurrent.

func (*MockUsersMockRecorder) Update added in v0.20.0

func (mr *MockUsersMockRecorder) Update(ctx, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockVariables added in v0.20.0

type MockVariables struct {
	// contains filtered or unexported fields
}

MockVariables is a mock of Variables interface.

func NewMockVariables added in v0.20.0

func NewMockVariables(ctrl *gomock.Controller) *MockVariables

NewMockVariables creates a new mock instance.

func (*MockVariables) Create added in v0.20.0

func (m *MockVariables) Create(ctx context.Context, workspaceID string, options VariableCreateOptions) (*Variable, error)

Create mocks base method.

func (*MockVariables) Delete added in v0.20.0

func (m *MockVariables) Delete(ctx context.Context, workspaceID, variableID string) error

Delete mocks base method.

func (*MockVariables) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockVariables) List added in v0.20.0

func (m *MockVariables) List(ctx context.Context, workspaceID string, options VariableListOptions) (*VariableList, error)

List mocks base method.

func (*MockVariables) Read added in v0.20.0

func (m *MockVariables) Read(ctx context.Context, workspaceID, variableID string) (*Variable, error)

Read mocks base method.

func (*MockVariables) Update added in v0.20.0

func (m *MockVariables) Update(ctx context.Context, workspaceID, variableID string, options VariableUpdateOptions) (*Variable, error)

Update mocks base method.

type MockVariablesMockRecorder added in v0.20.0

type MockVariablesMockRecorder struct {
	// contains filtered or unexported fields
}

MockVariablesMockRecorder is the mock recorder for MockVariables.

func (*MockVariablesMockRecorder) Create added in v0.20.0

func (mr *MockVariablesMockRecorder) Create(ctx, workspaceID, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockVariablesMockRecorder) Delete added in v0.20.0

func (mr *MockVariablesMockRecorder) Delete(ctx, workspaceID, variableID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockVariablesMockRecorder) List added in v0.20.0

func (mr *MockVariablesMockRecorder) List(ctx, workspaceID, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockVariablesMockRecorder) Read added in v0.20.0

func (mr *MockVariablesMockRecorder) Read(ctx, workspaceID, variableID interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockVariablesMockRecorder) Update added in v0.20.0

func (mr *MockVariablesMockRecorder) Update(ctx, workspaceID, variableID, options interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockWorkspaces added in v0.20.0

type MockWorkspaces struct {
	// contains filtered or unexported fields
}

MockWorkspaces is a mock of Workspaces interface.

func NewMockWorkspaces added in v0.20.0

func NewMockWorkspaces(ctrl *gomock.Controller) *MockWorkspaces

NewMockWorkspaces creates a new mock instance.

func (*MockWorkspaces) AddRemoteStateConsumers added in v0.20.0

func (m *MockWorkspaces) AddRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceAddRemoteStateConsumersOptions) error

AddRemoteStateConsumers mocks base method.

func (*MockWorkspaces) AddTags added in v0.20.0

func (m *MockWorkspaces) AddTags(ctx context.Context, workspaceID string, options WorkspaceAddTagsOptions) error

AddTags mocks base method.

func (*MockWorkspaces) AssignSSHKey added in v0.20.0

func (m *MockWorkspaces) AssignSSHKey(ctx context.Context, workspaceID string, options WorkspaceAssignSSHKeyOptions) (*Workspace, error)

AssignSSHKey mocks base method.

func (*MockWorkspaces) Create added in v0.20.0

func (m *MockWorkspaces) Create(ctx context.Context, organization string, options WorkspaceCreateOptions) (*Workspace, error)

Create mocks base method.

func (*MockWorkspaces) Delete added in v0.20.0

func (m *MockWorkspaces) Delete(ctx context.Context, organization, workspace string) error

Delete mocks base method.

func (*MockWorkspaces) DeleteByID added in v0.20.0

func (m *MockWorkspaces) DeleteByID(ctx context.Context, workspaceID string) error

DeleteByID mocks base method.

func (*MockWorkspaces) EXPECT added in v0.20.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWorkspaces) ForceUnlock added in v0.20.0

func (m *MockWorkspaces) ForceUnlock(ctx context.Context, workspaceID string) (*Workspace, error)

ForceUnlock mocks base method.

func (*MockWorkspaces) List added in v0.20.0

func (m *MockWorkspaces) List(ctx context.Context, organization string, options WorkspaceListOptions) (*WorkspaceList, error)

List mocks base method.

func (*MockWorkspaces) Lock added in v0.20.0

func (m *MockWorkspaces) Lock(ctx context.Context, workspaceID string, options WorkspaceLockOptions) (*Workspace, error)

Lock mocks base method.

func (*MockWorkspaces) Read added in v0.20.0

func (m *MockWorkspaces) Read(ctx context.Context, organization, workspace string) (*Workspace, error)

Read mocks base method.

func (*MockWorkspaces) ReadByID added in v0.20.0

func (m *MockWorkspaces) ReadByID(ctx context.Context, workspaceID string) (*Workspace, error)

ReadByID mocks base method.

func (*MockWorkspaces) ReadByIDWithOptions added in v0.20.0

func (m *MockWorkspaces) ReadByIDWithOptions(ctx context.Context, workspaceID string, options *WorkspaceReadOptions) (*Workspace, error)

ReadByIDWithOptions mocks base method.

func (*MockWorkspaces) ReadWithOptions added in v0.20.0

func (m *MockWorkspaces) ReadWithOptions(ctx context.Context, organization, workspace string, options *WorkspaceReadOptions) (*Workspace, error)

ReadWithOptions mocks base method.

func (*MockWorkspaces) Readme added in v0.20.0

func (m *MockWorkspaces) Readme(ctx context.Context, workspaceID string) (io.Reader, error)

Readme mocks base method.

func (*MockWorkspaces) RemoteStateConsumers added in v0.20.0

func (m *MockWorkspaces) RemoteStateConsumers(ctx context.Context, workspaceID string, options *RemoteStateConsumersListOptions) (*WorkspaceList, error)

RemoteStateConsumers mocks base method.

func (*MockWorkspaces) RemoveRemoteStateConsumers added in v0.20.0

func (m *MockWorkspaces) RemoveRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceRemoveRemoteStateConsumersOptions) error

RemoveRemoteStateConsumers mocks base method.

func (*MockWorkspaces) RemoveTags added in v0.20.0

func (m *MockWorkspaces) RemoveTags(ctx context.Context, workspaceID string, options WorkspaceRemoveTagsOptions) error

RemoveTags mocks base method.

func (*MockWorkspaces) RemoveVCSConnection added in v0.20.0

func (m *MockWorkspaces) RemoveVCSConnection(ctx context.Context, organization, workspace string) (*Workspace, error)

RemoveVCSConnection mocks base method.

func (*MockWorkspaces) RemoveVCSConnectionByID added in v0.20.0

func (m *MockWorkspaces) RemoveVCSConnectionByID(ctx context.Context, workspaceID string) (*Workspace, error)

RemoveVCSConnectionByID mocks base method.

func (*MockWorkspaces) Tags added in v0.20.0

func (m *MockWorkspaces) Tags(ctx context.Context, workspaceID string, options WorkspaceTagListOptions) (*TagList, error)

Tags mocks base method.

func (*MockWorkspaces) UnassignSSHKey added in v0.20.0

func (m *MockWorkspaces) UnassignSSHKey(ctx context.Context, workspaceID string) (*Workspace, error)

UnassignSSHKey mocks base method.

func (*MockWorkspaces) Unlock added in v0.20.0

func (m *MockWorkspaces) Unlock(ctx context.Context, workspaceID string) (*Workspace, error)

Unlock mocks base method.

func (*MockWorkspaces) Update added in v0.20.0

func (m *MockWorkspaces) Update(ctx context.Context, organization, workspace string, options WorkspaceUpdateOptions) (*Workspace, error)

Update mocks base method.

func (*MockWorkspaces) UpdateByID added in v0.20.0

func (m *MockWorkspaces) UpdateByID(ctx context.Context, workspaceID string, options WorkspaceUpdateOptions) (*Workspace, error)

UpdateByID mocks base method.

func (*MockWorkspaces) UpdateRemoteStateConsumers added in v0.20.0

func (m *MockWorkspaces) UpdateRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceUpdateRemoteStateConsumersOptions) error

UpdateRemoteStateConsumers mocks base method.

type MockWorkspacesMockRecorder added in v0.20.0

type MockWorkspacesMockRecorder struct {
	// contains filtered or unexported fields
}

MockWorkspacesMockRecorder is the mock recorder for MockWorkspaces.

func (*MockWorkspacesMockRecorder) AddRemoteStateConsumers added in v0.20.0

func (mr *MockWorkspacesMockRecorder) AddRemoteStateConsumers(ctx, workspaceID, options interface{}) *gomock.Call

AddRemoteStateConsumers indicates an expected call of AddRemoteStateConsumers.

func (*MockWorkspacesMockRecorder) AddTags added in v0.20.0

func (mr *MockWorkspacesMockRecorder) AddTags(ctx, workspaceID, options interface{}) *gomock.Call

AddTags indicates an expected call of AddTags.

func (*MockWorkspacesMockRecorder) AssignSSHKey added in v0.20.0

func (mr *MockWorkspacesMockRecorder) AssignSSHKey(ctx, workspaceID, options interface{}) *gomock.Call

AssignSSHKey indicates an expected call of AssignSSHKey.

func (*MockWorkspacesMockRecorder) Create added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Create(ctx, organization, options interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockWorkspacesMockRecorder) Delete added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Delete(ctx, organization, workspace interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockWorkspacesMockRecorder) DeleteByID added in v0.20.0

func (mr *MockWorkspacesMockRecorder) DeleteByID(ctx, workspaceID interface{}) *gomock.Call

DeleteByID indicates an expected call of DeleteByID.

func (*MockWorkspacesMockRecorder) ForceUnlock added in v0.20.0

func (mr *MockWorkspacesMockRecorder) ForceUnlock(ctx, workspaceID interface{}) *gomock.Call

ForceUnlock indicates an expected call of ForceUnlock.

func (*MockWorkspacesMockRecorder) List added in v0.20.0

func (mr *MockWorkspacesMockRecorder) List(ctx, organization, options interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockWorkspacesMockRecorder) Lock added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Lock(ctx, workspaceID, options interface{}) *gomock.Call

Lock indicates an expected call of Lock.

func (*MockWorkspacesMockRecorder) Read added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Read(ctx, organization, workspace interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockWorkspacesMockRecorder) ReadByID added in v0.20.0

func (mr *MockWorkspacesMockRecorder) ReadByID(ctx, workspaceID interface{}) *gomock.Call

ReadByID indicates an expected call of ReadByID.

func (*MockWorkspacesMockRecorder) ReadByIDWithOptions added in v0.20.0

func (mr *MockWorkspacesMockRecorder) ReadByIDWithOptions(ctx, workspaceID, options interface{}) *gomock.Call

ReadByIDWithOptions indicates an expected call of ReadByIDWithOptions.

func (*MockWorkspacesMockRecorder) ReadWithOptions added in v0.20.0

func (mr *MockWorkspacesMockRecorder) ReadWithOptions(ctx, organization, workspace, options interface{}) *gomock.Call

ReadWithOptions indicates an expected call of ReadWithOptions.

func (*MockWorkspacesMockRecorder) Readme added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Readme(ctx, workspaceID interface{}) *gomock.Call

Readme indicates an expected call of Readme.

func (*MockWorkspacesMockRecorder) RemoteStateConsumers added in v0.20.0

func (mr *MockWorkspacesMockRecorder) RemoteStateConsumers(ctx, workspaceID, options interface{}) *gomock.Call

RemoteStateConsumers indicates an expected call of RemoteStateConsumers.

func (*MockWorkspacesMockRecorder) RemoveRemoteStateConsumers added in v0.20.0

func (mr *MockWorkspacesMockRecorder) RemoveRemoteStateConsumers(ctx, workspaceID, options interface{}) *gomock.Call

RemoveRemoteStateConsumers indicates an expected call of RemoveRemoteStateConsumers.

func (*MockWorkspacesMockRecorder) RemoveTags added in v0.20.0

func (mr *MockWorkspacesMockRecorder) RemoveTags(ctx, workspaceID, options interface{}) *gomock.Call

RemoveTags indicates an expected call of RemoveTags.

func (*MockWorkspacesMockRecorder) RemoveVCSConnection added in v0.20.0

func (mr *MockWorkspacesMockRecorder) RemoveVCSConnection(ctx, organization, workspace interface{}) *gomock.Call

RemoveVCSConnection indicates an expected call of RemoveVCSConnection.

func (*MockWorkspacesMockRecorder) RemoveVCSConnectionByID added in v0.20.0

func (mr *MockWorkspacesMockRecorder) RemoveVCSConnectionByID(ctx, workspaceID interface{}) *gomock.Call

RemoveVCSConnectionByID indicates an expected call of RemoveVCSConnectionByID.

func (*MockWorkspacesMockRecorder) Tags added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Tags(ctx, workspaceID, options interface{}) *gomock.Call

Tags indicates an expected call of Tags.

func (*MockWorkspacesMockRecorder) UnassignSSHKey added in v0.20.0

func (mr *MockWorkspacesMockRecorder) UnassignSSHKey(ctx, workspaceID interface{}) *gomock.Call

UnassignSSHKey indicates an expected call of UnassignSSHKey.

func (*MockWorkspacesMockRecorder) Unlock added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Unlock(ctx, workspaceID interface{}) *gomock.Call

Unlock indicates an expected call of Unlock.

func (*MockWorkspacesMockRecorder) Update added in v0.20.0

func (mr *MockWorkspacesMockRecorder) Update(ctx, organization, workspace, options interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockWorkspacesMockRecorder) UpdateByID added in v0.20.0

func (mr *MockWorkspacesMockRecorder) UpdateByID(ctx, workspaceID, options interface{}) *gomock.Call

UpdateByID indicates an expected call of UpdateByID.

func (*MockWorkspacesMockRecorder) UpdateRemoteStateConsumers added in v0.20.0

func (mr *MockWorkspacesMockRecorder) UpdateRemoteStateConsumers(ctx, workspaceID, options interface{}) *gomock.Call

UpdateRemoteStateConsumers indicates an expected call of UpdateRemoteStateConsumers.

type NotificationConfiguration added in v0.3.12

type NotificationConfiguration struct {
	ID                string                      `jsonapi:"primary,notification-configurations"`
	CreatedAt         time.Time                   `jsonapi:"attr,created-at,iso8601"`
	DeliveryResponses []*DeliveryResponse         `jsonapi:"attr,delivery-responses"`
	DestinationType   NotificationDestinationType `jsonapi:"attr,destination-type"`
	Enabled           bool                        `jsonapi:"attr,enabled"`
	Name              string                      `jsonapi:"attr,name"`
	Token             string                      `jsonapi:"attr,token"`
	Triggers          []string                    `jsonapi:"attr,triggers"`
	UpdatedAt         time.Time                   `jsonapi:"attr,updated-at,iso8601"`
	URL               string                      `jsonapi:"attr,url"`

	// EmailAddresses is only available for TFE users. It is not available in TFC.
	EmailAddresses []string `jsonapi:"attr,email-addresses"`

	// Relations
	Subscribable *Workspace `jsonapi:"relation,subscribable"`
	EmailUsers   []*User    `jsonapi:"relation,users"`
}

NotificationConfiguration represents a Notification Configuration.

type NotificationConfigurationCreateOptions added in v0.3.12

type NotificationConfigurationCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,notification-configurations"`

	// The destination type of the notification configuration
	DestinationType *NotificationDestinationType `jsonapi:"attr,destination-type"`

	// Whether the notification configuration should be enabled or not
	Enabled *bool `jsonapi:"attr,enabled"`

	// The name of the notification configuration
	Name *string `jsonapi:"attr,name"`

	// The token of the notification configuration
	Token *string `jsonapi:"attr,token,omitempty"`

	// The list of run events that will trigger notifications.
	Triggers []string `jsonapi:"attr,triggers,omitempty"`

	// The url of the notification configuration
	URL *string `jsonapi:"attr,url,omitempty"`

	// The list of email addresses that will receive notification emails.
	// EmailAddresses is only available for TFE users. It is not available in TFC.
	EmailAddresses []string `jsonapi:"attr,email-addresses,omitempty"`

	// The list of users belonging to the organization that will receive notification emails.
	EmailUsers []*User `jsonapi:"relation,users,omitempty"`
}

NotificationConfigurationCreateOptions represents the options for creating a new notification configuration.

type NotificationConfigurationList added in v0.3.12

type NotificationConfigurationList struct {
	*Pagination
	Items []*NotificationConfiguration
}

NotificationConfigurationList represents a list of Notification Configurations.

type NotificationConfigurationListOptions added in v0.3.13

type NotificationConfigurationListOptions struct {
	ListOptions
}

NotificationConfigurationListOptions represents the options for listing notification configurations.

type NotificationConfigurationUpdateOptions added in v0.3.12

type NotificationConfigurationUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,notification-configurations"`

	// Whether the notification configuration should be enabled or not
	Enabled *bool `jsonapi:"attr,enabled,omitempty"`

	// The name of the notification configuration
	Name *string `jsonapi:"attr,name,omitempty"`

	// The token of the notification configuration
	Token *string `jsonapi:"attr,token,omitempty"`

	// The list of run events that will trigger notifications.
	Triggers []string `jsonapi:"attr,triggers,omitempty"`

	// The url of the notification configuration
	URL *string `jsonapi:"attr,url,omitempty"`

	// The list of email addresses that will receive notification emails.
	// EmailAddresses is only available for TFE users. It is not available in TFC.
	EmailAddresses []string `jsonapi:"attr,email-addresses,omitempty"`

	// The list of users belonging to the organization that will receive notification emails.
	EmailUsers []*User `jsonapi:"relation,users,omitempty"`
}

NotificationConfigurationUpdateOptions represents the options for updating a existing notification configuration.

type NotificationConfigurations added in v0.3.12

type NotificationConfigurations interface {
	// List all the notification configurations within a workspace.
	List(ctx context.Context, workspaceID string, options NotificationConfigurationListOptions) (*NotificationConfigurationList, error)

	// Create a new notification configuration with the given options.
	Create(ctx context.Context, workspaceID string, options NotificationConfigurationCreateOptions) (*NotificationConfiguration, error)

	// Read a notification configuration by its ID.
	Read(ctx context.Context, notificationConfigurationID string) (*NotificationConfiguration, error)

	// Update an existing notification configuration.
	Update(ctx context.Context, notificationConfigurationID string, options NotificationConfigurationUpdateOptions) (*NotificationConfiguration, error)

	// Delete a notification configuration by its ID.
	Delete(ctx context.Context, notificationConfigurationID string) error

	// Verify a notification configuration by its ID.
	Verify(ctx context.Context, notificationConfigurationID string) (*NotificationConfiguration, error)
}

NotificationConfigurations describes all the Notification Configuration related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/notification-configurations.html

type NotificationDestinationType added in v0.3.12

type NotificationDestinationType string

NotificationDestinationType represents the destination type of the notification configuration.

const (
	NotificationDestinationTypeEmail   NotificationDestinationType = "email"
	NotificationDestinationTypeGeneric NotificationDestinationType = "generic"
	NotificationDestinationTypeSlack   NotificationDestinationType = "slack"
)

List of available notification destination types.

func NotificationDestination added in v0.3.12

func NotificationDestination(v NotificationDestinationType) *NotificationDestinationType

NotificationDestination returns a pointer to the given notification configuration destination type

type OAuthClient

type OAuthClient struct {
	ID                  string              `jsonapi:"primary,oauth-clients"`
	APIURL              string              `jsonapi:"attr,api-url"`
	CallbackURL         string              `jsonapi:"attr,callback-url"`
	ConnectPath         string              `jsonapi:"attr,connect-path"`
	CreatedAt           time.Time           `jsonapi:"attr,created-at,iso8601"`
	HTTPURL             string              `jsonapi:"attr,http-url"`
	Key                 string              `jsonapi:"attr,key"`
	RSAPublicKey        string              `jsonapi:"attr,rsa-public-key"`
	ServiceProvider     ServiceProviderType `jsonapi:"attr,service-provider"`
	ServiceProviderName string              `jsonapi:"attr,service-provider-display-name"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
	OAuthTokens  []*OAuthToken `jsonapi:"relation,oauth-tokens"`
}

OAuthClient represents a connection between an organization and a VCS provider.

type OAuthClientCreateOptions

type OAuthClientCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,oauth-clients"`

	// The base URL of your VCS provider's API.
	APIURL *string `jsonapi:"attr,api-url"`

	// The homepage of your VCS provider.
	HTTPURL *string `jsonapi:"attr,http-url"`

	// The token string you were given by your VCS provider.
	OAuthToken *string `jsonapi:"attr,oauth-token-string"`

	// Private key associated with this vcs provider - only available for ado_server
	PrivateKey *string `jsonapi:"attr,private-key"`

	// The VCS provider being connected with.
	ServiceProvider *ServiceProviderType `jsonapi:"attr,service-provider"`
}

OAuthClientCreateOptions represents the options for creating an OAuth client.

type OAuthClientList added in v0.2.2

type OAuthClientList struct {
	*Pagination
	Items []*OAuthClient
}

OAuthClientList represents a list of OAuth clients.

type OAuthClientListOptions added in v0.2.2

type OAuthClientListOptions struct {
	ListOptions
}

OAuthClientListOptions represents the options for listing OAuth clients.

type OAuthClients

type OAuthClients interface {
	// List all the OAuth clients for a given organization.
	List(ctx context.Context, organization string, options OAuthClientListOptions) (*OAuthClientList, error)

	// Create an OAuth client to connect an organization and a VCS provider.
	Create(ctx context.Context, organization string, options OAuthClientCreateOptions) (*OAuthClient, error)

	// Read an OAuth client by its ID.
	Read(ctx context.Context, oAuthClientID string) (*OAuthClient, error)

	// Delete an OAuth client by its ID.
	Delete(ctx context.Context, oAuthClientID string) error
}

OAuthClients describes all the OAuth client related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/enterprise/api/oauth-clients.html

type OAuthToken

type OAuthToken struct {
	ID                  string    `jsonapi:"primary,oauth-tokens"`
	UID                 string    `jsonapi:"attr,uid"`
	CreatedAt           time.Time `jsonapi:"attr,created-at,iso8601"`
	HasSSHKey           bool      `jsonapi:"attr,has-ssh-key"`
	ServiceProviderUser string    `jsonapi:"attr,service-provider-user"`

	// Relations
	OAuthClient *OAuthClient `jsonapi:"relation,oauth-client"`
}

OAuthToken represents a VCS configuration including the associated OAuth token

type OAuthTokenList added in v0.2.0

type OAuthTokenList struct {
	*Pagination
	Items []*OAuthToken
}

OAuthTokenList represents a list of OAuth tokens.

type OAuthTokenListOptions added in v0.2.0

type OAuthTokenListOptions struct {
	ListOptions
}

OAuthTokenListOptions represents the options for listing OAuth tokens.

type OAuthTokenUpdateOptions added in v0.2.2

type OAuthTokenUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,oauth-tokens"`

	// A private SSH key to be used for git clone operations.
	PrivateSSHKey *string `jsonapi:"attr,ssh-key"`
}

OAuthTokenUpdateOptions represents the options for updating an OAuth token.

type OAuthTokens

type OAuthTokens interface {
	// List all the OAuth tokens for a given organization.
	List(ctx context.Context, organization string, options OAuthTokenListOptions) (*OAuthTokenList, error)
	// Read a OAuth token by its ID.
	Read(ctx context.Context, oAuthTokenID string) (*OAuthToken, error)

	// Update an existing OAuth token.
	Update(ctx context.Context, oAuthTokenID string, options OAuthTokenUpdateOptions) (*OAuthToken, error)

	// Delete a OAuth token by its ID.
	Delete(ctx context.Context, oAuthTokenID string) error
}

OAuthTokens describes all the OAuth token related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/oauth-tokens.html

type Organization

type Organization struct {
	Name                                              string                   `jsonapi:"primary,organizations"`
	CollaboratorAuthPolicy                            AuthPolicyType           `jsonapi:"attr,collaborator-auth-policy"`
	CostEstimationEnabled                             bool                     `jsonapi:"attr,cost-estimation-enabled"`
	CreatedAt                                         time.Time                `jsonapi:"attr,created-at,iso8601"`
	Email                                             string                   `jsonapi:"attr,email"`
	ExternalID                                        string                   `jsonapi:"attr,external-id"`
	OwnersTeamSAMLRoleID                              string                   `jsonapi:"attr,owners-team-saml-role-id"`
	Permissions                                       *OrganizationPermissions `jsonapi:"attr,permissions"`
	SAMLEnabled                                       bool                     `jsonapi:"attr,saml-enabled"`
	SessionRemember                                   int                      `jsonapi:"attr,session-remember"`
	SessionTimeout                                    int                      `jsonapi:"attr,session-timeout"`
	TrialExpiresAt                                    time.Time                `jsonapi:"attr,trial-expires-at,iso8601"`
	TwoFactorConformant                               bool                     `jsonapi:"attr,two-factor-conformant"`
	SendPassingStatusesForUntriggeredSpeculativePlans bool                     `jsonapi:"attr,send-passing-statuses-for-untriggered-speculative-plans"`
}

Organization represents a Terraform Enterprise organization.

type OrganizationAccess added in v0.3.8

type OrganizationAccess struct {
	ManagePolicies        bool `jsonapi:"attr,manage-policies"`
	ManagePolicyOverrides bool `jsonapi:"attr,manage-policy-overrides"`
	ManageWorkspaces      bool `jsonapi:"attr,manage-workspaces"`
	ManageVCSSettings     bool `jsonapi:"attr,manage-vcs-settings"`
}

OrganizationAccess represents the team's permissions on its organization

type OrganizationAccessOptions added in v0.3.8

type OrganizationAccessOptions struct {
	ManagePolicies        *bool `json:"manage-policies,omitempty"`
	ManagePolicyOverrides *bool `json:"manage-policy-overrides,omitempty"`
	ManageWorkspaces      *bool `json:"manage-workspaces,omitempty"`
	ManageVCSSettings     *bool `json:"manage-vcs-settings,omitempty"`
}

OrganizationAccessOptions represents the organization access options of a team.

type OrganizationCreateOptions

type OrganizationCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,organizations"`

	// Name of the organization.
	Name *string `jsonapi:"attr,name"`

	// Admin email address.
	Email *string `jsonapi:"attr,email"`

	// Session expiration (minutes).
	SessionRemember *int `jsonapi:"attr,session-remember,omitempty"`

	// Session timeout after inactivity (minutes).
	SessionTimeout *int `jsonapi:"attr,session-timeout,omitempty"`

	// Authentication policy.
	CollaboratorAuthPolicy *AuthPolicyType `jsonapi:"attr,collaborator-auth-policy,omitempty"`

	// Enable Cost Estimation
	CostEstimationEnabled *bool `jsonapi:"attr,cost-estimation-enabled,omitempty"`

	// The name of the "owners" team
	OwnersTeamSAMLRoleID *string `jsonapi:"attr,owners-team-saml-role-id,omitempty"`

	// SendPassingStatusesForUntriggeredSpeculativePlans toggles behavior of untriggered speculative plans to send status updates to version control systems like GitHub.
	SendPassingStatusesForUntriggeredSpeculativePlans *bool `jsonapi:"attr,send-passing-statuses-for-untriggered-speculative-plans,omitempty"`
}

OrganizationCreateOptions represents the options for creating an organization.

type OrganizationList added in v0.2.0

type OrganizationList struct {
	*Pagination
	Items []*Organization
}

OrganizationList represents a list of organizations.

type OrganizationListOptions

type OrganizationListOptions struct {
	ListOptions
}

OrganizationListOptions represents the options for listing organizations.

type OrganizationMembership added in v0.3.31

type OrganizationMembership struct {
	ID     string                       `jsonapi:"primary,organization-memberships"`
	Status OrganizationMembershipStatus `jsonapi:"attr,status"`
	Email  string                       `jsonapi:"attr,email"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
	User         *User         `jsonapi:"relation,user"`
	Teams        []*Team       `jsonapi:"relation,teams"`
}

OrganizationMembership represents a Terraform Enterprise organization membership.

type OrganizationMembershipCreateOptions added in v0.3.31

type OrganizationMembershipCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,organization-memberships"`

	// User's email address.
	Email *string `jsonapi:"attr,email"`
}

OrganizationMembershipCreateOptions represents the options for creating an organization membership.

type OrganizationMembershipList added in v0.3.31

type OrganizationMembershipList struct {
	*Pagination
	Items []*OrganizationMembership
}

OrganizationMembershipList represents a list of organization memberships.

type OrganizationMembershipListOptions added in v0.3.31

type OrganizationMembershipListOptions struct {
	ListOptions

	Include string `url:"include"`
}

OrganizationMembershipListOptions represents the options for listing organization memberships.

type OrganizationMembershipReadOptions added in v0.3.31

type OrganizationMembershipReadOptions struct {
	Include string `url:"include"`
}

OrganizationMembershipReadOptions represents the options for reading organization memberships.

type OrganizationMembershipStatus added in v0.3.31

type OrganizationMembershipStatus string

OrganizationMembershipStatus represents an organization membership status.

type OrganizationMemberships added in v0.3.31

type OrganizationMemberships interface {
	// List all the organization memberships of the given organization.
	List(ctx context.Context, organization string, options OrganizationMembershipListOptions) (*OrganizationMembershipList, error)

	// Create a new organization membership with the given options.
	Create(ctx context.Context, organization string, options OrganizationMembershipCreateOptions) (*OrganizationMembership, error)

	// Read an organization membership by ID
	Read(ctx context.Context, organizationMembershipID string) (*OrganizationMembership, error)

	// Read an organization membership by ID with options
	ReadWithOptions(ctx context.Context, organizationMembershipID string, options OrganizationMembershipReadOptions) (*OrganizationMembership, error)

	// Delete an organization membership by its ID.
	Delete(ctx context.Context, organizationMembershipID string) error
}

OrganizationMemberships describes all the organization membership related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/organization-memberships.html

type OrganizationPermissions

type OrganizationPermissions struct {
	CanCreateTeam               bool `jsonapi:"attr,can-create-team"`
	CanCreateWorkspace          bool `jsonapi:"attr,can-create-workspace"`
	CanCreateWorkspaceMigration bool `jsonapi:"attr,can-create-workspace-migration"`
	CanDestroy                  bool `jsonapi:"attr,can-destroy"`
	CanTraverse                 bool `jsonapi:"attr,can-traverse"`
	CanUpdate                   bool `jsonapi:"attr,can-update"`
	CanUpdateAPIToken           bool `jsonapi:"attr,can-update-api-token"`
	CanUpdateOAuth              bool `jsonapi:"attr,can-update-oauth"`
	CanUpdateSentinel           bool `jsonapi:"attr,can-update-sentinel"`
}

OrganizationPermissions represents the organization permissions.

type OrganizationToken

type OrganizationToken struct {
	ID          string    `jsonapi:"primary,authentication-tokens"`
	CreatedAt   time.Time `jsonapi:"attr,created-at,iso8601"`
	Description string    `jsonapi:"attr,description"`
	LastUsedAt  time.Time `jsonapi:"attr,last-used-at,iso8601"`
	Token       string    `jsonapi:"attr,token"`
}

OrganizationToken represents a Terraform Enterprise organization token.

type OrganizationTokens

type OrganizationTokens interface {
	// Generate a new organization token, replacing any existing token.
	Generate(ctx context.Context, organization string) (*OrganizationToken, error)

	// Read an organization token.
	Read(ctx context.Context, organization string) (*OrganizationToken, error)

	// Delete an organization token.
	Delete(ctx context.Context, organization string) error
}

OrganizationTokens describes all the organization token related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/organization-tokens.html

type OrganizationUpdateOptions

type OrganizationUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,organizations"`

	// New name for the organization.
	Name *string `jsonapi:"attr,name,omitempty"`

	// New admin email address.
	Email *string `jsonapi:"attr,email,omitempty"`

	// Session expiration (minutes).
	SessionRemember *int `jsonapi:"attr,session-remember,omitempty"`

	// Session timeout after inactivity (minutes).
	SessionTimeout *int `jsonapi:"attr,session-timeout,omitempty"`

	// Authentication policy.
	CollaboratorAuthPolicy *AuthPolicyType `jsonapi:"attr,collaborator-auth-policy,omitempty"`

	// Enable Cost Estimation
	CostEstimationEnabled *bool `jsonapi:"attr,cost-estimation-enabled,omitempty"`

	// The name of the "owners" team
	OwnersTeamSAMLRoleID *string `jsonapi:"attr,owners-team-saml-role-id,omitempty"`

	// SendPassingStatusesForUntriggeredSpeculativePlans toggles behavior of untriggered speculative plans to send status updates to version control systems like GitHub.
	SendPassingStatusesForUntriggeredSpeculativePlans *bool `jsonapi:"attr,send-passing-statuses-for-untriggered-speculative-plans,omitempty"`
}

OrganizationUpdateOptions represents the options for updating an organization.

type Organizations

type Organizations interface {
	// List all the organizations visible to the current user.
	List(ctx context.Context, options OrganizationListOptions) (*OrganizationList, error)

	// Create a new organization with the given options.
	Create(ctx context.Context, options OrganizationCreateOptions) (*Organization, error)

	// Read an organization by its name.
	Read(ctx context.Context, organization string) (*Organization, error)

	// Update attributes of an existing organization.
	Update(ctx context.Context, organization string, options OrganizationUpdateOptions) (*Organization, error)

	// Delete an organization by its name.
	Delete(ctx context.Context, organization string) error

	// Capacity shows the current run capacity of an organization.
	Capacity(ctx context.Context, organization string) (*Capacity, error)

	// Entitlements shows the entitlements of an organization.
	Entitlements(ctx context.Context, organization string) (*Entitlements, error)

	// RunQueue shows the current run queue of an organization.
	RunQueue(ctx context.Context, organization string, options RunQueueOptions) (*RunQueue, error)
}

Organizations describes all the organization related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/organizations.html

type Pagination added in v0.2.0

type Pagination struct {
	CurrentPage  int `json:"current-page"`
	PreviousPage int `json:"prev-page"`
	NextPage     int `json:"next-page"`
	TotalPages   int `json:"total-pages"`
	TotalCount   int `json:"total-count"`
}

Pagination is used to return the pagination details of an API request.

type Plan added in v0.1.1

type Plan struct {
	ID                   string                `jsonapi:"primary,plans"`
	HasChanges           bool                  `jsonapi:"attr,has-changes"`
	LogReadURL           string                `jsonapi:"attr,log-read-url"`
	ResourceAdditions    int                   `jsonapi:"attr,resource-additions"`
	ResourceChanges      int                   `jsonapi:"attr,resource-changes"`
	ResourceDestructions int                   `jsonapi:"attr,resource-destructions"`
	Status               PlanStatus            `jsonapi:"attr,status"`
	StatusTimestamps     *PlanStatusTimestamps `jsonapi:"attr,status-timestamps"`

	// Relations
	Exports []*PlanExport `jsonapi:"relation,exports"`
}

Plan represents a Terraform Enterprise plan.

type PlanExport added in v0.3.17

type PlanExport struct {
	ID               string                      `jsonapi:"primary,plan-exports"`
	DataType         PlanExportDataType          `jsonapi:"attr,data-type"`
	Status           PlanExportStatus            `jsonapi:"attr,status"`
	StatusTimestamps *PlanExportStatusTimestamps `jsonapi:"attr,status-timestamps"`
}

PlanExport represents an export of Terraform Enterprise plan data.

type PlanExportCreateOptions added in v0.3.17

type PlanExportCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,plan-exports"`

	// The plan to export.
	Plan *Plan `jsonapi:"relation,plan"`

	// The name of the policy set.
	DataType *PlanExportDataType `jsonapi:"attr,data-type"`
}

PlanExportCreateOptions represents the options for exporting data from a plan.

type PlanExportDataType added in v0.3.17

type PlanExportDataType string

PlanExportDataType represents the type of data exported from a plan.

const (
	PlanExportSentinelMockBundleV0 PlanExportDataType = "sentinel-mock-bundle-v0"
)

List all available plan export data types.

func PlanExportType added in v0.3.17

func PlanExportType(v PlanExportDataType) *PlanExportDataType

PlanExportType returns a pointer to the given plan export data type.

type PlanExportStatus added in v0.3.17

type PlanExportStatus string

PlanExportStatus represents a plan export state.

const (
	PlanExportCanceled PlanExportStatus = "canceled"
	PlanExportErrored  PlanExportStatus = "errored"
	PlanExportExpired  PlanExportStatus = "expired"
	PlanExportFinished PlanExportStatus = "finished"
	PlanExportPending  PlanExportStatus = "pending"
	PlanExportQueued   PlanExportStatus = "queued"
)

List all available plan export statuses.

type PlanExportStatusTimestamps added in v0.3.17

type PlanExportStatusTimestamps struct {
	CanceledAt time.Time `jsonapi:"attr,canceled-at,rfc3339"`
	ErroredAt  time.Time `jsonapi:"attr,errored-at,rfc3339"`
	ExpiredAt  time.Time `jsonapi:"attr,expired-at,rfc3339"`
	FinishedAt time.Time `jsonapi:"attr,finished-at,rfc3339"`
	QueuedAt   time.Time `jsonapi:"attr,queued-at,rfc3339"`
}

PlanExportStatusTimestamps holds the timestamps for plan export statuses.

type PlanExports added in v0.3.17

type PlanExports interface {
	// Export a plan by its ID with the given options.
	Create(ctx context.Context, options PlanExportCreateOptions) (*PlanExport, error)

	// Read a plan export by its ID.
	Read(ctx context.Context, planExportID string) (*PlanExport, error)

	// Delete a plan export by its ID.
	Delete(ctx context.Context, planExportID string) error

	// Download the data of an plan export.
	Download(ctx context.Context, planExportID string) ([]byte, error)
}

PlanExports describes all the plan export related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/plan-exports.html

type PlanStatus added in v0.1.1

type PlanStatus string

PlanStatus represents a plan state.

const (
	PlanCanceled    PlanStatus = "canceled"
	PlanCreated     PlanStatus = "created"
	PlanErrored     PlanStatus = "errored"
	PlanFinished    PlanStatus = "finished"
	PlanMFAWaiting  PlanStatus = "mfa_waiting"
	PlanPending     PlanStatus = "pending"
	PlanQueued      PlanStatus = "queued"
	PlanRunning     PlanStatus = "running"
	PlanUnreachable PlanStatus = "unreachable"
)

List all available plan statuses.

type PlanStatusTimestamps added in v0.1.1

type PlanStatusTimestamps struct {
	CanceledAt      time.Time `jsonapi:"attr,canceled-at,rfc3339"`
	ErroredAt       time.Time `jsonapi:"attr,errored-at,rfc3339"`
	FinishedAt      time.Time `jsonapi:"attr,finished-at,rfc3339"`
	ForceCanceledAt time.Time `jsonapi:"attr,force-canceled-at,rfc3339"`
	QueuedAt        time.Time `jsonapi:"attr,queued-at,rfc3339"`
	StartedAt       time.Time `jsonapi:"attr,started-at,rfc3339"`
}

PlanStatusTimestamps holds the timestamps for individual plan statuses.

type Plans added in v0.1.1

type Plans interface {
	// Read a plan by its ID.
	Read(ctx context.Context, planID string) (*Plan, error)

	// Logs retrieves the logs of a plan.
	Logs(ctx context.Context, planID string) (io.Reader, error)

	// Retrieve the JSON execution plan
	JSONOutput(ctx context.Context, planID string) ([]byte, error)
}

Plans describes all the plan related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/plan.html

type Policies

type Policies interface {
	// List all the policies for a given organization
	List(ctx context.Context, organization string, options PolicyListOptions) (*PolicyList, error)

	// Create a policy and associate it with an organization.
	Create(ctx context.Context, organization string, options PolicyCreateOptions) (*Policy, error)

	// Read a policy by its ID.
	Read(ctx context.Context, policyID string) (*Policy, error)

	// Update an existing policy.
	Update(ctx context.Context, policyID string, options PolicyUpdateOptions) (*Policy, error)

	// Delete a policy by its ID.
	Delete(ctx context.Context, policyID string) error

	// Upload the policy content of the policy.
	Upload(ctx context.Context, policyID string, content []byte) error

	// Download the policy content of the policy.
	Download(ctx context.Context, policyID string) ([]byte, error)
}

Policies describes all the policy related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/policies.html

type Policy

type Policy struct {
	ID             string         `jsonapi:"primary,policies"`
	Name           string         `jsonapi:"attr,name"`
	Description    string         `jsonapi:"attr,description"`
	Enforce        []*Enforcement `jsonapi:"attr,enforce"`
	PolicySetCount int            `jsonapi:"attr,policy-set-count"`
	UpdatedAt      time.Time      `jsonapi:"attr,updated-at,iso8601"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
}

Policy represents a Terraform Enterprise policy.

type PolicyActions

type PolicyActions struct {
	IsOverridable bool `jsonapi:"attr,is-overridable"`
}

PolicyActions represents the policy check actions.

type PolicyCheck

type PolicyCheck struct {
	ID               string                  `jsonapi:"primary,policy-checks"`
	Actions          *PolicyActions          `jsonapi:"attr,actions"`
	Permissions      *PolicyPermissions      `jsonapi:"attr,permissions"`
	Result           *PolicyResult           `jsonapi:"attr,result"`
	Scope            PolicyScope             `jsonapi:"attr,scope"`
	Status           PolicyStatus            `jsonapi:"attr,status"`
	StatusTimestamps *PolicyStatusTimestamps `jsonapi:"attr,status-timestamps"`
	Run              *Run                    `jsonapi:"relation,run"`
}

PolicyCheck represents a Terraform Enterprise policy check..

type PolicyCheckList added in v0.2.0

type PolicyCheckList struct {
	*Pagination
	Items []*PolicyCheck
}

PolicyCheckList represents a list of policy checks.

type PolicyCheckListOptions

type PolicyCheckListOptions struct {
	ListOptions
}

PolicyCheckListOptions represents the options for listing policy checks.

type PolicyChecks

type PolicyChecks interface {
	// List all policy checks of the given run.
	List(ctx context.Context, runID string, options PolicyCheckListOptions) (*PolicyCheckList, error)

	// Read a policy check by its ID.
	Read(ctx context.Context, policyCheckID string) (*PolicyCheck, error)

	// Override a soft-mandatory or warning policy.
	Override(ctx context.Context, policyCheckID string) (*PolicyCheck, error)

	// Logs retrieves the logs of a policy check.
	Logs(ctx context.Context, policyCheckID string) (io.Reader, error)
}

PolicyChecks describes all the policy check related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/policy-checks.html

type PolicyCreateOptions

type PolicyCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,policies"`

	// The name of the policy.
	Name *string `jsonapi:"attr,name"`

	// A description of the policy's purpose.
	Description *string `jsonapi:"attr,description,omitempty"`

	// The enforcements of the policy.
	Enforce []*EnforcementOptions `jsonapi:"attr,enforce"`
}

PolicyCreateOptions represents the options for creating a new policy.

type PolicyList added in v0.2.0

type PolicyList struct {
	*Pagination
	Items []*Policy
}

PolicyList represents a list of policies..

type PolicyListOptions

type PolicyListOptions struct {
	ListOptions

	// A search string (partial policy name) used to filter the results.
	Search *string `url:"search[name],omitempty"`
}

PolicyListOptions represents the options for listing policies.

type PolicyPermissions

type PolicyPermissions struct {
	CanOverride bool `jsonapi:"attr,can-override"`
}

PolicyPermissions represents the policy check permissions.

type PolicyResult

type PolicyResult struct {
	AdvisoryFailed int  `jsonapi:"attr,advisory-failed"`
	Duration       int  `jsonapi:"attr,duration"`
	HardFailed     int  `jsonapi:"attr,hard-failed"`
	Passed         int  `jsonapi:"attr,passed"`
	Result         bool `jsonapi:"attr,result"`
	SoftFailed     int  `jsonapi:"attr,soft-failed"`
	TotalFailed    int  `jsonapi:"attr,total-failed"`
}

PolicyResult represents the complete policy check result,

type PolicyScope

type PolicyScope string

PolicyScope represents a policy scope.

const (
	PolicyScopeOrganization PolicyScope = "organization"
	PolicyScopeWorkspace    PolicyScope = "workspace"
)

List all available policy scopes.

type PolicySet added in v0.2.7

type PolicySet struct {
	ID             string    `jsonapi:"primary,policy-sets"`
	Name           string    `jsonapi:"attr,name"`
	Description    string    `jsonapi:"attr,description"`
	Global         bool      `jsonapi:"attr,global"`
	PoliciesPath   string    `jsonapi:"attr,policies-path"`
	PolicyCount    int       `jsonapi:"attr,policy-count"`
	VCSRepo        *VCSRepo  `jsonapi:"attr,vcs-repo"`
	WorkspaceCount int       `jsonapi:"attr,workspace-count"`
	CreatedAt      time.Time `jsonapi:"attr,created-at,iso8601"`
	UpdatedAt      time.Time `jsonapi:"attr,updated-at,iso8601"`

	// Relations
	// The organization to which the policy set belongs to.
	Organization *Organization `jsonapi:"relation,organization"`
	// The workspaces to which the policy set applies.
	Workspaces []*Workspace `jsonapi:"relation,workspaces"`
	// Individually managed policies which are associated with the policy set.
	Policies []*Policy `jsonapi:"relation,policies"`
	// The most recently created policy set version, regardless of status.
	// Note that this relationship may include an errored and unusable version,
	// and is intended to allow checking for errors.
	NewestVersion *PolicySetVersion `jsonapi:"relation,newest-version"`
	// The most recent successful policy set version.
	CurrentVersion *PolicySetVersion `jsonapi:"relation,current-version"`
}

PolicySet represents a Terraform Enterprise policy set.

type PolicySetAddPoliciesOptions added in v0.2.7

type PolicySetAddPoliciesOptions struct {
	/// The policies to add to the policy set.
	Policies []*Policy
}

PolicySetAddPoliciesOptions represents the options for adding policies to a policy set.

type PolicySetAddWorkspacesOptions added in v0.3.0

type PolicySetAddWorkspacesOptions struct {
	/// The workspaces to add to the policy set.
	Workspaces []*Workspace
}

PolicySetAddWorkspacesOptions represents the options for adding workspaces to a policy set.

type PolicySetCreateOptions added in v0.2.7

type PolicySetCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,policy-sets"`

	// The name of the policy set.
	Name *string `jsonapi:"attr,name"`

	// The description of the policy set.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Whether or not the policy set is global.
	Global *bool `jsonapi:"attr,global,omitempty"`

	// The sub-path within the attached VCS repository to ingress. All
	// files and directories outside of this sub-path will be ignored.
	// This option may only be specified when a VCS repo is present.
	PoliciesPath *string `jsonapi:"attr,policies-path,omitempty"`

	// The initial members of the policy set.
	Policies []*Policy `jsonapi:"relation,policies,omitempty"`

	// VCS repository information. When present, the policies and
	// configuration will be sourced from the specified VCS repository
	// instead of being defined within the policy set itself. Note that
	// this option is mutually exclusive with the Policies option and
	// both cannot be used at the same time.
	VCSRepo *VCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"`

	// The initial list of workspaces for which the policy set should be enforced.
	Workspaces []*Workspace `jsonapi:"relation,workspaces,omitempty"`
}

PolicySetCreateOptions represents the options for creating a new policy set.

type PolicySetList added in v0.2.7

type PolicySetList struct {
	*Pagination
	Items []*PolicySet
}

PolicySetList represents a list of policy sets.

type PolicySetListOptions added in v0.2.7

type PolicySetListOptions struct {
	ListOptions

	// A search string (partial policy set name) used to filter the results.
	Search *string `url:"search[name],omitempty"`
}

PolicySetListOptions represents the options for listing policy sets.

type PolicySetParameter added in v0.4.0

type PolicySetParameter struct {
	ID        string       `jsonapi:"primary,vars"`
	Key       string       `jsonapi:"attr,key"`
	Value     string       `jsonapi:"attr,value"`
	Category  CategoryType `jsonapi:"attr,category"`
	Sensitive bool         `jsonapi:"attr,sensitive"`

	// Relations
	PolicySet *PolicySet `jsonapi:"relation,configurable"`
}

PolicySetParameter represents a Policy Set parameter

type PolicySetParameterCreateOptions added in v0.4.0

type PolicySetParameterCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,vars"`

	// The name of the parameter.
	Key *string `jsonapi:"attr,key"`

	// The value of the parameter.
	Value *string `jsonapi:"attr,value,omitempty"`

	// The Category of the parameter, should always be "policy-set"
	Category *CategoryType `jsonapi:"attr,category"`

	// Whether the value is sensitive.
	Sensitive *bool `jsonapi:"attr,sensitive,omitempty"`
}

PolicySetParameterCreateOptions represents the options for creating a new parameter.

type PolicySetParameterList added in v0.4.0

type PolicySetParameterList struct {
	*Pagination
	Items []*PolicySetParameter
}

PolicySetParameterList represents a list of parameters.

type PolicySetParameterListOptions added in v0.4.0

type PolicySetParameterListOptions struct {
	ListOptions
}

PolicySetParameterListOptions represents the options for listing parameters.

type PolicySetParameterUpdateOptions added in v0.4.0

type PolicySetParameterUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,vars"`

	// The name of the parameter.
	Key *string `jsonapi:"attr,key,omitempty"`

	// The value of the parameter.
	Value *string `jsonapi:"attr,value,omitempty"`

	// Whether the value is sensitive.
	Sensitive *bool `jsonapi:"attr,sensitive,omitempty"`
}

PolicySetParameterUpdateOptions represents the options for updating a parameter.

type PolicySetParameters added in v0.4.0

type PolicySetParameters interface {
	// List all the parameters associated with the given policy-set.
	List(ctx context.Context, policySetID string, options PolicySetParameterListOptions) (*PolicySetParameterList, error)

	// Create is used to create a new parameter.
	Create(ctx context.Context, policySetID string, options PolicySetParameterCreateOptions) (*PolicySetParameter, error)

	// Read a parameter by its ID.
	Read(ctx context.Context, policySetID string, parameterID string) (*PolicySetParameter, error)

	// Update values of an existing parameter.
	Update(ctx context.Context, policySetID string, parameterID string, options PolicySetParameterUpdateOptions) (*PolicySetParameter, error)

	// Delete a parameter by its ID.
	Delete(ctx context.Context, policySetID string, parameterID string) error
}

PolicySetParameters describes all the parameter related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/policy-set-params.html

type PolicySetReadOptions added in v0.17.0

type PolicySetReadOptions struct {
	Include string `url:"include"`
}

PolicySetReadOptions are read options. For a full list of relations, please see: https://www.terraform.io/docs/cloud/api/policy-sets.html#relationships

type PolicySetRemovePoliciesOptions added in v0.2.7

type PolicySetRemovePoliciesOptions struct {
	/// The policies to remove from the policy set.
	Policies []*Policy
}

PolicySetRemovePoliciesOptions represents the options for removing policies from a policy set.

type PolicySetRemoveWorkspacesOptions added in v0.3.0

type PolicySetRemoveWorkspacesOptions struct {
	/// The workspaces to remove from the policy set.
	Workspaces []*Workspace
}

PolicySetRemoveWorkspacesOptions represents the options for removing workspaces from a policy set.

type PolicySetUpdateOptions added in v0.2.7

type PolicySetUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,policy-sets"`

	/// The name of the policy set.
	Name *string `jsonapi:"attr,name,omitempty"`

	// The description of the policy set.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Whether or not the policy set is global.
	Global *bool `jsonapi:"attr,global,omitempty"`

	// The sub-path within the attached VCS repository to ingress. All
	// files and directories outside of this sub-path will be ignored.
	// This option may only be specified when a VCS repo is present.
	PoliciesPath *string `jsonapi:"attr,policies-path,omitempty"`

	// VCS repository information. When present, the policies and
	// configuration will be sourced from the specified VCS repository
	// instead of being defined within the policy set itself. Note that
	// specifying this option may only be used on policy sets with no
	// directly-attached policies (*PolicySet.Policies). Specifying this
	// option when policies are already present will result in an error.
	VCSRepo *VCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"`
}

PolicySetUpdateOptions represents the options for updating a policy set.

type PolicySetVersion added in v0.16.0

type PolicySetVersion struct {
	ID               string                           `jsonapi:"primary,policy-set-versions"`
	Source           PolicySetVersionSource           `jsonapi:"attr,source"`
	Status           PolicySetVersionStatus           `jsonapi:"attr,status"`
	StatusTimestamps PolicySetVersionStatusTimestamps `jsonapi:"attr,status-timestamps"`
	Error            string                           `jsonapi:"attr,error"`
	ErrorMessage     string                           `jsonapi:"attr,error-message"`
	CreatedAt        time.Time                        `jsonapi:"attr,created-at,iso8601"`
	UpdatedAt        time.Time                        `jsonapi:"attr,updated-at,iso8601"`

	// Relations
	PolicySet *PolicySet `jsonapi:"relation,policy-set"`

	// Links
	Links map[string]interface{} `jsonapi:"links,omitempty"`
}

type PolicySetVersionSource added in v0.16.0

type PolicySetVersionSource string

PolicySetVersionSource represents a source type of a policy set version.

const (
	PolicySetVersionSourceAPI       PolicySetVersionSource = "tfe-api"
	PolicySetVersionSourceADO       PolicySetVersionSource = "ado"
	PolicySetVersionSourceBitBucket PolicySetVersionSource = "bitbucket"
	PolicySetVersionSourceGitHub    PolicySetVersionSource = "github"
	PolicySetVersionSourceGitLab    PolicySetVersionSource = "gitlab"
)

List all available sources for a Policy Set Version.

type PolicySetVersionStatus added in v0.16.0

type PolicySetVersionStatus string

PolicySetVersionStatus represents a policy set version status.

const (
	PolicySetVersionErrored    PolicySetVersionStatus = "errored"
	PolicySetVersionIngressing PolicySetVersionStatus = "ingressing"
	PolicySetVersionPending    PolicySetVersionStatus = "pending"
	PolicySetVersionReady      PolicySetVersionStatus = "ready"
)

List all available policy set version statuses.

type PolicySetVersionStatusTimestamps added in v0.16.0

type PolicySetVersionStatusTimestamps struct {
	PendingAt    time.Time `jsonapi:"attr,pending-at,rfc3339"`
	IngressingAt time.Time `jsonapi:"attr,ingressing-at,rfc3339"`
	ReadyAt      time.Time `jsonapi:"attr,ready-at,rfc3339"`
	ErroredAt    time.Time `jsonapi:"attr,errored-at,rfc3339"`
}

PolicySetVersionStatusTimestamps holds the timestamps for individual policy set version statuses.

type PolicySetVersions added in v0.16.0

type PolicySetVersions interface {
	// Create is used to create a new Policy Set Version.
	Create(ctx context.Context, policySetID string) (*PolicySetVersion, error)

	// Read is used to read a Policy Set Version by its ID.
	Read(ctx context.Context, policySetVersionID string) (*PolicySetVersion, error)

	// Upload uploads policy files. It takes a Policy Set Version and a path
	// to the set of sentinel files, which will be packaged by hashicorp/go-slug
	// before being uploaded.
	Upload(ctx context.Context, psv PolicySetVersion, path string) error
}

PolicySetVersions describes all the Policy Set Version related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/policy-sets.html#create-a-policy-set-version

type PolicySets added in v0.2.7

type PolicySets interface {
	// List all the policy sets for a given organization.
	List(ctx context.Context, organization string, options PolicySetListOptions) (*PolicySetList, error)

	// Create a policy set and associate it with an organization.
	Create(ctx context.Context, organization string, options PolicySetCreateOptions) (*PolicySet, error)

	// Read a policy set by its ID.
	Read(ctx context.Context, policySetID string) (*PolicySet, error)

	// ReadWithOptions reads a policy set by its ID using the options supplied.
	ReadWithOptions(ctx context.Context, policySetID string, options *PolicySetReadOptions) (*PolicySet, error)

	// Update an existing policy set.
	Update(ctx context.Context, policySetID string, options PolicySetUpdateOptions) (*PolicySet, error)

	// Add policies to a policy set. This function can only be used when
	// there is no VCS repository associated with the policy set.
	AddPolicies(ctx context.Context, policySetID string, options PolicySetAddPoliciesOptions) error

	// Remove policies from a policy set. This function can only be used
	// when there is no VCS repository associated with the policy set.
	RemovePolicies(ctx context.Context, policySetID string, options PolicySetRemovePoliciesOptions) error

	// Add workspaces to a policy set.
	AddWorkspaces(ctx context.Context, policySetID string, options PolicySetAddWorkspacesOptions) error

	// Remove workspaces from a policy set.
	RemoveWorkspaces(ctx context.Context, policySetID string, options PolicySetRemoveWorkspacesOptions) error

	// Delete a policy set by its ID.
	Delete(ctx context.Context, policyID string) error
}

PolicySets describes all the policy set related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/policies.html

type PolicyStatus

type PolicyStatus string

PolicyStatus represents a policy check state.

const (
	PolicyCanceled    PolicyStatus = "canceled"
	PolicyErrored     PolicyStatus = "errored"
	PolicyHardFailed  PolicyStatus = "hard_failed"
	PolicyOverridden  PolicyStatus = "overridden"
	PolicyPasses      PolicyStatus = "passed"
	PolicyPending     PolicyStatus = "pending"
	PolicyQueued      PolicyStatus = "queued"
	PolicySoftFailed  PolicyStatus = "soft_failed"
	PolicyUnreachable PolicyStatus = "unreachable"
)

List all available policy check statuses.

type PolicyStatusTimestamps

type PolicyStatusTimestamps struct {
	ErroredAt    time.Time `jsonapi:"attr,errored-at,rfc3339"`
	HardFailedAt time.Time `jsonapi:"attr,hard-failed-at,rfc3339"`
	PassedAt     time.Time `jsonapi:"attr,passed-at,rfc3339"`
	QueuedAt     time.Time `jsonapi:"attr,queued-at,rfc3339"`
	SoftFailedAt time.Time `jsonapi:"attr,soft-failed-at,rfc3339"`
}

PolicyStatusTimestamps holds the timestamps for individual policy check statuses.

type PolicyUpdateOptions

type PolicyUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,policies"`

	// A description of the policy's purpose.
	Description *string `jsonapi:"attr,description,omitempty"`

	// The enforcements of the policy.
	Enforce []*EnforcementOptions `jsonapi:"attr,enforce,omitempty"`
}

PolicyUpdateOptions represents the options for updating a policy.

type RegistryModule added in v0.10.0

type RegistryModule struct {
	ID              string                          `jsonapi:"primary,registry-modules"`
	Name            string                          `jsonapi:"attr,name"`
	Provider        string                          `jsonapi:"attr,provider"`
	Permissions     *RegistryModulePermissions      `jsonapi:"attr,permissions"`
	Status          RegistryModuleStatus            `jsonapi:"attr,status"`
	VCSRepo         *VCSRepo                        `jsonapi:"attr,vcs-repo"`
	VersionStatuses []RegistryModuleVersionStatuses `jsonapi:"attr,version-statuses"`
	CreatedAt       string                          `jsonapi:"attr,created-at"`
	UpdatedAt       string                          `jsonapi:"attr,updated-at"`

	// Relations
	Organization *Organization `jsonapi:"relation,organization"`
}

RegistryModule represents a registry module

type RegistryModuleCreateOptions added in v0.10.0

type RegistryModuleCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,registry-modules"`

	Name     *string `jsonapi:"attr,name"`
	Provider *string `jsonapi:"attr,provider"`
}

RegistryModuleCreateOptions is used when creating a registry module without a VCS repo

type RegistryModuleCreateVersionOptions added in v0.10.0

type RegistryModuleCreateVersionOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,registry-module-versions"`

	Version *string `jsonapi:"attr,version"`
}

RegistryModuleCreateVersionOptions is used when creating a registry module version

type RegistryModuleCreateWithVCSConnectionOptions added in v0.10.0

type RegistryModuleCreateWithVCSConnectionOptions struct {
	ID string `jsonapi:"primary,registry-modules"`

	// VCS repository information
	VCSRepo *RegistryModuleVCSRepoOptions `jsonapi:"attr,vcs-repo"`
}

RegistryModuleCreateWithVCSConnectionOptions is used when creating a registry module with a VCS repo

type RegistryModulePermissions added in v0.10.0

type RegistryModulePermissions struct {
	CanDelete bool `jsonapi:"attr,can-delete"`
	CanResync bool `jsonapi:"attr,can-resync"`
	CanRetry  bool `jsonapi:"attr,can-retry"`
}

type RegistryModuleStatus added in v0.10.0

type RegistryModuleStatus string

RegistryModuleStatus represents the status of the registry module

const (
	RegistryModuleStatusPending       RegistryModuleStatus = "pending"
	RegistryModuleStatusNoVersionTags RegistryModuleStatus = "no_version_tags"
	RegistryModuleStatusSetupFailed   RegistryModuleStatus = "setup_failed"
	RegistryModuleStatusSetupComplete RegistryModuleStatus = "setup_complete"
)

List of available registry module statuses

type RegistryModuleVCSRepoOptions added in v0.10.0

type RegistryModuleVCSRepoOptions struct {
	Identifier        *string `json:"identifier"`
	OAuthTokenID      *string `json:"oauth-token-id"`
	DisplayIdentifier *string `json:"display-identifier"`
}

type RegistryModuleVersion added in v0.10.0

type RegistryModuleVersion struct {
	ID        string                      `jsonapi:"primary,registry-module-versions"`
	Source    string                      `jsonapi:"attr,source"`
	Status    RegistryModuleVersionStatus `jsonapi:"attr,status"`
	Version   string                      `jsonapi:"attr,version"`
	CreatedAt string                      `jsonapi:"attr,created-at"`
	UpdatedAt string                      `jsonapi:"attr,updated-at"`

	// Relations
	RegistryModule *RegistryModule `jsonapi:"relation,registry-module"`

	// Links
	Links map[string]interface{} `jsonapi:"links,omitempty"`
}

RegistryModuleVersion represents a registry module version

type RegistryModuleVersionStatus added in v0.10.0

type RegistryModuleVersionStatus string

RegistryModuleVersionStatus represents the status of a specific version of a registry module

const (
	RegistryModuleVersionStatusPending             RegistryModuleVersionStatus = "pending"
	RegistryModuleVersionStatusCloning             RegistryModuleVersionStatus = "cloning"
	RegistryModuleVersionStatusCloneFailed         RegistryModuleVersionStatus = "clone_failed"
	RegistryModuleVersionStatusRegIngressReqFailed RegistryModuleVersionStatus = "reg_ingress_req_failed"
	RegistryModuleVersionStatusRegIngressing       RegistryModuleVersionStatus = "reg_ingressing"
	RegistryModuleVersionStatusRegIngressFailed    RegistryModuleVersionStatus = "reg_ingress_failed"
	RegistryModuleVersionStatusOk                  RegistryModuleVersionStatus = "ok"
)

List of available registry module version statuses

type RegistryModuleVersionStatuses added in v0.10.0

type RegistryModuleVersionStatuses struct {
	Version string                      `jsonapi:"attr,version"`
	Status  RegistryModuleVersionStatus `jsonapi:"attr,status"`
	Error   string                      `jsonapi:"attr,error"`
}

type RegistryModules added in v0.10.0

type RegistryModules interface {
	// Create a registry module without a VCS repo
	Create(ctx context.Context, organization string, options RegistryModuleCreateOptions) (*RegistryModule, error)

	// Create a registry module version
	CreateVersion(ctx context.Context, organization string, name string, provider string, options RegistryModuleCreateVersionOptions) (*RegistryModuleVersion, error)

	// Create and publish a registry module with a VCS repo
	CreateWithVCSConnection(ctx context.Context, options RegistryModuleCreateWithVCSConnectionOptions) (*RegistryModule, error)

	// Read a registry module
	Read(ctx context.Context, organization string, name string, provider string) (*RegistryModule, error)

	// Delete a registry module
	Delete(ctx context.Context, organization string, name string) error

	// Delete a specific registry module provider
	DeleteProvider(ctx context.Context, organization string, name string, provider string) error

	// Delete a specific registry module version
	DeleteVersion(ctx context.Context, organization string, name string, provider string, version string) error

	// Upload Terraform configuration files for the provided registry module version. It
	// requires a path to the configuration files on disk, which will be packaged by
	// hashicorp/go-slug before being uploaded.
	Upload(ctx context.Context, rmv RegistryModuleVersion, path string) error
}

RegistryModules describes all the registry module related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/modules.html

type RemoteStateConsumersListOptions added in v0.19.0

type RemoteStateConsumersListOptions struct {
	ListOptions
}

type RetryLogHook added in v0.3.11

type RetryLogHook func(attemptNum int, resp *http.Response)

RetryLogHook allows a function to run before each retry.

type Run

type Run struct {
	ID                     string               `jsonapi:"primary,runs"`
	Actions                *RunActions          `jsonapi:"attr,actions"`
	AutoApply              bool                 `jsonapi:"attr,auto-apply,omitempty"`
	CreatedAt              time.Time            `jsonapi:"attr,created-at,iso8601"`
	ForceCancelAvailableAt time.Time            `jsonapi:"attr,force-cancel-available-at,iso8601"`
	HasChanges             bool                 `jsonapi:"attr,has-changes"`
	IsDestroy              bool                 `jsonapi:"attr,is-destroy"`
	Message                string               `jsonapi:"attr,message"`
	Permissions            *RunPermissions      `jsonapi:"attr,permissions"`
	PositionInQueue        int                  `jsonapi:"attr,position-in-queue"`
	Refresh                bool                 `jsonapi:"attr,refresh"`
	RefreshOnly            bool                 `jsonapi:"attr,refresh-only"`
	ReplaceAddrs           []string             `jsonapi:"attr,replace-addrs,omitempty"`
	Source                 RunSource            `jsonapi:"attr,source"`
	Status                 RunStatus            `jsonapi:"attr,status"`
	StatusTimestamps       *RunStatusTimestamps `jsonapi:"attr,status-timestamps"`
	TargetAddrs            []string             `jsonapi:"attr,target-addrs,omitempty"`

	// Relations
	Apply                *Apply                `jsonapi:"relation,apply"`
	ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"`
	CostEstimate         *CostEstimate         `jsonapi:"relation,cost-estimate"`
	CreatedBy            *User                 `jsonapi:"relation,created-by"`
	Plan                 *Plan                 `jsonapi:"relation,plan"`
	PolicyChecks         []*PolicyCheck        `jsonapi:"relation,policy-checks"`
	Workspace            *Workspace            `jsonapi:"relation,workspace"`
}

Run represents a Terraform Enterprise run.

type RunActions

type RunActions struct {
	IsCancelable      bool `jsonapi:"attr,is-cancelable"`
	IsConfirmable     bool `jsonapi:"attr,is-confirmable"`
	IsDiscardable     bool `jsonapi:"attr,is-discardable"`
	IsForceCancelable bool `jsonapi:"attr,is-force-cancelable"`
}

RunActions represents the run actions.

type RunApplyOptions

type RunApplyOptions struct {
	// An optional comment about the run.
	Comment *string `jsonapi:"attr,comment,omitempty"`
}

RunApplyOptions represents the options for applying a run.

type RunCancelOptions

type RunCancelOptions struct {
	// An optional explanation for why the run was canceled.
	Comment *string `jsonapi:"attr,comment,omitempty"`
}

RunCancelOptions represents the options for canceling a run.

type RunCreateOptions

type RunCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,runs"`

	// Specifies if this plan is a destroy plan, which will destroy all
	// provisioned resources.
	IsDestroy *bool `jsonapi:"attr,is-destroy,omitempty"`

	// Refresh determines if the run should
	// update the state prior to checking for differences
	Refresh *bool `jsonapi:"attr,refresh,omitempty"`

	// RefreshOnly determines whether the run should ignore config changes
	// and refresh the state only
	RefreshOnly *bool `jsonapi:"attr,refresh-only,omitempty"`

	// Specifies the message to be associated with this run.
	Message *string `jsonapi:"attr,message,omitempty"`

	// Specifies the configuration version to use for this run. If the
	// configuration version object is omitted, the run will be created using the
	// workspace's latest configuration version.
	ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"`

	// Specifies the workspace where the run will be executed.
	Workspace *Workspace `jsonapi:"relation,workspace"`

	// If non-empty, requests that Terraform should create a plan including
	// actions only for the given objects (specified using resource address
	// syntax) and the objects they depend on.
	//
	// This capability is provided for exceptional circumstances only, such as
	// recovering from mistakes or working around existing Terraform
	// limitations. Terraform will generally mention the -target command line
	// option in its error messages describing situations where setting this
	// argument may be appropriate. This argument should not be used as part
	// of routine workflow and Terraform will emit warnings reminding about
	// this whenever this property is set.
	TargetAddrs []string `jsonapi:"attr,target-addrs,omitempty"`

	// If non-empty, requests that Terraform create a plan that replaces
	// (destroys and then re-creates) the objects specified by the given
	// resource addresses.
	ReplaceAddrs []string `jsonapi:"attr,replace-addrs,omitempty"`

	// AutoApply determines if the run should be applied automatically without
	// user confirmation. It defaults to the Workspace.AutoApply setting.
	AutoApply *bool `jsonapi:"attr,auto-apply,omitempty"`
}

RunCreateOptions represents the options for creating a new run.

type RunDiscardOptions

type RunDiscardOptions struct {
	// An optional explanation for why the run was discarded.
	Comment *string `jsonapi:"attr,comment,omitempty"`
}

RunDiscardOptions represents the options for discarding a run.

type RunForceCancelOptions added in v0.2.4

type RunForceCancelOptions struct {
	// An optional comment explaining the reason for the force-cancel.
	Comment *string `jsonapi:"attr,comment,omitempty"`
}

RunForceCancelOptions represents the options for force-canceling a run.

type RunList added in v0.2.0

type RunList struct {
	*Pagination
	Items []*Run
}

RunList represents a list of runs.

type RunListOptions

type RunListOptions struct {
	ListOptions

	// A list of relations to include. See available resources:
	// https://www.terraform.io/docs/cloud/api/run.html#available-related-resources
	Include *string `url:"include"`
}

RunListOptions represents the options for listing runs.

type RunPermissions

type RunPermissions struct {
	CanApply        bool `jsonapi:"attr,can-apply"`
	CanCancel       bool `jsonapi:"attr,can-cancel"`
	CanDiscard      bool `jsonapi:"attr,can-discard"`
	CanForceCancel  bool `jsonapi:"attr,can-force-cancel"`
	CanForceExecute bool `jsonapi:"attr,can-force-execute"`
}

RunPermissions represents the run permissions.

type RunQueue added in v0.2.4

type RunQueue struct {
	*Pagination
	Items []*Run
}

RunQueue represents the current run queue of an organization.

type RunQueueOptions added in v0.2.4

type RunQueueOptions struct {
	ListOptions
}

RunQueueOptions represents the options for showing the queue.

type RunReadOptions added in v0.12.0

type RunReadOptions struct {
	Include string `url:"include"`
}

RunReadOptions represents the options for reading a run.

type RunSource

type RunSource string

RunSource represents a source type of a run.

const (
	RunSourceAPI                  RunSource = "tfe-api"
	RunSourceConfigurationVersion RunSource = "tfe-configuration-version"
	RunSourceUI                   RunSource = "tfe-ui"
)

List all available run sources.

type RunStatus

type RunStatus string

RunStatus represents a run state.

const (
	RunApplied            RunStatus = "applied"
	RunApplyQueued        RunStatus = "apply_queued"
	RunApplying           RunStatus = "applying"
	RunCanceled           RunStatus = "canceled"
	RunConfirmed          RunStatus = "confirmed"
	RunCostEstimated      RunStatus = "cost_estimated"
	RunCostEstimating     RunStatus = "cost_estimating"
	RunDiscarded          RunStatus = "discarded"
	RunErrored            RunStatus = "errored"
	RunPending            RunStatus = "pending"
	RunPlanQueued         RunStatus = "plan_queued"
	RunPlanned            RunStatus = "planned"
	RunPlannedAndFinished RunStatus = "planned_and_finished"
	RunPlanning           RunStatus = "planning"
	RunPolicyChecked      RunStatus = "policy_checked"
	RunPolicyChecking     RunStatus = "policy_checking"
	RunPolicyOverride     RunStatus = "policy_override"
	RunPolicySoftFailed   RunStatus = "policy_soft_failed"
)

List all available run statuses.

type RunStatusTimestamps

type RunStatusTimestamps struct {
	AppliedAt            time.Time `jsonapi:"attr,applied-at,rfc3339"`
	ApplyQueuedAt        time.Time `jsonapi:"attr,apply-queued-at,rfc3339"`
	ApplyingAt           time.Time `jsonapi:"attr,applying-at,rfc3339"`
	CanceledAt           time.Time `jsonapi:"attr,canceled-at,rfc3339"`
	ConfirmedAt          time.Time `jsonapi:"attr,confirmed-at,rfc3339"`
	CostEstimatedAt      time.Time `jsonapi:"attr,cost-estimated-at,rfc3339"`
	CostEstimatingAt     time.Time `jsonapi:"attr,cost-estimating-at,rfc3339"`
	DiscardedAt          time.Time `jsonapi:"attr,discarded-at,rfc3339"`
	ErroredAt            time.Time `jsonapi:"attr,errored-at,rfc3339"`
	ForceCanceledAt      time.Time `jsonapi:"attr,force-canceled-at,rfc3339"`
	PlanQueueableAt      time.Time `jsonapi:"attr,plan-queueable-at,rfc3339"`
	PlanQueuedAt         time.Time `jsonapi:"attr,plan-queued-at,rfc3339"`
	PlannedAndFinishedAt time.Time `jsonapi:"attr,planned-and-finished-at,rfc3339"`
	PlannedAt            time.Time `jsonapi:"attr,planned-at,rfc3339"`
	PlanningAt           time.Time `jsonapi:"attr,planning-at,rfc3339"`
	PolicyCheckedAt      time.Time `jsonapi:"attr,policy-checked-at,rfc3339"`
	PolicySoftFailedAt   time.Time `jsonapi:"attr,policy-soft-failed-at,rfc3339"`
}

RunStatusTimestamps holds the timestamps for individual run statuses.

type RunTrigger added in v0.5.0

type RunTrigger struct {
	ID             string    `jsonapi:"primary,run-triggers"`
	CreatedAt      time.Time `jsonapi:"attr,created-at,iso8601"`
	SourceableName string    `jsonapi:"attr,sourceable-name"`
	WorkspaceName  string    `jsonapi:"attr,workspace-name"`

	// Relations
	// TODO: this will eventually need to be polymorphic
	Sourceable *Workspace `jsonapi:"relation,sourceable"`
	Workspace  *Workspace `jsonapi:"relation,workspace"`
}

RunTrigger represents a run trigger.

type RunTriggerCreateOptions added in v0.5.0

type RunTriggerCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,run-triggers"`

	// The source workspace
	Sourceable *Workspace `jsonapi:"relation,sourceable"`
}

RunTriggerCreateOptions represents the options for creating a new run trigger.

type RunTriggerList added in v0.5.0

type RunTriggerList struct {
	*Pagination
	Items []*RunTrigger
}

RunTriggerList represents a list of Run Triggers

type RunTriggerListOptions added in v0.5.0

type RunTriggerListOptions struct {
	ListOptions
	RunTriggerType *string `url:"filter[run-trigger][type]"`
}

RunTriggerListOptions represents the options for listing run triggers.

type RunTriggers added in v0.5.0

type RunTriggers interface {
	// List all the run triggers within a workspace.
	List(ctx context.Context, workspaceID string, options RunTriggerListOptions) (*RunTriggerList, error)

	// Create a new run trigger with the given options.
	Create(ctx context.Context, workspaceID string, options RunTriggerCreateOptions) (*RunTrigger, error)

	// Read a run trigger by its ID.
	Read(ctx context.Context, RunTriggerID string) (*RunTrigger, error)

	// Delete a run trigger by its ID.
	Delete(ctx context.Context, RunTriggerID string) error
}

RunTriggers describes all the Run Trigger related methods that the Terraform Cloud API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/run-triggers.html

type Runs

type Runs interface {
	// List all the runs of the given workspace.
	List(ctx context.Context, workspaceID string, options RunListOptions) (*RunList, error)

	// Create a new run with the given options.
	Create(ctx context.Context, options RunCreateOptions) (*Run, error)

	// Read a run by its ID.
	Read(ctx context.Context, runID string) (*Run, error)

	// ReadWithOptions reads a run by its ID using the options supplied
	ReadWithOptions(ctx context.Context, runID string, options *RunReadOptions) (*Run, error)

	// Apply a run by its ID.
	Apply(ctx context.Context, runID string, options RunApplyOptions) error

	// Cancel a run by its ID.
	Cancel(ctx context.Context, runID string, options RunCancelOptions) error

	// Force-cancel a run by its ID.
	ForceCancel(ctx context.Context, runID string, options RunForceCancelOptions) error

	// Discard a run by its ID.
	Discard(ctx context.Context, runID string, options RunDiscardOptions) error
}

Runs describes all the run related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/run.html

type RunsPermissionType added in v0.9.0

type RunsPermissionType string

RunsPermissionType represents the permissiontype to a workspace's runs.

func RunsPermission added in v0.9.0

func RunsPermission(v RunsPermissionType) *RunsPermissionType

RunsPermission returns a pointer to the given team runs permission type.

type SAMLSettings added in v0.13.0

type SAMLSettings interface {
	// Read returns the SAML settings.
	Read(ctx context.Context) (*AdminSAMLSetting, error)

	// Update updates the SAML settings.
	Update(ctx context.Context, options AdminSAMLSettingsUpdateOptions) (*AdminSAMLSetting, error)

	// RevokeIdpCert revokes the older IdP certificate when the new IdP
	// certificate is known to be functioning correctly.
	RevokeIdpCert(ctx context.Context) (*AdminSAMLSetting, error)
}

SAMLSettings describes all the SAML admin settings.

type SMTPAuthType added in v0.13.0

type SMTPAuthType string

SMTPAuthType represents valid SMTP Auth types.

const (
	SMTPAuthNone  SMTPAuthType = "none"
	SMTPAuthPlain SMTPAuthType = "plain"
	SMTPAuthLogin SMTPAuthType = "login"
)

List of all SMTP auth types.

func SMTPAuthValue added in v0.13.0

func SMTPAuthValue(v SMTPAuthType) *SMTPAuthType

SMTPAuthValue returns a pointer to a given smtp auth type.

type SMTPSettings added in v0.13.0

type SMTPSettings interface {
	// Read returns the SMTP settings.
	Read(ctx context.Context) (*AdminSMTPSetting, error)

	// Update updates SMTP settings.
	Update(ctx context.Context, options AdminSMTPSettingsUpdateOptions) (*AdminSMTPSetting, error)
}

SMTPSettings describes all the SMTP admin settings.

type SSHKey

type SSHKey struct {
	ID   string `jsonapi:"primary,ssh-keys"`
	Name string `jsonapi:"attr,name"`
}

SSHKey represents a SSH key.

type SSHKeyCreateOptions

type SSHKeyCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,ssh-keys"`

	// A name to identify the SSH key.
	Name *string `jsonapi:"attr,name"`

	// The content of the SSH private key.
	Value *string `jsonapi:"attr,value"`
}

SSHKeyCreateOptions represents the options for creating an SSH key.

type SSHKeyList added in v0.2.0

type SSHKeyList struct {
	*Pagination
	Items []*SSHKey
}

SSHKeyList represents a list of SSH keys.

type SSHKeyListOptions

type SSHKeyListOptions struct {
	ListOptions
}

SSHKeyListOptions represents the options for listing SSH keys.

type SSHKeyUpdateOptions

type SSHKeyUpdateOptions struct {
	// For internal use only!
	ID string `jsonapi:"primary,ssh-keys"`

	// A new name to identify the SSH key.
	Name *string `jsonapi:"attr,name,omitempty"`

	// Updated content of the SSH private key.
	Value *string `jsonapi:"attr,value,omitempty"`
}

SSHKeyUpdateOptions represents the options for updating an SSH key.

type SSHKeys

type SSHKeys interface {
	// List all the SSH keys for a given organization
	List(ctx context.Context, organization string, options SSHKeyListOptions) (*SSHKeyList, error)

	// Create an SSH key and associate it with an organization.
	Create(ctx context.Context, organization string, options SSHKeyCreateOptions) (*SSHKey, error)

	// Read an SSH key by its ID.
	Read(ctx context.Context, sshKeyID string) (*SSHKey, error)

	// Update an SSH key by its ID.
	Update(ctx context.Context, sshKeyID string, options SSHKeyUpdateOptions) (*SSHKey, error)

	// Delete an SSH key by its ID.
	Delete(ctx context.Context, sshKeyID string) error
}

SSHKeys describes all the SSH key related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/ssh-keys.html

type SentinelMocksPermissionType added in v0.9.0

type SentinelMocksPermissionType string

SentinelMocksPermissionType represents the permissiontype to a workspace's Sentinel mocks.

func SentinelMocksPermission added in v0.9.0

func SentinelMocksPermission(v SentinelMocksPermissionType) *SentinelMocksPermissionType

SentinelMocksPermission returns a pointer to the given team Sentinel mocks permission type.

type ServiceProviderType

type ServiceProviderType string

ServiceProviderType represents a VCS type.

const (
	ServiceProviderAzureDevOpsServer   ServiceProviderType = "ado_server"
	ServiceProviderAzureDevOpsServices ServiceProviderType = "ado_services"
	ServiceProviderBitbucket           ServiceProviderType = "bitbucket_hosted"
	// Bitbucket Server v5.4.0 and above
	ServiceProviderBitbucketServer ServiceProviderType = "bitbucket_server"
	// Bitbucket Server v5.3.0 and below
	ServiceProviderBitbucketServerLegacy ServiceProviderType = "bitbucket_server_legacy"
	ServiceProviderGithub                ServiceProviderType = "github"
	ServiceProviderGithubEE              ServiceProviderType = "github_enterprise"
	ServiceProviderGitlab                ServiceProviderType = "gitlab_hosted"
	ServiceProviderGitlabCE              ServiceProviderType = "gitlab_community_edition"
	ServiceProviderGitlabEE              ServiceProviderType = "gitlab_enterprise_edition"
)

List of available VCS types.

func ServiceProvider

func ServiceProvider(v ServiceProviderType) *ServiceProviderType

ServiceProvider returns a pointer to the given service provider type.

type StateVersion

type StateVersion struct {
	ID           string    `jsonapi:"primary,state-versions"`
	CreatedAt    time.Time `jsonapi:"attr,created-at,iso8601"`
	DownloadURL  string    `jsonapi:"attr,hosted-state-download-url"`
	Serial       int64     `jsonapi:"attr,serial"`
	VCSCommitSHA string    `jsonapi:"attr,vcs-commit-sha"`
	VCSCommitURL string    `jsonapi:"attr,vcs-commit-url"`

	// Relations
	Run     *Run                  `jsonapi:"relation,run"`
	Outputs []*StateVersionOutput `jsonapi:"relation,outputs"`
}

StateVersion represents a Terraform Enterprise state version.

type StateVersionCreateOptions

type StateVersionCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,state-versions"`

	// The lineage of the state.
	Lineage *string `jsonapi:"attr,lineage,omitempty"`

	// The MD5 hash of the state version.
	MD5 *string `jsonapi:"attr,md5"`

	// The serial of the state.
	Serial *int64 `jsonapi:"attr,serial"`

	// The base64 encoded state.
	State *string `jsonapi:"attr,state"`

	// Force can be set to skip certain validations. Wrong use
	// of this flag can cause data loss, so USE WITH CAUTION!
	Force *bool `jsonapi:"attr,force"`

	// Specifies the run to associate the state with.
	Run *Run `jsonapi:"relation,run,omitempty"`
}

StateVersionCreateOptions represents the options for creating a state version.

type StateVersionCurrentOptions added in v0.11.0

type StateVersionCurrentOptions struct {
	Include string `url:"include"`
}

StateVersionCurrentOptions represents the options for reading the current state version.

type StateVersionList added in v0.2.0

type StateVersionList struct {
	*Pagination
	Items []*StateVersion
}

StateVersionList represents a list of state versions.

type StateVersionListOptions

type StateVersionListOptions struct {
	ListOptions
	Organization *string `url:"filter[organization][name]"`
	Workspace    *string `url:"filter[workspace][name]"`
}

StateVersionListOptions represents the options for listing state versions.

type StateVersionOutput added in v0.11.0

type StateVersionOutput struct {
	ID        string      `jsonapi:"primary,state-version-outputs"`
	Name      string      `jsonapi:"attr,name"`
	Sensitive bool        `jsonapi:"attr,sensitive"`
	Type      string      `jsonapi:"attr,type"`
	Value     interface{} `jsonapi:"attr,value"`
}

type StateVersionOutputs added in v0.11.0

type StateVersionOutputs interface {
	Read(ctx context.Context, outputID string) (*StateVersionOutput, error)
}

State version outputs are the output values from a Terraform state file. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs.

TFE API docs: https://www.terraform.io/docs/cloud/api/state-version-outputs.html

type StateVersionOutputsList added in v0.18.0

type StateVersionOutputsList struct {
	*Pagination
	Items []*StateVersionOutput
}

StateVersionOutputsList represents a list of StateVersionOutput items.

type StateVersionOutputsListOptions added in v0.18.0

type StateVersionOutputsListOptions struct {
	ListOptions
}

StateVersionOutputsListOptions represents the options for listing state version outputs.

type StateVersionReadOptions added in v0.11.0

type StateVersionReadOptions struct {
	Include string `url:"include"`
}

StateVersionReadOptions represents the options for reading state version.

type StateVersions

type StateVersions interface {
	// List all the state versions for a given workspace.
	List(ctx context.Context, options StateVersionListOptions) (*StateVersionList, error)

	// Create a new state version for the given workspace.
	Create(ctx context.Context, workspaceID string, options StateVersionCreateOptions) (*StateVersion, error)

	// Read a state version by its ID.
	Read(ctx context.Context, svID string) (*StateVersion, error)

	// ReadWithOptions reads a state version by its ID using the options supplied
	ReadWithOptions(ctx context.Context, svID string, options *StateVersionReadOptions) (*StateVersion, error)

	// Current reads the latest available state from the given workspace.
	Current(ctx context.Context, workspaceID string) (*StateVersion, error)

	// CurrentWithOptions reads the latest available state from the given workspace using the options supplied
	CurrentWithOptions(ctx context.Context, workspaceID string, options *StateVersionCurrentOptions) (*StateVersion, error)

	// Download retrieves the actual stored state of a state version
	Download(ctx context.Context, url string) ([]byte, error)

	// Outputs retrieves all the outputs of a state version by its ID.
	Outputs(ctx context.Context, svID string, options StateVersionOutputsListOptions) ([]*StateVersionOutput, error)
}

StateVersions describes all the state version related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/state-versions.html

type StateVersionsPermissionType added in v0.9.0

type StateVersionsPermissionType string

StateVersionsPermissionType represents the permissiontype to a workspace's state versions.

func StateVersionsPermission added in v0.9.0

func StateVersionsPermission(v StateVersionsPermissionType) *StateVersionsPermissionType

StateVersionsPermission returns a pointer to the given team state versions permission type.

type Tag added in v0.19.0

type Tag struct {
	ID   string `jsonapi:"primary,tags"`
	Name string `jsonapi:"attr,name,omitempty"`
}

Tag is owned by an organization and applied to workspaces. Used for grouping and search.

type TagList added in v0.19.0

type TagList struct {
	*Pagination
	Items []*Tag
}

type Team

type Team struct {
	ID                 string              `jsonapi:"primary,teams"`
	Name               string              `jsonapi:"attr,name"`
	OrganizationAccess *OrganizationAccess `jsonapi:"attr,organization-access"`
	Visibility         string              `jsonapi:"attr,visibility"`
	Permissions        *TeamPermissions    `jsonapi:"attr,permissions"`
	UserCount          int                 `jsonapi:"attr,users-count"`

	// Relations
	Users                   []*User                   `jsonapi:"relation,users"`
	OrganizationMemberships []*OrganizationMembership `jsonapi:"relation,organization-memberships"`
}

Team represents a Terraform Enterprise team.

type TeamAccess

type TeamAccess struct {
	ID               string                      `jsonapi:"primary,team-workspaces"`
	Access           AccessType                  `jsonapi:"attr,access"`
	Runs             RunsPermissionType          `jsonapi:"attr,runs"`
	Variables        VariablesPermissionType     `jsonapi:"attr,variables"`
	StateVersions    StateVersionsPermissionType `jsonapi:"attr,state-versions"`
	SentinelMocks    SentinelMocksPermissionType `jsonapi:"attr,sentinel-mocks"`
	WorkspaceLocking bool                        `jsonapi:"attr,workspace-locking"`

	// Relations
	Team      *Team      `jsonapi:"relation,team"`
	Workspace *Workspace `jsonapi:"relation,workspace"`
}

TeamAccess represents the workspace access for a team.

type TeamAccessAddOptions

type TeamAccessAddOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,team-workspaces"`

	// The type of access to grant.
	Access *AccessType `jsonapi:"attr,access"`

	// Custom workspace access permissions. These can only be edited when Access is 'custom'; otherwise, they are
	// read-only and reflect the Access level's implicit permissions.
	Runs             *RunsPermissionType          `jsonapi:"attr,runs,omitempty"`
	Variables        *VariablesPermissionType     `jsonapi:"attr,variables,omitempty"`
	StateVersions    *StateVersionsPermissionType `jsonapi:"attr,state-versions,omitempty"`
	SentinelMocks    *SentinelMocksPermissionType `jsonapi:"attr,sentinel-mocks,omitempty"`
	WorkspaceLocking *bool                        `jsonapi:"attr,workspace-locking,omitempty"`

	// The team to add to the workspace
	Team *Team `jsonapi:"relation,team"`

	// The workspace to which the team is to be added.
	Workspace *Workspace `jsonapi:"relation,workspace"`
}

TeamAccessAddOptions represents the options for adding team access.

type TeamAccessList added in v0.2.0

type TeamAccessList struct {
	*Pagination
	Items []*TeamAccess
}

TeamAccessList represents a list of team accesses.

type TeamAccessListOptions

type TeamAccessListOptions struct {
	ListOptions
	WorkspaceID *string `url:"filter[workspace][id],omitempty"`
}

TeamAccessListOptions represents the options for listing team accesses.

type TeamAccessUpdateOptions added in v0.9.0

type TeamAccessUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,team-workspaces"`

	// The type of access to grant.
	Access *AccessType `jsonapi:"attr,access,omitempty"`

	// Custom workspace access permissions. These can only be edited when Access is 'custom'; otherwise, they are
	// read-only and reflect the Access level's implicit permissions.
	Runs             *RunsPermissionType          `jsonapi:"attr,runs,omitempty"`
	Variables        *VariablesPermissionType     `jsonapi:"attr,variables,omitempty"`
	StateVersions    *StateVersionsPermissionType `jsonapi:"attr,state-versions,omitempty"`
	SentinelMocks    *SentinelMocksPermissionType `jsonapi:"attr,sentinel-mocks,omitempty"`
	WorkspaceLocking *bool                        `jsonapi:"attr,workspace-locking,omitempty"`
}

TeamAccessUpdateOptions represents the options for updating team access.

type TeamAccesses

type TeamAccesses interface {
	// List all the team accesses for a given workspace.
	List(ctx context.Context, options TeamAccessListOptions) (*TeamAccessList, error)

	// Add team access for a workspace.
	Add(ctx context.Context, options TeamAccessAddOptions) (*TeamAccess, error)

	// Read a team access by its ID.
	Read(ctx context.Context, teamAccessID string) (*TeamAccess, error)

	// Update a team access by its ID.
	Update(ctx context.Context, teamAccessID string, options TeamAccessUpdateOptions) (*TeamAccess, error)

	// Remove team access from a workspace.
	Remove(ctx context.Context, teamAccessID string) error
}

TeamAccesses describes all the team access related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/team-access.html

type TeamCreateOptions

type TeamCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,teams"`

	// Name of the team.
	Name *string `jsonapi:"attr,name"`

	// The team's organization access
	OrganizationAccess *OrganizationAccessOptions `jsonapi:"attr,organization-access,omitempty"`

	// The team's visibility ("secret", "organization")
	Visibility *string `jsonapi:"attr,visibility,omitempty"`
}

TeamCreateOptions represents the options for creating a team.

type TeamList added in v0.2.0

type TeamList struct {
	*Pagination
	Items []*Team
}

TeamList represents a list of teams.

type TeamListOptions

type TeamListOptions struct {
	ListOptions

	Include string `url:"include"`
}

TeamListOptions represents the options for listing teams.

type TeamMemberAddOptions

type TeamMemberAddOptions struct {
	Usernames                 []string
	OrganizationMembershipIDs []string
}

TeamMemberAddOptions represents the options for adding or removing team members.

type TeamMemberRemoveOptions

type TeamMemberRemoveOptions struct {
	Usernames                 []string
	OrganizationMembershipIDs []string
}

TeamMemberRemoveOptions represents the options for adding or removing team members.

type TeamMembers

type TeamMembers interface {
	// List returns all Users of a team calling ListUsers
	// See ListOrganizationMemberships for fetching memberships
	List(ctx context.Context, teamID string) ([]*User, error)

	// ListUsers returns the Users of this team.
	ListUsers(ctx context.Context, teamID string) ([]*User, error)

	// ListOrganizationMemberships returns the OrganizationMemberships of this team.
	ListOrganizationMemberships(ctx context.Context, teamID string) ([]*OrganizationMembership, error)

	// Add multiple users to a team.
	Add(ctx context.Context, teamID string, options TeamMemberAddOptions) error

	// Remove multiple users from a team.
	Remove(ctx context.Context, teamID string, options TeamMemberRemoveOptions) error
}

TeamMembers describes all the team member related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/team-members.html

type TeamPermissions

type TeamPermissions struct {
	CanDestroy          bool `jsonapi:"attr,can-destroy"`
	CanUpdateMembership bool `jsonapi:"attr,can-update-membership"`
}

TeamPermissions represents the current user's permissions on the team.

type TeamToken

type TeamToken struct {
	ID          string    `jsonapi:"primary,authentication-tokens"`
	CreatedAt   time.Time `jsonapi:"attr,created-at,iso8601"`
	Description string    `jsonapi:"attr,description"`
	LastUsedAt  time.Time `jsonapi:"attr,last-used-at,iso8601"`
	Token       string    `jsonapi:"attr,token"`
}

TeamToken represents a Terraform Enterprise team token.

type TeamTokens

type TeamTokens interface {
	// Generate a new team token, replacing any existing token.
	Generate(ctx context.Context, teamID string) (*TeamToken, error)

	// Read a team token by its ID.
	Read(ctx context.Context, teamID string) (*TeamToken, error)

	// Delete a team token by its ID.
	Delete(ctx context.Context, teamID string) error
}

TeamTokens describes all the team token related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/team-tokens.html

type TeamUpdateOptions added in v0.3.8

type TeamUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,teams"`

	// New name for the team
	Name *string `jsonapi:"attr,name,omitempty"`

	// The team's organization access
	OrganizationAccess *OrganizationAccessOptions `jsonapi:"attr,organization-access,omitempty"`

	// The team's visibility ("secret", "organization")
	Visibility *string `jsonapi:"attr,visibility,omitempty"`
}

TeamUpdateOptions represents the options for updating a team.

type Teams

type Teams interface {
	// List all the teams of the given organization.
	List(ctx context.Context, organization string, options TeamListOptions) (*TeamList, error)

	// Create a new team with the given options.
	Create(ctx context.Context, organization string, options TeamCreateOptions) (*Team, error)

	// Read a team by its ID.
	Read(ctx context.Context, teamID string) (*Team, error)

	// Update a team by its ID.
	Update(ctx context.Context, teamID string, options TeamUpdateOptions) (*Team, error)

	// Delete a team by its ID.
	Delete(ctx context.Context, teamID string) error
}

Teams describes all the team related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/teams.html

type TestAccountDetails added in v0.6.0

type TestAccountDetails struct {
	ID       string `jsonapi:"primary,users"`
	Username string `jsonapi:"attr,username"`
	Email    string `jsonapi:"attr,email"`
}

TestAccountDetails represents the basic account information of a TFE/TFC user.

See FetchTestAccountDetails for more information.

func FetchTestAccountDetails added in v0.6.0

func FetchTestAccountDetails(t *testing.T, client *Client) *TestAccountDetails

FetchTestAccountDetails returns TestAccountDetails of the user running the tests.

Use this helper to fetch the username and email address associated with the token used to run the tests.

type TwilioSettings added in v0.13.0

type TwilioSettings interface {
	// Read returns the Twilio settings.
	Read(ctx context.Context) (*AdminTwilioSetting, error)

	// Update updates Twilio settings.
	Update(ctx context.Context, options AdminTwilioSettingsUpdateOptions) (*AdminTwilioSetting, error)

	// Verify verifies Twilio settings.
	Verify(ctx context.Context, options AdminTwilioSettingsVerifyOptions) error
}

TwilioSettings describes all the Twilio admin settings.

type TwoFactor

type TwoFactor struct {
	Enabled  bool `jsonapi:"attr,enabled"`
	Verified bool `jsonapi:"attr,verified"`
}

TwoFactor represents the organization permissions.

type User

type User struct {
	ID               string     `jsonapi:"primary,users"`
	AvatarURL        string     `jsonapi:"attr,avatar-url"`
	Email            string     `jsonapi:"attr,email"`
	IsServiceAccount bool       `jsonapi:"attr,is-service-account"`
	TwoFactor        *TwoFactor `jsonapi:"attr,two-factor"`
	UnconfirmedEmail string     `jsonapi:"attr,unconfirmed-email"`
	Username         string     `jsonapi:"attr,username"`
	V2Only           bool       `jsonapi:"attr,v2-only"`
}

User represents a Terraform Enterprise user.

type UserToken added in v0.12.0

type UserToken struct {
	ID          string    `jsonapi:"primary,authentication-tokens"`
	CreatedAt   time.Time `jsonapi:"attr,created-at,iso8601"`
	Description string    `jsonapi:"attr,description"`
	LastUsedAt  time.Time `jsonapi:"attr,last-used-at,iso8601"`
	Token       string    `jsonapi:"attr,token"`
}

UserToken represents a Terraform Enterprise user token.

type UserTokenGenerateOptions added in v0.12.0

type UserTokenGenerateOptions struct {
	// Description of the token
	Description string `jsonapi:"attr,description,omitempty"`
}

UserTokenGenerateOptions the options for creating a user token.

type UserTokenList added in v0.12.0

type UserTokenList struct {
	*Pagination
	Items []*UserToken
}

UserTokenList is a list of tokens for the given user ID.

type UserTokens added in v0.12.0

type UserTokens interface {
	// List all the tokens of the given user ID.
	List(ctx context.Context, userID string) (*UserTokenList, error)

	// Generate a new user token
	Generate(ctx context.Context, userID string, options UserTokenGenerateOptions) (*UserToken, error)

	// Read a user token by its ID.
	Read(ctx context.Context, tokenID string) (*UserToken, error)

	// Delete a user token by its ID.
	Delete(ctx context.Context, tokenID string) error
}

UserTokens describes all the user token related methods that the Terraform Cloud/Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/user-tokens.html

type UserUpdateOptions

type UserUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,users"`

	// New username.
	Username *string `jsonapi:"attr,username,omitempty"`

	// New email address (must be consumed afterwards to take effect).
	Email *string `jsonapi:"attr,email,omitempty"`
}

UserUpdateOptions represents the options for updating a user.

type Users

type Users interface {
	// ReadCurrent reads the details of the currently authenticated user.
	ReadCurrent(ctx context.Context) (*User, error)

	// Update attributes of the currently authenticated user.
	Update(ctx context.Context, options UserUpdateOptions) (*User, error)
}

Users describes all the user related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/account.html

type VCSRepo

type VCSRepo struct {
	Branch            string `jsonapi:"attr,branch"`
	DisplayIdentifier string `jsonapi:"attr,display-identifier"`
	Identifier        string `jsonapi:"attr,identifier"`
	IngressSubmodules bool   `jsonapi:"attr,ingress-submodules"`
	OAuthTokenID      string `jsonapi:"attr,oauth-token-id"`
	RepositoryHTTPURL string `jsonapi:"attr,repository-http-url"`
	ServiceProvider   string `jsonapi:"attr,service-provider"`
}

VCSRepo contains the configuration of a VCS integration.

type VCSRepoOptions

type VCSRepoOptions struct {
	Branch            *string `json:"branch,omitempty"`
	Identifier        *string `json:"identifier,omitempty"`
	IngressSubmodules *bool   `json:"ingress-submodules,omitempty"`
	OAuthTokenID      *string `json:"oauth-token-id,omitempty"`
}

TODO: move this struct out. VCSRepoOptions is used by workspaces, policy sets, and registry modules VCSRepoOptions represents the configuration options of a VCS integration.

type Variable

type Variable struct {
	ID          string       `jsonapi:"primary,vars"`
	Key         string       `jsonapi:"attr,key"`
	Value       string       `jsonapi:"attr,value"`
	Description string       `jsonapi:"attr,description"`
	Category    CategoryType `jsonapi:"attr,category"`
	HCL         bool         `jsonapi:"attr,hcl"`
	Sensitive   bool         `jsonapi:"attr,sensitive"`

	// Relations
	Workspace *Workspace `jsonapi:"relation,configurable"`
}

Variable represents a Terraform Enterprise variable.

type VariableCreateOptions

type VariableCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,vars"`

	// The name of the variable.
	Key *string `jsonapi:"attr,key"`

	// The value of the variable.
	Value *string `jsonapi:"attr,value,omitempty"`

	// The description of the variable.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Whether this is a Terraform or environment variable.
	Category *CategoryType `jsonapi:"attr,category"`

	// Whether to evaluate the value of the variable as a string of HCL code.
	HCL *bool `jsonapi:"attr,hcl,omitempty"`

	// Whether the value is sensitive.
	Sensitive *bool `jsonapi:"attr,sensitive,omitempty"`
}

VariableCreateOptions represents the options for creating a new variable.

type VariableList added in v0.2.0

type VariableList struct {
	*Pagination
	Items []*Variable
}

VariableList represents a list of variables.

type VariableListOptions

type VariableListOptions struct {
	ListOptions
}

VariableListOptions represents the options for listing variables.

type VariableUpdateOptions

type VariableUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,vars"`

	// The name of the variable.
	Key *string `jsonapi:"attr,key,omitempty"`

	// The value of the variable.
	Value *string `jsonapi:"attr,value,omitempty"`

	// The description of the variable.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Whether to evaluate the value of the variable as a string of HCL code.
	HCL *bool `jsonapi:"attr,hcl,omitempty"`

	// Whether the value is sensitive.
	Sensitive *bool `jsonapi:"attr,sensitive,omitempty"`
}

VariableUpdateOptions represents the options for updating a variable.

type Variables

type Variables interface {
	// List all the variables associated with the given workspace.
	List(ctx context.Context, workspaceID string, options VariableListOptions) (*VariableList, error)

	// Create is used to create a new variable.
	Create(ctx context.Context, workspaceID string, options VariableCreateOptions) (*Variable, error)

	// Read a variable by its ID.
	Read(ctx context.Context, workspaceID string, variableID string) (*Variable, error)

	// Update values of an existing variable.
	Update(ctx context.Context, workspaceID string, variableID string, options VariableUpdateOptions) (*Variable, error)

	// Delete a variable by its ID.
	Delete(ctx context.Context, workspaceID string, variableID string) error
}

Variables describes all the variable related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/workspace-variables.html

type VariablesPermissionType added in v0.9.0

type VariablesPermissionType string

VariablesPermissionType represents the permissiontype to a workspace's variables.

func VariablesPermission added in v0.9.0

func VariablesPermission(v VariablesPermissionType) *VariablesPermissionType

VariablesPermission returns a pointer to the given team variables permission type.

type Workspace

type Workspace struct {
	ID                         string                `jsonapi:"primary,workspaces"`
	Actions                    *WorkspaceActions     `jsonapi:"attr,actions"`
	AgentPoolID                string                `jsonapi:"attr,agent-pool-id"`
	AllowDestroyPlan           bool                  `jsonapi:"attr,allow-destroy-plan"`
	AutoApply                  bool                  `jsonapi:"attr,auto-apply"`
	CanQueueDestroyPlan        bool                  `jsonapi:"attr,can-queue-destroy-plan"`
	CreatedAt                  time.Time             `jsonapi:"attr,created-at,iso8601"`
	Description                string                `jsonapi:"attr,description"`
	Environment                string                `jsonapi:"attr,environment"`
	ExecutionMode              string                `jsonapi:"attr,execution-mode"`
	FileTriggersEnabled        bool                  `jsonapi:"attr,file-triggers-enabled"`
	GlobalRemoteState          bool                  `jsonapi:"attr,global-remote-state"`
	Locked                     bool                  `jsonapi:"attr,locked"`
	MigrationEnvironment       string                `jsonapi:"attr,migration-environment"`
	Name                       string                `jsonapi:"attr,name"`
	Operations                 bool                  `jsonapi:"attr,operations"`
	Permissions                *WorkspacePermissions `jsonapi:"attr,permissions"`
	QueueAllRuns               bool                  `jsonapi:"attr,queue-all-runs"`
	SpeculativeEnabled         bool                  `jsonapi:"attr,speculative-enabled"`
	SourceName                 string                `jsonapi:"attr,source-name"`
	SourceURL                  string                `jsonapi:"attr,source-url"`
	StructuredRunOutputEnabled bool                  `jsonapi:"attr,structured-run-output-enabled"`
	TerraformVersion           string                `jsonapi:"attr,terraform-version"`
	TriggerPrefixes            []string              `jsonapi:"attr,trigger-prefixes"`
	VCSRepo                    *VCSRepo              `jsonapi:"attr,vcs-repo"`
	WorkingDirectory           string                `jsonapi:"attr,working-directory"`
	UpdatedAt                  time.Time             `jsonapi:"attr,updated-at,iso8601"`
	ResourceCount              int                   `jsonapi:"attr,resource-count"`
	ApplyDurationAverage       time.Duration         `jsonapi:"attr,apply-duration-average"`
	PlanDurationAverage        time.Duration         `jsonapi:"attr,plan-duration-average"`
	PolicyCheckFailures        int                   `jsonapi:"attr,policy-check-failures"`
	RunFailures                int                   `jsonapi:"attr,run-failures"`
	RunsCount                  int                   `jsonapi:"attr,workspace-kpis-runs-count"`
	TagNames                   []string              `jsonapi:"attr,tag-names"`

	// Relations
	AgentPool    *AgentPool          `jsonapi:"relation,agent-pool"`
	CurrentRun   *Run                `jsonapi:"relation,current-run"`
	Organization *Organization       `jsonapi:"relation,organization"`
	SSHKey       *SSHKey             `jsonapi:"relation,ssh-key"`
	Outputs      []*WorkspaceOutputs `jsonapi:"relation,outputs"`
	Tags         []*Tag              `jsonapi:"relation,tags"`
}

Workspace represents a Terraform Enterprise workspace.

type WorkspaceActions

type WorkspaceActions struct {
	IsDestroyable bool `jsonapi:"attr,is-destroyable"`
}

WorkspaceActions represents the workspace actions.

type WorkspaceAddRemoteStateConsumersOptions added in v0.14.0

type WorkspaceAddRemoteStateConsumersOptions struct {
	/// The workspaces to add as remote state consumers to the workspace.
	Workspaces []*Workspace
}

WorkspaceAddRemoteStateConsumersOptions represents the options for adding remote state consumers to a workspace.

type WorkspaceAddTagsOptions added in v0.19.0

type WorkspaceAddTagsOptions struct {
	Tags []*Tag
}

type WorkspaceAssignSSHKeyOptions

type WorkspaceAssignSSHKeyOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,workspaces"`

	// The SSH key ID to assign.
	SSHKeyID *string `jsonapi:"attr,id"`
}

WorkspaceAssignSSHKeyOptions represents the options to assign an SSH key to a workspace.

type WorkspaceCreateOptions

type WorkspaceCreateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,workspaces"`

	// Required when execution-mode is set to agent. The ID of the agent pool
	// belonging to the workspace's organization. This value must not be specified
	// if execution-mode is set to remote or local or if operations is set to true.
	AgentPoolID *string `jsonapi:"attr,agent-pool-id,omitempty"`

	// Whether destroy plans can be queued on the workspace.
	AllowDestroyPlan *bool `jsonapi:"attr,allow-destroy-plan,omitempty"`

	// Whether to automatically apply changes when a Terraform plan is successful.
	AutoApply *bool `jsonapi:"attr,auto-apply,omitempty"`

	// A description for the workspace.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Which execution mode to use. Valid values are remote, local, and agent.
	// When set to local, the workspace will be used for state storage only.
	// This value must not be specified if operations is specified.
	// 'agent' execution mode is not available in Terraform Enterprise.
	ExecutionMode *string `jsonapi:"attr,execution-mode,omitempty"`

	// Whether to filter runs based on the changed files in a VCS push. If
	// enabled, the working directory and trigger prefixes describe a set of
	// paths which must contain changes for a VCS push to trigger a run. If
	// disabled, any push will trigger a run.
	FileTriggersEnabled *bool `jsonapi:"attr,file-triggers-enabled,omitempty"`

	GlobalRemoteState *bool `jsonapi:"attr,global-remote-state,omitempty"`

	// The legacy TFE environment to use as the source of the migration, in the
	// form organization/environment. Omit this unless you are migrating a legacy
	// environment.
	MigrationEnvironment *string `jsonapi:"attr,migration-environment,omitempty"`

	// The name of the workspace, which can only include letters, numbers, -,
	// and _. This will be used as an identifier and must be unique in the
	// organization.
	Name *string `jsonapi:"attr,name"`

	// DEPRECATED. Whether the workspace will use remote or local execution mode.
	// Use ExecutionMode instead.
	Operations *bool `jsonapi:"attr,operations,omitempty"`

	// Whether to queue all runs. Unless this is set to true, runs triggered by
	// a webhook will not be queued until at least one run is manually queued.
	QueueAllRuns *bool `jsonapi:"attr,queue-all-runs,omitempty"`

	// Whether this workspace allows speculative plans. Setting this to false
	// prevents Terraform Cloud or the Terraform Enterprise instance from
	// running plans on pull requests, which can improve security if the VCS
	// repository is public or includes untrusted contributors.
	SpeculativeEnabled *bool `jsonapi:"attr,speculative-enabled,omitempty"`

	// BETA. A friendly name for the application or client creating this
	// workspace. If set, this will be displayed on the workspace as
	// "Created via <SOURCE NAME>".
	SourceName *string `jsonapi:"attr,source-name,omitempty"`

	// BETA. A URL for the application or client creating this workspace. This
	// can be the URL of a related resource in another app, or a link to
	// documentation or other info about the client.
	SourceURL *string `jsonapi:"attr,source-url,omitempty"`

	// BETA. Enable the experimental advanced run user interface.
	// This only applies to runs using Terraform version 0.15.2 or newer,
	// and runs executed using older versions will see the classic experience
	// regardless of this setting.
	StructuredRunOutputEnabled *bool `jsonapi:"attr,structured-run-output-enabled,omitempty"`

	// The version of Terraform to use for this workspace. Upon creating a
	// workspace, the latest version is selected unless otherwise specified.
	TerraformVersion *string `jsonapi:"attr,terraform-version,omitempty"`

	// List of repository-root-relative paths which list all locations to be
	// tracked for changes. See FileTriggersEnabled above for more details.
	TriggerPrefixes []string `jsonapi:"attr,trigger-prefixes,omitempty"`

	// Settings for the workspace's VCS repository. If omitted, the workspace is
	// created without a VCS repo. If included, you must specify at least the
	// oauth-token-id and identifier keys below.
	VCSRepo *VCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"`

	// A relative path that Terraform will execute within. This defaults to the
	// root of your repository and is typically set to a subdirectory matching the
	// environment when multiple environments exist within the same repository.
	WorkingDirectory *string `jsonapi:"attr,working-directory,omitempty"`

	// A list of tags to attach to the workspace. If the tag does not already
	// exist, it is created and added to the workspace.
	Tags []*Tag `jsonapi:"relation,tags,omitempty"`
}

WorkspaceCreateOptions represents the options for creating a new workspace.

type WorkspaceList added in v0.2.0

type WorkspaceList struct {
	*Pagination
	Items []*Workspace
}

WorkspaceList represents a list of workspaces.

type WorkspaceListOptions

type WorkspaceListOptions struct {
	ListOptions

	// A search string (partial workspace name) used to filter the results.
	Search *string `url:"search[name],omitempty"`

	// A search string (comma-separated tag names) used to filter the results.
	Tags *string `url:"search[tags],omitempty"`

	// A list of relations to include. See available resources https://www.terraform.io/docs/cloud/api/workspaces.html#available-related-resources
	Include *string `url:"include,omitempty"`
}

WorkspaceListOptions represents the options for listing workspaces.

type WorkspaceLockOptions

type WorkspaceLockOptions struct {
	// Specifies the reason for locking the workspace.
	Reason *string `jsonapi:"attr,reason,omitempty"`
}

WorkspaceLockOptions represents the options for locking a workspace.

type WorkspaceLockingPermissionType added in v0.9.0

type WorkspaceLockingPermissionType bool

WorkspaceLockingPermissionType represents the permissiontype to lock or unlock a workspace.

type WorkspaceOutputs added in v0.19.0

type WorkspaceOutputs struct {
	ID        string      `jsonapi:"primary,workspace-outputs"`
	Name      string      `jsonapi:"attr,name"`
	Sensitive bool        `jsonapi:"attr,sensitive"`
	Type      string      `jsonapi:"attr,output-type"`
	Value     interface{} `jsonapi:"attr,value"`
}

type WorkspacePermissions

type WorkspacePermissions struct {
	CanDestroy        bool `jsonapi:"attr,can-destroy"`
	CanForceUnlock    bool `jsonapi:"attr,can-force-unlock"`
	CanLock           bool `jsonapi:"attr,can-lock"`
	CanQueueApply     bool `jsonapi:"attr,can-queue-apply"`
	CanQueueDestroy   bool `jsonapi:"attr,can-queue-destroy"`
	CanQueueRun       bool `jsonapi:"attr,can-queue-run"`
	CanReadSettings   bool `jsonapi:"attr,can-read-settings"`
	CanUnlock         bool `jsonapi:"attr,can-unlock"`
	CanUpdate         bool `jsonapi:"attr,can-update"`
	CanUpdateVariable bool `jsonapi:"attr,can-update-variable"`
}

WorkspacePermissions represents the workspace permissions.

type WorkspaceReadOptions added in v0.16.0

type WorkspaceReadOptions struct {
	Include string `url:"include"`
}

WorkspaceReadOptions represents the options for reading a workspace.

type WorkspaceRemoveRemoteStateConsumersOptions added in v0.14.0

type WorkspaceRemoveRemoteStateConsumersOptions struct {
	/// The workspaces to remove as remote state consumers from the workspace.
	Workspaces []*Workspace
}

WorkspaceRemoveRemoteStateConsumersOptions represents the options for removing remote state consumers from a workspace.

type WorkspaceRemoveTagsOptions added in v0.19.0

type WorkspaceRemoveTagsOptions struct {
	Tags []*Tag
}

type WorkspaceTagListOptions added in v0.19.0

type WorkspaceTagListOptions struct {
	ListOptions

	// A query string used to filter workspace tags.
	// Any workspace tag with a name partially matching this value will be returned.
	Query *string `url:"name,omitempty"`
}

type WorkspaceUpdateOptions

type WorkspaceUpdateOptions struct {
	// Type is a public field utilized by JSON:API to
	// set the resource type via the field tag.
	// It is not a user-defined value and does not need to be set.
	// https://jsonapi.org/format/#crud-creating
	Type string `jsonapi:"primary,workspaces"`

	// Required when execution-mode is set to agent. The ID of the agent pool
	// belonging to the workspace's organization. This value must not be specified
	// if execution-mode is set to remote or local or if operations is set to true.
	AgentPoolID *string `jsonapi:"attr,agent-pool-id,omitempty"`

	// Whether destroy plans can be queued on the workspace.
	AllowDestroyPlan *bool `jsonapi:"attr,allow-destroy-plan,omitempty"`

	// Whether to automatically apply changes when a Terraform plan is successful.
	AutoApply *bool `jsonapi:"attr,auto-apply,omitempty"`

	// A new name for the workspace, which can only include letters, numbers, -,
	// and _. This will be used as an identifier and must be unique in the
	// organization. Warning: Changing a workspace's name changes its URL in the
	// API and UI.
	Name *string `jsonapi:"attr,name,omitempty"`

	// A description for the workspace.
	Description *string `jsonapi:"attr,description,omitempty"`

	// Which execution mode to use. Valid values are remote, local, and agent.
	// When set to local, the workspace will be used for state storage only.
	// This value must not be specified if operations is specified.
	// 'agent' execution mode is not available in Terraform Enterprise.
	ExecutionMode *string `jsonapi:"attr,execution-mode,omitempty"`

	// Whether to filter runs based on the changed files in a VCS push. If
	// enabled, the working directory and trigger prefixes describe a set of
	// paths which must contain changes for a VCS push to trigger a run. If
	// disabled, any push will trigger a run.
	FileTriggersEnabled *bool `jsonapi:"attr,file-triggers-enabled,omitempty"`

	GlobalRemoteState *bool `jsonapi:"attr,global-remote-state,omitempty"`

	// DEPRECATED. Whether the workspace will use remote or local execution mode.
	// Use ExecutionMode instead.
	Operations *bool `jsonapi:"attr,operations,omitempty"`

	// Whether to queue all runs. Unless this is set to true, runs triggered by
	// a webhook will not be queued until at least one run is manually queued.
	QueueAllRuns *bool `jsonapi:"attr,queue-all-runs,omitempty"`

	// Whether this workspace allows speculative plans. Setting this to false
	// prevents Terraform Cloud or the Terraform Enterprise instance from
	// running plans on pull requests, which can improve security if the VCS
	// repository is public or includes untrusted contributors.
	SpeculativeEnabled *bool `jsonapi:"attr,speculative-enabled,omitempty"`

	// BETA. Enable the experimental advanced run user interface.
	// This only applies to runs using Terraform version 0.15.2 or newer,
	// and runs executed using older versions will see the classic experience
	// regardless of this setting.
	StructuredRunOutputEnabled *bool `jsonapi:"attr,structured-run-output-enabled,omitempty"`

	// The version of Terraform to use for this workspace.
	TerraformVersion *string `jsonapi:"attr,terraform-version,omitempty"`

	// List of repository-root-relative paths which list all locations to be
	// tracked for changes. See FileTriggersEnabled above for more details.
	TriggerPrefixes []string `jsonapi:"attr,trigger-prefixes,omitempty"`

	// To delete a workspace's existing VCS repo, specify null instead of an
	// object. To modify a workspace's existing VCS repo, include whichever of
	// the keys below you wish to modify. To add a new VCS repo to a workspace
	// that didn't previously have one, include at least the oauth-token-id and
	// identifier keys.
	VCSRepo *VCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"`

	// A relative path that Terraform will execute within. This defaults to the
	// root of your repository and is typically set to a subdirectory matching
	// the environment when multiple environments exist within the same
	// repository.
	WorkingDirectory *string `jsonapi:"attr,working-directory,omitempty"`
}

WorkspaceUpdateOptions represents the options for updating a workspace.

type WorkspaceUpdateRemoteStateConsumersOptions added in v0.14.0

type WorkspaceUpdateRemoteStateConsumersOptions struct {
	/// The workspaces to update remote state consumers for the workspace.
	Workspaces []*Workspace
}

WorkspaceUpdateRemoteStateConsumersOptions represents the options for updatintg remote state consumers from a workspace.

type Workspaces

type Workspaces interface {
	// List all the workspaces within an organization.
	List(ctx context.Context, organization string, options WorkspaceListOptions) (*WorkspaceList, error)

	// Create is used to create a new workspace.
	Create(ctx context.Context, organization string, options WorkspaceCreateOptions) (*Workspace, error)

	// Read a workspace by its name and organization name.
	Read(ctx context.Context, organization string, workspace string) (*Workspace, error)

	// ReadWithOptions reads a workspace by name and organization name with given options.
	ReadWithOptions(ctx context.Context, organization string, workspace string, options *WorkspaceReadOptions) (*Workspace, error)

	// Readme gets the readme of a workspace by its ID.
	Readme(ctx context.Context, workspaceID string) (io.Reader, error)

	// ReadByID reads a workspace by its ID.
	ReadByID(ctx context.Context, workspaceID string) (*Workspace, error)

	// ReadByIDWithOptions reads a workspace by its ID with the given options.
	ReadByIDWithOptions(ctx context.Context, workspaceID string, options *WorkspaceReadOptions) (*Workspace, error)

	// Update settings of an existing workspace.
	Update(ctx context.Context, organization string, workspace string, options WorkspaceUpdateOptions) (*Workspace, error)

	// UpdateByID updates the settings of an existing workspace.
	UpdateByID(ctx context.Context, workspaceID string, options WorkspaceUpdateOptions) (*Workspace, error)

	// Delete a workspace by its name.
	Delete(ctx context.Context, organization string, workspace string) error

	// DeleteByID deletes a workspace by its ID.
	DeleteByID(ctx context.Context, workspaceID string) error

	// RemoveVCSConnection from a workspace.
	RemoveVCSConnection(ctx context.Context, organization, workspace string) (*Workspace, error)

	// RemoveVCSConnectionByID removes a VCS connection from a workspace.
	RemoveVCSConnectionByID(ctx context.Context, workspaceID string) (*Workspace, error)

	// Lock a workspace by its ID.
	Lock(ctx context.Context, workspaceID string, options WorkspaceLockOptions) (*Workspace, error)

	// Unlock a workspace by its ID.
	Unlock(ctx context.Context, workspaceID string) (*Workspace, error)

	// ForceUnlock a workspace by its ID.
	ForceUnlock(ctx context.Context, workspaceID string) (*Workspace, error)

	// AssignSSHKey to a workspace.
	AssignSSHKey(ctx context.Context, workspaceID string, options WorkspaceAssignSSHKeyOptions) (*Workspace, error)

	// UnassignSSHKey from a workspace.
	UnassignSSHKey(ctx context.Context, workspaceID string) (*Workspace, error)

	// RemoteStateConsumers reads the remote state consumers for a workspace.
	RemoteStateConsumers(ctx context.Context, workspaceID string, options *RemoteStateConsumersListOptions) (*WorkspaceList, error)

	// AddRemoteStateConsumers adds remote state consumers to a workspace.
	AddRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceAddRemoteStateConsumersOptions) error

	// RemoveRemoteStateConsumers removes remote state consumers from a workspace.
	RemoveRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceRemoveRemoteStateConsumersOptions) error

	// UpdateRemoteStateConsumers updates all the remote state consumers for a workspace
	// to match the workspaces in the update options.
	UpdateRemoteStateConsumers(ctx context.Context, workspaceID string, options WorkspaceUpdateRemoteStateConsumersOptions) error

	// Tags reads the tags for a workspace.
	Tags(ctx context.Context, workspaceID string, options WorkspaceTagListOptions) (*TagList, error)

	// AddTags appends tags to a workspace
	AddTags(ctx context.Context, workspaceID string, options WorkspaceAddTagsOptions) error

	// RemoveTags removes tags from a workspace
	RemoveTags(ctx context.Context, workspaceID string, options WorkspaceRemoveTagsOptions) error
}

Workspaces describes all the workspace related methods that the Terraform Enterprise API supports.

TFE API docs: https://www.terraform.io/docs/cloud/api/workspaces.html

Source Files

Directories

Path Synopsis
examples
organizations command
workspaces command

Jump to

Keyboard shortcuts

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