Commit Graph

43 Commits

Author SHA1 Message Date
Paddy 5127f1ef8b
command: Unmanaged providers
This adds supports for "unmanaged" providers, or providers with process
lifecycles not controlled by Terraform. These providers are assumed to
be started before Terraform is launched, and are assumed to shut
themselves down after Terraform has finished running.

To do this, we must update the go-plugin dependency to v1.3.0, which
added support for the "test mode" plugin serving that powers all this.

As a side-effect of not needing to manage the process lifecycle anymore,
Terraform also no longer needs to worry about the provider's binary, as
it won't be used for anything anymore. Because of this, we can disable
the init behavior that concerns itself with downloading that provider's
binary, checking its version, and otherwise managing the binary.

This is all managed on a per-provider basis, so managed providers that
Terraform downloads, starts, and stops can be used in the same commands
as unmanaged providers. The TF_REATTACH_PROVIDERS environment variable
is added, and is a JSON encoding of the provider's address to the
information we need to connect to it.

This change enables two benefits: first, delve and other debuggers can
now be attached to provider server processes, and Terraform can connect.
This allows for attaching debuggers to provider processes, which before
was difficult to impossible. Second, it allows the SDK test framework to
host the provider in the same process as the test driver, while running
a production Terraform binary against the provider. This allows for Go's
built-in race detector and test coverage tooling to work as expected in
provider tests.

Unmanaged providers are expected to work in the exact same way as
managed providers, with one caveat: Terraform kills provider processes
and restarts them once per graph walk, meaning multiple times during
most Terraform CLI commands. As unmanaged providers can't be killed by
Terraform, and have no visibility into graph walks, unmanaged providers
are likely to have differences in how their global mutable state behaves
when compared to managed providers. Namely, unmanaged providers are
likely to retain global state when managed providers would have reset
it. Developers relying on global state should be aware of this.
2020-05-26 17:48:57 -07:00
Radek Simko 5fb1e08678
vendor: Bump go-getter to 1.4.0 2019-09-09 14:04:58 +02:00
Radek Simko dee450cf8c
vendor: Bump go-azure-helpers to 0.7.0 2019-08-20 09:32:02 +01:00
Chris Marchesi 92c46c55f4
modules: update Azure deps to latest
The dependencies here are dated and are causing conflicts with the
ACME provider, namely the version of the top-level autorest package.

This explicitly updates the Azure SDK and autorest packages, with the
separately versioned sub-packages being added automatically.
2019-07-30 09:12:14 -07:00
Radek Simko 876d548bc1
vendor: golang.org/x/oauth2@latest
go get golang.org/x/oauth2@latest
go mod tidy
go mod vendor
2019-02-20 18:59:25 +00:00
Radek Simko df089ee2fb
vendor: cloud.google.com/go@v0.36.0
go get cloud.google.com/go@v0.36.0
go mod tidy
go mod vendor
2019-02-20 18:57:56 +00:00
Radek Simko 5ede0bf925
vendor: google.golang.org/grpc@v1.18.0
go get google.golang.org/grpc@v1.18.0
go mod tidy
go mod vendor
2019-02-20 18:51:33 +00:00
James Bardin 55a0a7d2f0 udpate go.mod and vendor 2018-11-29 15:23:38 -05:00
James Bardin 0d4d572c39 start work on helper/resource test fixtures
The helper resource tests won't pass for now, as they use a
terraform.MockProvider which can't be used in the schema.Provider shims.
2018-10-16 19:14:11 -07:00
Martin Atkins d5d8596bb1 vendor: update google.golang.org/api 2018-10-16 19:14:11 -07:00
Kristin Laemmert db26324b3c command/format: fix indentation
also run go mod tidy
2018-10-16 19:14:11 -07:00
Kristin Laemmert 97ac1dedba fix go module related merge conflict 2018-10-16 19:14:11 -07:00
Kristin Laemmert 8063f69e5c cli: format/state refactor for new state format
format/state now requires provider schemas to properly format output
state. command/show has been modified to pass a context to format.State.
2018-10-16 19:14:11 -07:00
Martin Atkins 917a320a3b vendor: Update HCL2 and cty, and other related packages
This brings in a bugfix for analyzing variables inside relative traversal
expressions in HCL, and a cosmetic bugfix in cty for GoString of
cty.NullVal(cty.DynamicPseudoType).

This also updates some other packages, as a result of running "go get -u".
2018-10-16 19:14:11 -07:00
Martin Atkins 1bb79696c6 vendor: update to latest github.com/zclconf/go-cty
This includes a bugfix to the cty/msgpack package to ensure correct
decoding of unknown and null values.

This also includes updates to cty's dependencies.
2018-10-16 19:14:11 -07:00
Martin Atkins 5e0b8b9721 govendor fetch google.golang.org/grpc/... 2018-10-16 19:11:09 -07:00
James Bardin 6c01444a8a update grpc packages 2018-10-16 18:53:51 -07:00
Florian Forster 43ce6ad95f govendor add cloud.google.com/go/storage 2017-10-27 16:52:21 -04:00
Martin Atkins ee5fc3b986 govendor fetch github.com/hashicorp/go-plugin/...
This puts us on a version that has grpc protocol support. Although we're
not actually using that yet, the plugin has handshake changed slightly to
allow plugins to declare whether they use the old or new protocols, and
so this upgrade allows us to support plugins that were built against
newer versions of go-plugin that include this extra field in the
handshake.

This fixes #15756.
2017-08-11 10:51:30 -07:00
James Bardin b37af119e5 govendor remove +unused
let govendor remove everything it thinks is no longer required
2017-06-12 13:43:53 -04:00
Christoph Tavan c9640e40df
provider/google: Update Google Compute godep 2017-05-02 23:08:23 +02:00
Alexander 9bd50a1219 provider/google: BigQuery Dataset (#13436)
* Vendor BigQuery

* Add resource

* Add tests

* Add documentation

* Remove named import

* Remove `retain_on_delete`

* Fix formatting
2017-04-20 09:47:38 -07:00
Dana Hoffman a07811a3b6 vendor: update google gensupport 2017-03-15 13:31:45 -07:00
Dana Hoffman 09886f2443 vendor: update google container engine 2017-03-15 13:31:44 -07:00
Evan Brown facc50d308 providers/google: google_project supports billing account (#11653)
* Vendor google.golang.org/api/cloudbilling/v1

* providers/google: Add cloudbilling client

* providers/google: google_project supports billing account

This change allows a Terraform user to set and update the billing
account associated with their project.

* providers/google: Testing project billing account

This change adds optional acceptance tests for project billing accounts.
GOOGLE_PROJECT_BILLING_ACCOUNT and GOOGLE_PROJECT_BILLING_ACCOUNT_2
must be set in the environment for the tests to run; otherwise, they
will be skipped.

Also includes a few code cleanups per review.

* providers/google: Improve project billing error message
2017-02-20 19:32:24 +02:00
Evan Brown b9e9e777c8 providers/google: Support managing projects
Add support for creating, updating, and deleting projects, as well as
their enabled services and their IAM policies.

Various concessions were made for backwards compatibility, and will be
removed in 0.9 or 0.10.
2017-01-25 14:59:50 -08:00
James Bardin daa2b78a9c need to add the files too 2017-01-20 10:59:14 -05:00
James Bardin 4e1b146ac2 remove google.golang.org/cloud
It's not used, and wasn't the correct import path
2017-01-20 09:37:27 -05:00
James Bardin a0b70b0ec7 Sync the vendor folder with the manifest
A number of PRs have come through which modified the vendor folder
without recording the proper information. This resets everything back to
the recorded version.
2017-01-19 14:10:52 -05:00
Christoph Blecker 027ba19eb3 Update google.golang.org/api/gensupport vendor 2017-01-16 13:11:31 -08:00
Christoph Blecker 796a41e8d5 Update google.golang.org/api/compute/v1 vendor 2017-01-16 12:53:10 -08:00
Dana Hoffman d319d4099e vendor: update google apis 2016-12-01 12:27:32 -08:00
Dana Hoffman 2d48c4400d vendor: revendor google apis for ILB in GA 2016-12-01 11:21:48 -08:00
Evan Brown daa360a029 vendor: Add Google IAM and CloudResourceManager packages 2016-09-07 13:35:33 -07:00
Evan Brown 93b2c71544 providers/google: Add google_compute_image resource (#7960)
* providers/google: Add google_compute_image resource

This change introduces the google_compute_image resource, which allows
Terraform users to create a bootable VM image from a raw disk tarball
stored in Google Cloud Storage. The google_compute_image resource
may be referenced as a boot image for a google_compute_instance.

* providers/google: Support family property in google_compute_image

* provider/google: Idiomatic checking for presence of config val

* vendor: Update Google client libraries
2016-08-12 12:35:33 +10:00
Greg Aker 81fa4de2d0 Update vendorized google deps. 2016-07-28 15:35:45 -05:00
Evan Brown 0d6a799e1f [WIP] provider/google: Update Container Engine features
1. Vendored google.golang.org/api packages were updated
2016-04-14 16:31:24 -07:00
Edward Muller c7376e5b39 Update google.golang.org/api/...
This release contains the Subnetwork stuff
2016-02-22 10:56:32 -08:00
Edward Muller 9f376e13ef Fix up deps
Done with:

```console
$ godep restore -v
$ rm -rf Godep vendor/
$ godep save ./...
```

Spot checked, but things look legit. I don't (yet) know how to build
terraform though.
2016-02-22 10:21:33 -08:00
Matt Morrison aedc5ba4af [WIP] support for creating distributed networks, and subnetwork resources 2016-02-18 08:37:57 -08:00
Paul Hinze 8209b40526 vendor: Recapture deps w/ latest godep
The original contents of `vendor` were inadvertently captured with an
older version of `godep`. Here, we recapture dependencies by running the
following:

```
godep restore -v
cat Godeps/Godeps.json | jq -r '.Deps[].ImportPath' | xargs godep update -v
```

The newer godep makes the following changes as it captures dependencies:

 * Skips test files
 * Copies `LICENSE` / `PATENTS` files

There is also an additional diff in `golang.org/x/sys/unix` that looks
very similar to the diff between `master..c65f27f` in that repo, so I'm
guessing that dependency was accidentally captured from master instead
of the commit saved to `Godeps.json`.

All in all, these changes should all be "more correct" and result in
smaller diffs for any future updates made to dependencies.
2016-02-10 10:45:16 -06:00
Paul Hinze 872371d21d deps: Capture deps w/ latest version of godep
Previous deps merge had been captured by an older version of godep,
updating godep and rerunning...

    godep save $(go list ./... | grep -v /vendor/)

...yielded this diff.

New `godep` also produced a warning to pin to the major Go version
instead of the minor one, which we do here as well.
2016-02-02 12:32:03 -06:00
Paul Hinze 6fe2703665 Vendor all dependencies w/ Godep
* Remove `make updatedeps` from Travis build. We'll follow up with more
   specific plans around dependency updating in subsequent PRs.
 * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to
   filter out `/vendor/` from `./...` where appropriate.
 * Temporarily remove `vet` from the `make test` target until we can
   figure out how to get it to not vet `vendor/`. (Initial
   experimentation failed to yield the proper incantation.)

Everything is pinned to current master, with the exception of:

 * Azure/azure-sdk-for-go which is pinned before the breaking change today
 * aws/aws-sdk-go which is pinned to the most recent tag

The documentation still needs to be updated, which we can do in a follow
up PR. The goal here is to unblock release.
2016-01-29 15:08:48 -06:00