From 0b2a8a5f644a4569b4e38084055a3a0c932794ab Mon Sep 17 00:00:00 2001 From: CJ Horton <17039873+radditude@users.noreply.github.com> Date: Tue, 19 May 2020 09:35:49 -0700 Subject: [PATCH] go get github.com/hashicorp/go-tfe@v0.8.1 + vendor --- go.mod | 2 +- go.sum | 2 ++ .../hashicorp/go-tfe/cost_estimate.go | 24 ++++++++++--------- vendor/github.com/hashicorp/go-tfe/tfe.go | 9 +++++++ vendor/modules.txt | 2 +- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index fb5d0c00d..8ea92c763 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.5.2 github.com/hashicorp/go-rootcerts v1.0.0 github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect - github.com/hashicorp/go-tfe v0.8.0 + github.com/hashicorp/go-tfe v0.8.1 github.com/hashicorp/go-uuid v1.0.1 github.com/hashicorp/go-version v1.2.0 github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f diff --git a/go.sum b/go.sum index 45d9447ba..f71f1af49 100644 --- a/go.sum +++ b/go.sum @@ -233,6 +233,8 @@ github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2Y github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-tfe v0.8.0 h1:kz3x3tbIKRkEAzKg05P/qbFY88fkEU7TiSX3w8xUrmE= github.com/hashicorp/go-tfe v0.8.0/go.mod h1:XAV72S4O1iP8BDaqiaPLmL2B4EE6almocnOn8E8stHc= +github.com/hashicorp/go-tfe v0.8.1 h1:J6ulpLaKPHrcnwudRjxvlMYIGzqQFlnPhg3SVFh5N4E= +github.com/hashicorp/go-tfe v0.8.1/go.mod h1:XAV72S4O1iP8BDaqiaPLmL2B4EE6almocnOn8E8stHc= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= diff --git a/vendor/github.com/hashicorp/go-tfe/cost_estimate.go b/vendor/github.com/hashicorp/go-tfe/cost_estimate.go index b0ccecfb4..c7f33493f 100644 --- a/vendor/github.com/hashicorp/go-tfe/cost_estimate.go +++ b/vendor/github.com/hashicorp/go-tfe/cost_estimate.go @@ -33,13 +33,14 @@ type costEstimates struct { // CostEstimateStatus represents a costEstimate state. type CostEstimateStatus string -//List all available costEstimate statuses. +// List all available costEstimate statuses. const ( - CostEstimateCanceled CostEstimateStatus = "canceled" - CostEstimateErrored CostEstimateStatus = "errored" - CostEstimateFinished CostEstimateStatus = "finished" - CostEstimatePending CostEstimateStatus = "pending" - CostEstimateQueued CostEstimateStatus = "queued" + CostEstimateCanceled CostEstimateStatus = "canceled" + CostEstimateErrored CostEstimateStatus = "errored" + CostEstimateFinished CostEstimateStatus = "finished" + CostEstimatePending CostEstimateStatus = "pending" + CostEstimateQueued CostEstimateStatus = "queued" + CostEstimateSkippedDueToTargeting CostEstimateStatus = "skipped_due_to_targeting" ) // CostEstimate represents a Terraform Enterprise costEstimate. @@ -58,11 +59,12 @@ type CostEstimate struct { // CostEstimateStatusTimestamps holds the timestamps for individual costEstimate statuses. type CostEstimateStatusTimestamps struct { - CanceledAt time.Time `json:"canceled-at"` - ErroredAt time.Time `json:"errored-at"` - FinishedAt time.Time `json:"finished-at"` - PendingAt time.Time `json:"pending-at"` - QueuedAt time.Time `json:"queued-at"` + CanceledAt time.Time `json:"canceled-at"` + ErroredAt time.Time `json:"errored-at"` + FinishedAt time.Time `json:"finished-at"` + PendingAt time.Time `json:"pending-at"` + QueuedAt time.Time `json:"queued-at"` + SkippedDueToTargetingAt time.Time `json:"skipped-due-to-targeting-at"` } // Read a costEstimate by its ID. diff --git a/vendor/github.com/hashicorp/go-tfe/tfe.go b/vendor/github.com/hashicorp/go-tfe/tfe.go index 5883d9d87..ca2f12d13 100644 --- a/vendor/github.com/hashicorp/go-tfe/tfe.go +++ b/vendor/github.com/hashicorp/go-tfe/tfe.go @@ -259,6 +259,15 @@ func (c *Client) RemoteAPIVersion() string { return c.remoteAPIVersion } +// 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. +func (c *Client) SetFakeRemoteAPIVersion(fakeAPIVersion string) { + c.remoteAPIVersion = fakeAPIVersion +} + // RetryServerErrors configures the retry HTTP check to also retry // unexpected errors or requests that failed with a server error. func (c *Client) RetryServerErrors(retry bool) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 776abd04d..c8e956fb2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -348,7 +348,7 @@ github.com/hashicorp/go-safetemp github.com/hashicorp/go-slug # github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 ## explicit -# github.com/hashicorp/go-tfe v0.8.0 +# github.com/hashicorp/go-tfe v0.8.1 ## explicit github.com/hashicorp/go-tfe # github.com/hashicorp/go-uuid v1.0.1