From b19ddb44bcab59fa66a75ebb08cf8b35714f0c52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:25:00 +0000 Subject: [PATCH] Bump github.com/hashicorp/go-tfe from 1.53.0 to 1.54.0 Bumps [github.com/hashicorp/go-tfe](https://github.com/hashicorp/go-tfe) from 1.53.0 to 1.54.0. - [Release notes](https://github.com/hashicorp/go-tfe/releases) - [Changelog](https://github.com/hashicorp/go-tfe/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-tfe/compare/v1.53.0...v1.54.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-tfe dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../github.com/hashicorp/go-tfe/CHANGELOG.md | 8 ++ vendor/github.com/hashicorp/go-tfe/user.go | 24 +++--- .../github.com/hashicorp/go-tfe/workspace.go | 85 ++++++++++--------- vendor/modules.txt | 2 +- 6 files changed, 72 insertions(+), 53 deletions(-) diff --git a/go.mod b/go.mod index 61d763d..932c93e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/AGLEnergyPublic/tfectl go 1.20 require ( - github.com/hashicorp/go-tfe v1.53.0 + github.com/hashicorp/go-tfe v1.54.0 github.com/itchyny/gojq v0.12.15 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 diff --git a/go.sum b/go.sum index 8590d05..3da3621 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI= github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ= -github.com/hashicorp/go-tfe v1.53.0 h1:FlmR+45MB9rTosra2ZGPp0XtdxiRTmdTAJAgX94WK9k= -github.com/hashicorp/go-tfe v1.53.0/go.mod h1:XnTtBj3tVQ4uFkcFsv8Grn+O1CVcIcceL1uc2AgUcaU= +github.com/hashicorp/go-tfe v1.54.0 h1:fuEjoEBy3ktESeVwLm1spfDSYBZcHmE8ehWtmMu4v7A= +github.com/hashicorp/go-tfe v1.54.0/go.mod h1:XnTtBj3tVQ4uFkcFsv8Grn+O1CVcIcceL1uc2AgUcaU= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= diff --git a/vendor/github.com/hashicorp/go-tfe/CHANGELOG.md b/vendor/github.com/hashicorp/go-tfe/CHANGELOG.md index d27e831..966e69e 100644 --- a/vendor/github.com/hashicorp/go-tfe/CHANGELOG.md +++ b/vendor/github.com/hashicorp/go-tfe/CHANGELOG.md @@ -1,5 +1,13 @@ # Unreleased +# v1.54.0 + +## Enhancements +* Adds the `AutoDestroyActivityDuration` field to `Workspace` by @notchairmk [#902](https://github.com/hashicorp/go-tfe/pull/902) + +## Deprecations +* The `IsSiteAdmin` field on User has been deprecated. Use the `IsAdmin` field instead [#900](https://github.com/hashicorp/go-tfe/pull/900) + # v1.53.0 ## Enhancements diff --git a/vendor/github.com/hashicorp/go-tfe/user.go b/vendor/github.com/hashicorp/go-tfe/user.go index 2dc4c3a..40e31da 100644 --- a/vendor/github.com/hashicorp/go-tfe/user.go +++ b/vendor/github.com/hashicorp/go-tfe/user.go @@ -29,17 +29,19 @@ type users struct { // User represents a Terraform Enterprise 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"` - IsSiteAdmin *bool `jsonapi:"attr,is-site-admin"` - IsSsoLogin *bool `jsonapi:"attr,is-sso-login"` - Permissions *UserPermissions `jsonapi:"attr,permissions"` + 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"` + // Deprecated: IsSiteAdmin was deprecated in v202406 and will be removed in a future version of Terraform Enterprise + IsSiteAdmin *bool `jsonapi:"attr,is-site-admin"` + IsAdmin *bool `jsonapi:"attr,is-admin"` + IsSsoLogin *bool `jsonapi:"attr,is-sso-login"` + Permissions *UserPermissions `jsonapi:"attr,permissions"` // Relations // AuthenticationTokens *AuthenticationTokens `jsonapi:"relation,authentication-tokens"` diff --git a/vendor/github.com/hashicorp/go-tfe/workspace.go b/vendor/github.com/hashicorp/go-tfe/workspace.go index 9311f6e..393fdcd 100644 --- a/vendor/github.com/hashicorp/go-tfe/workspace.go +++ b/vendor/github.com/hashicorp/go-tfe/workspace.go @@ -155,44 +155,45 @@ type LockedByChoice struct { // Workspace represents a Terraform Enterprise workspace. type Workspace struct { - ID string `jsonapi:"primary,workspaces"` - Actions *WorkspaceActions `jsonapi:"attr,actions"` - AllowDestroyPlan bool `jsonapi:"attr,allow-destroy-plan"` - AssessmentsEnabled bool `jsonapi:"attr,assessments-enabled"` - AutoApply bool `jsonapi:"attr,auto-apply"` - AutoApplyRunTrigger bool `jsonapi:"attr,auto-apply-run-trigger"` - AutoDestroyAt jsonapi.NullableAttr[time.Time] `jsonapi:"attr,auto-destroy-at,iso8601,omitempty"` - 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"` - TriggerPatterns []string `jsonapi:"attr,trigger-patterns"` - 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"` - SettingOverwrites *WorkspaceSettingOverwrites `jsonapi:"attr,setting-overwrites"` + ID string `jsonapi:"primary,workspaces"` + Actions *WorkspaceActions `jsonapi:"attr,actions"` + AllowDestroyPlan bool `jsonapi:"attr,allow-destroy-plan"` + AssessmentsEnabled bool `jsonapi:"attr,assessments-enabled"` + AutoApply bool `jsonapi:"attr,auto-apply"` + AutoApplyRunTrigger bool `jsonapi:"attr,auto-apply-run-trigger"` + AutoDestroyAt jsonapi.NullableAttr[time.Time] `jsonapi:"attr,auto-destroy-at,iso8601,omitempty"` + AutoDestroyActivityDuration jsonapi.NullableAttr[string] `jsonapi:"attr,auto-destroy-activity-duration,omitempty"` + 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"` + TriggerPatterns []string `jsonapi:"attr,trigger-patterns"` + 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"` + SettingOverwrites *WorkspaceSettingOverwrites `jsonapi:"attr,setting-overwrites"` // Relations AgentPool *AgentPool `jsonapi:"relation,agent-pool"` @@ -363,6 +364,10 @@ type WorkspaceCreateOptions struct { // Optional: The time after which an automatic destroy run will be queued AutoDestroyAt jsonapi.NullableAttr[time.Time] `jsonapi:"attr,auto-destroy-at,iso8601,omitempty"` + // Optional: The period of time to wait after workspace activity to trigger a destroy run. The format + // should roughly match a Go duration string limited to days and hours, e.g. "24h" or "1d". + AutoDestroyActivityDuration jsonapi.NullableAttr[string] `jsonapi:"attr,auto-destroy-activity-duration,omitempty"` + // Optional: A description for the workspace. Description *string `jsonapi:"attr,description,omitempty"` @@ -513,6 +518,10 @@ type WorkspaceUpdateOptions struct { // Optional: The time after which an automatic destroy run will be queued AutoDestroyAt jsonapi.NullableAttr[time.Time] `jsonapi:"attr,auto-destroy-at,iso8601,omitempty"` + // Optional: The period of time to wait after workspace activity to trigger a destroy run. The format + // should roughly match a Go duration string limited to days and hours, e.g. "24h" or "1d". + AutoDestroyActivityDuration jsonapi.NullableAttr[string] `jsonapi:"attr,auto-destroy-activity-duration,omitempty"` + // Optional: 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 diff --git a/vendor/modules.txt b/vendor/modules.txt index 26b2aa4..6f4cfc4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -15,7 +15,7 @@ github.com/hashicorp/go-retryablehttp github.com/hashicorp/go-slug github.com/hashicorp/go-slug/internal/ignorefiles github.com/hashicorp/go-slug/internal/unpackinfo -# github.com/hashicorp/go-tfe v1.53.0 +# github.com/hashicorp/go-tfe v1.54.0 ## explicit; go 1.19 github.com/hashicorp/go-tfe # github.com/hashicorp/go-version v1.6.0