Commit Graph

363 Commits

Author SHA1 Message Date
Barrett Clark 979ac3da44
Merge pull request #30602 from hashicorp/barrettclark/update-go-slug
Cloud: Update go-slug for terraform.tfstate exclusion
2022-03-02 11:02:23 -06:00
Barrett Clark ecf76add75 Update go-slug for terraform.tfstate exclusion
`go-slug` has been updated to not upload `terraform.tfstate` to the slug
so that a user will no longer receive the error message about the
leftover state file after migrating from the local backend to TFC.
2022-03-02 10:12:18 -06:00
Alisdair McDiarmid fe6ce539fa go get github.com/dylanmei/winrmtest 2022-03-01 16:52:48 -05:00
Alisdair McDiarmid 51a08c79a4 go get github.com/aliyun/alibaba-cloud-sdk-go/sdk 2022-03-01 16:52:17 -05:00
Sebastian Rivera 52c5f9f6b7 Updated for latest go-tfe run task changes 2022-02-25 15:32:16 -05:00
uturunku1 e46683d2c7 pull latest changes from go-tfe run-tasks-integration branch 2022-02-24 14:06:57 -05:00
Brandon Croft 391b9c497c update go-tfe
go-tfe is pinned to branch run-tasks-integration pending API changes until run tasks support in the CLI is closer to release
2022-02-24 14:06:55 -05:00
uturunku1 46aaaa0a95 run go mod tidy 2022-02-24 14:03:27 -05:00
uturunku1 3e9ae69a12 [cloud] run tasks integration
This change will await the completion of pre-apply run tasks if they
exist on a run and then report the results.

It also adds an abstraction when interacting with cloud integrations such
as policy checking and cost estimation that simplify and unify output,
although I did not go so far as to refactor those callers to use it yet.
2022-02-24 14:02:35 -05:00
yuriy 08fb9078ea Update aws-sdk-go dependency to support new region (Jakarta) 2022-01-17 09:09:02 +01:00
Martin Atkins 74761b2f8b getmodules: Use go-getter v1.5.10 and return to upstream GitGetter
There was an unintended regression in go-getter v1.5.9's GitGetter which
caused us to temporarily fork that particular getter into Terraform to
expedite a fix. However, upstream v1.5.10 now includes a
functionally-equivalent fix and so we can heal that fork by upgrading.

We'd also neglected to update the Module Sources docs when upgrading to
go-getter v1.5.9 originally and so we were missing documentation about the
new "depth" argument to enable shadow cloning, which I've added
retroactively here along with documenting its restriction of only
supporting named refs.

This new go-getter release also introduces a new credentials-passing
method for the Google Cloud Storage getter, and so we must incorporate
that into the Terraform-level documentation about module sources.
2022-01-03 11:44:16 -08:00
Martin Atkins b0ff17ef2a getmodules: Inline our own fork of getter.GitGetter
This is a pragmatic temporary solution to allow us to more quickly resolve
an upstream regression in go-getter locally within Terraform, so that the
work to upstream it for other callers can happen asynchronously and with
less time pressure.

This commit doesn't yet include any changes to address the bug, and
instead aims to be functionally equivalent to getter.GitGetter. A
subsequent commit will then address the regression, so that the diff of
that commit will be easier to apply later to the upstream to get the same
effect there.
2021-12-14 11:24:23 -08:00
Brandon Croft ced4f5500c
update go-tfe to v0.21.0 2021-12-09 13:16:11 -07:00
James Bardin 09291295e2 update hcl@v2.11.1 2021-12-01 12:29:33 -05:00
James Bardin 5facaf8970 update hcl@v2.11.0 2021-12-01 08:42:01 -05:00
Krista LaFentres 2c29a05053 Fix go.mod issues by running go mod tidy -go=1.16 && go mod tidy -go=1.17 2021-11-18 15:00:03 -06:00
tombuildsstuff bf6c7c0381 go mod tidy/vendor: hamilton is now directly used 2021-11-17 18:42:53 +01:00
tombuildsstuff 0272249f47 go mod vendor/go mod tidy 2021-11-17 18:27:55 +01:00
tombuildsstuff cf56f42328 dependencies: upgrading to v0.18.0 of github.com/hashicorp/go-azure-helpers 2021-11-17 18:23:54 +01:00
James Bardin ac52f5135a update k8s packages from retracted module
Use the latest k8s.io packages from v0.21
2021-11-16 14:42:06 -05:00
Barrett Clark 5ef82ddd2f Cloud: fix e2e tests
- Fix tests and remove commented code
- Remove parallel for some flaky tests
- Add README
2021-11-11 14:37:21 -05:00
Brandon Croft 9441666d9a
Merge pull request #29903 from hashicorp/pull-mock-gotfe-changes
Pull changes made to mocks in go-tfe
2021-11-11 10:12:09 -07:00
Brandon Croft 051bf5df7e
update to go-tfe@tfc-integration 2021-11-11 09:57:23 -07:00
kmoe 64635edfb9
Merge pull request #29885 from hashicorp/kmoe/more-init-interrupts
command: make module installation interruptible
2021-11-11 12:37:49 +00:00
Katy Moe 7022876494
bump go-getter to v1.5.9 2021-11-11 12:28:16 +00:00
uturunku1 9ef9f97121 pull go tfe changes from main branch 2021-11-08 09:03:05 -08:00
James Bardin ca6d3cf50f update go-cty
cty: The documented definition and comparison logic of cty.Number is now
refined to acknowledge that its true range is limited only to values
that have both a binary floating point and decimal representation,
because cty values are primarily designed to traverse JSON serialization
where numbers are always defined as decimal strings.

In particular, that means that two cty.Number values now always compare
as equal if their representation in JSON (under cty's own JSON encoder)
would be equal, even though the decimal approximation we use for that
conversion is slightly lossy. This pragmatic compromise avoids confusing
situations where a round-trip through JSON serialization (or other
serializations that use the same number format) may produce a value that
doesn't compare equal to the original.

This new definition of equals should not cause any significant behavior
change for any integer in our in-memory storage range, but may cause
some fractional values to compare equal where they didn't before if they
differ only by a small fraction.
2021-11-02 17:30:26 -04:00
James Bardin 81e709d185
Merge pull request #29825 from hashicorp/jbardin/no-panicwrap
Remove the use of panicwrap in the Terraform CLI
2021-10-29 14:41:05 -04:00
Chris Arcand 85f0bc6198 Update go-tfe to e52963e 2021-10-28 19:29:17 -05:00
Omar Ismail dfb4609be2 Backend State Migration from cloud to cloud.
* Add test for tfc to tfc mgiration
* Fix old tests, and remove unused code.
2021-10-28 19:29:15 -05:00
Brandon Croft 0bae48bc01 update to tfc-integration branch of go-tfe 2021-10-28 19:29:13 -05:00
Omar Ismail dd856f8a1b Add run variables to cloud plan operations from non-file sources
Run variables allow the run API to accept input variables not found
in the configuration slug (the file-based ones plus workspace vars)
2021-10-28 19:29:12 -05:00
Omar Ismail 55fc590904 Teraform Cloud Backend State Migration
* determining source or destination to cloud
* handling single to single state migrations to cloud,
using a name strategy or a tags strategy
* Add end-to-end tests for state migration.
2021-10-28 19:29:12 -05:00
Omar Ismail a387af6c61 Add auto-approve logic, e2e tests 2021-10-28 19:29:11 -05:00
Chris Arcand 471dd479e8 Update go-tfe to 26689e
These changes include additions to fulfill the interface for the client
mock, plus moving all that logic (which needn't be duplicated across
both the remote and cloud packages) over to the cloud package under a
dedicated mock client file.
2021-10-28 19:29:10 -05:00
James Bardin 622c4df14c remove the use of panicwrap
Stop using panicwrap, and execute terraform in the main process.
2021-10-28 11:51:39 -04:00
Martin Atkins 7d3074df46 go.mod: go get github.com/mitchellh/go-wordwrap@v1.0.1 2021-10-15 17:13:03 -07:00
Martin Atkins 39779e7021 backend/remote-state/cos: Don't use github.com/likexian/gokit
We don't use this library anywhere else in Terraform, and this backend was
using it only for trivial helpers that are easy to express inline anyway.
The new direct code is also type-checkable, whereas these helper functions
seem to be written using reflection.

This gives us one fewer dependency to worry about and makes the test code
for this backend follow a similar assertions style as the rest of this
codebase.
2021-10-14 10:50:05 -07:00
dependabot[bot] 8946d7ff20 build(deps): bump github.com/golang/protobuf from 1.5.0 to 1.5.2
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.0 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.5.0...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-13 18:12:51 -07:00
Martin Atkins 88bddd7143 go.mod: go get go get golang.org/x/tools@v0.1.7
This also transitively upgrades golang.org/x/sys and golang.org/x/net,
but there do not seem to be any significant changes compared to the
commits we were previously using.
2021-10-13 17:37:37 -07:00
dependabot[bot] b0d10c9857 build(deps): bump github.com/xanzy/ssh-agent from 0.2.1 to 0.3.1
Bumps [github.com/xanzy/ssh-agent](https://github.com/xanzy/ssh-agent) from 0.2.1 to 0.3.1.
- [Release notes](https://github.com/xanzy/ssh-agent/releases)
- [Commits](https://github.com/xanzy/ssh-agent/compare/v0.2.1...v0.3.1)

---
updated-dependencies:
- dependency-name: github.com/xanzy/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-13 10:43:46 -07:00
dependabot[bot] 051629d74a build(deps): bump github.com/agext/levenshtein from 1.2.2 to 1.2.3
Bumps [github.com/agext/levenshtein](https://github.com/agext/levenshtein) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/agext/levenshtein/releases)
- [Commits](https://github.com/agext/levenshtein/compare/v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: github.com/agext/levenshtein
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 10:44:05 -07:00
Martin Atkins 02ca4e970c go.mod: replace github.com/dgrijalva/jwt-go with .../golang-jwt/jwt
CVE-2020-26160 is a high-severity advisory reported against this module.

The dgrijalva package is no longer maintained but our legacy etcv2 backend
depends on it indirectly, via go.etcd.io/etcd/client. The golang-jwt
package is the blessed successor of the original, and has a v3 line which
is compatible with the v3 line of dgrijalva, and so through this replace
we can get a fix for the advisory without other significant behavior
change.

We've preserved the etcdv2 backend as-is on a best-effort basis in order
to support anyone who is already using it, but recommend that users switch
to etcdv3 or to some other backend for ongoing use.

We also have future plans to make state storage be a matter for provider
plugins rather than built in to Terraform CLI, at which point this backend
will either become obsolete or be factored out into its own plugin, at
which point we can remove this "replace" directive and the associated
dependency altogether.
2021-10-12 10:35:07 -07:00
dependabot[bot] 2fd5ca3767 build(deps): bump honnef.co/go/tools from 0.0.1-2020.1.4 to 0.3.0-0.dev
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.0.1-2020.1.4 to 0.3.0-0.dev.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.0.1-2020.1.4...v0.3.0-0.dev)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 10:34:27 -07:00
Martin Atkins 55f0d06314 go.mod: go get github.com/lib/pq@v1.10.3
This is just a routine upgrade to the latest v1 release.
2021-10-12 10:32:38 -07:00
dependabot[bot] eec4a838e0 Bump github.com/mitchellh/copystructure from 1.0.0 to 1.2.0
Bumps [github.com/mitchellh/copystructure](https://github.com/mitchellh/copystructure) from 1.0.0 to 1.2.0.
- [Release notes](https://github.com/mitchellh/copystructure/releases)
- [Commits](https://github.com/mitchellh/copystructure/compare/v1.0.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/copystructure
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 10:11:55 -07:00
dependabot[bot] 2dd15caf87 Bump github.com/hashicorp/go-plugin from 1.4.1 to 1.4.3
Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.4.1 to 1.4.3.
- [Release notes](https://github.com/hashicorp/go-plugin/releases)
- [Commits](https://github.com/hashicorp/go-plugin/compare/v1.4.1...v1.4.3)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 10:10:49 -07:00
Martin Atkins 2e6b6e9a6b go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
James Bardin 94ed6a0c84 update the go.mod format for go1.17.2 2021-10-08 15:54:13 -04:00
Alisdair McDiarmid e09bad76ff build: Add exhaustive switch statement lint
For now, only check the JSON views package, since this was the instance
that most recently tripped us up. There are a few dozen failures
elsewhere in Terraform which would need to be addressed before expanding
this to other packages.
2021-09-24 15:12:44 -04:00