Vendor the latest Terraform so we can get the fix for ImportStateVerify
diffing on Removed fields.
```
export GO111MODULE=on
go get github.com/hashicorp/terraform@master
go mod tidy
go mod vendor
```
Switch to using Go modules.
This migrates our vendor.json to use Go 1.11's modules system, and
replaces the vendor folder with the output of go mod vendor.
The vendored code should remain basically the same; I believe some
tree shaking of packages and support scripts/licenses/READMEs/etc.
happened.
This also fixes Travis and our Makefile to no longer use govendor.
```
govendor fetch google.golang.org/api/serviceusage/v1@04bb50b6b83d0e72253821af8cf3252d8e866517
```
#2646 will need to be done after migrating the existing resources off `v1beta1`
vendoring the beta API into TPG too makes it so we don't have to have a ton of conditionals in the composer resources. We can just use the beta API all the time, but only send beta fields in the beta provider (this is what we're doing already for basically everything else)
Update all the packages under google.golang.org/api to use the same
commit. This is a necessary precursor for using Go modules.
There is a breaking API change in the clients, but it's a one line
change. As such, Travis will say this doesn't build. I've verified after
the one line change, it will run the unit tests. That change needs to be
made in MM, however. Once this PR is merged, a PR against MM will be
opened.
Update all the packages under google.golang.org/api to use the same
commit. This is a necessary precursor for using Go modules.
There is a breaking API change in the clients, but it's a one line
change. As such, Travis will say this doesn't build. I've verified after
the one line change, it will run the unit tests. That change needs to be
made in MM, however. Once this PR is merged, a PR against MM will be
opened.
Fix Dana's comments, one of which exposed a bug: we weren't actually
fixing the diff. Because resolveImage can return multiple formats, and
only returns a self_link if a self_link is passed in, it was diffing
more often than not against a self_link supplied in the config. We just
had a bug in our CustomizeDiff function that concealed this.
I added the resolvedImageSelfLink helper function to turn the output
from resolveImage into a self_link, which fixes the problem. It also has
the knock-on effect of fixing #2067 at the same time, which is nice. I
decided to add another function instead of just modifying resolveImage
to always return a self_link because I don't want to deal with the
backwards compatibility problems of changing how we're storing a bunch
of things in state this close to 1.19.0. And honestly, we should
probably just be storing the self_link always, _anyways_.
I'm working on Stackdriver monitoring in another branch, which required updating `google.golang.org/genproto`, which required updating `google.golang.org/grpc`, which required updating `github.com/golang/protobuf`, and so on. This PR updates all of the Google-provided deps to their latest versions. In addition, there is:
- A change in config.go to reflect an updated type name
- Five files changed by `make fmt`
Tested with `make build`, `make test`, and `make testacc`.
This doesn't appear to be used anywhere within this project.
Additionally Hashicorp has their own [uuid library](https://github.com/hashicorp/go-uuid)
which is used internally.
`govendor fetch github.com/hashicorp/terraform/...@v0.11.8`
I figured this was a good time to do it since we just had a release. I verified that everything still compiles and that a few tests are passing- I don't expect anything else to change, but if there are any weird failures that this exposes we'll catch them in CI with plenty of time before the next release.
This was done as its own resource as suggested in slack, since we don't have the option of making all fields Computed in google_compute_instance. There's precedent in the aws provider for this sort of thing (see ami_copy, ami_from_instance).
When I started working on this I assumed I could do it in the compute_instance resource and so I went ahead and reordered the schema to make it easier to work with in the future. Now it's not quite relevant, but I left it in as its own commit that can be looked at separately from the other changes.
Fixes#1582.