Commit Graph

85 Commits

Author SHA1 Message Date
Paddy
7ee598bfe2 Revert "Revert "Update our google.golang.org/api dependency."" 2018-12-12 17:23:35 -08:00
Paddy
ba11a51949 Revert "Update our google.golang.org/api dependency." 2018-12-12 17:23:35 -08:00
Paddy Carver
d36700fe6e Update our google.golang.org/api dependency.
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.
2018-12-12 17:23:35 -08:00
Chris Stephens
c24b32b356 Merge pull request #2533 from chrisst/monitoring-client
Adding Stackdriver Monitoring Api
2018-12-12 17:23:35 -08:00
Paddy
c1d404ddc1
Merge pull request #1995 from terraform-providers/paddy_1916_diff_fix
Fix perma-diff on instance templates.
2018-10-02 14:13:15 -07:00
Paddy
a8fdf4033e
Fix trailing comma
JSON is the worst.
2018-10-02 02:44:17 -07:00
Paddy Carver
2fc8da91e7 Fix Dana's comments, expand images to self_links.
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_.
2018-10-02 01:11:03 -07:00
Paddy Carver
75c20b4246 Update helper/schema vendor.
Update the version of helper/schema we have vendored to take advantage
of fixes to the ResourceDiff.Clear function.
2018-09-26 14:22:52 -07:00
Riley Karson
8c0bc93771
Vendor random provider to allow use in tests (#2110)
Support for an upcoming generated PR.
2018-09-25 15:09:13 -07:00
Nathan McKinley
9311331f88
Add filestore API. (#2073) 2018-09-18 15:04:37 -07:00
Chris Hawk
771c2f8512 Update vendored deps (#1967)
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`.
2018-09-18 12:50:17 -07:00
Nathan McKinley
81f8befbb5
Add support for max pods per node to node pool. (#2038) 2018-09-12 17:49:26 -07:00
Harry Pidcock
65669fc6d6 Added Environment Variables configuration to Cloud Functions (#1830) 2018-09-10 17:37:43 -07:00
Chris Stephens
404e7297f0 Remove vendor code for UUIDs
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.
2018-09-05 14:22:13 -07:00
Chris Stephens
abcd2179de Updating the GCP dns api client. 2018-09-05 14:13:53 -07:00
Paddy Carver
f946490db2 Update logging vendor.
Update the vendored version of our logging helper, so we get requests
printed.
2018-08-31 10:13:52 -07:00
emily
96b17536b9
Initial TF commits needed for cloud composer support (#1926)
* add cloud composer vendor

* init composer client and resource map
2018-08-22 15:59:05 -07:00
Dana Hoffman
9b7f435ec3
Revert "revendor hashicorp/terraform (#1923)" (#1925)
This reverts commit 654350d3d3.
2018-08-22 12:46:58 -07:00
Dana Hoffman
654350d3d3
revendor hashicorp/terraform (#1923)
`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.
2018-08-22 12:13:40 -07:00
Dana Hoffman
d1bf585724
Add support for binary authorization in GKE (#1884)
* revendor container/v1beta1

* add support for binauthz in gke

* update description
2018-08-16 17:51:03 -07:00
Riley Karson
8506527a80 Add support for boot_disk_type to google_dataproc_cluster (#1855) 2018-08-15 23:00:11 -07:00
emily
9d15f6162f
Vendor update to compute (#1756) 2018-07-12 10:47:18 -07:00
Dana Hoffman
7e04cee958
add new compute_instance_from_template resource (#1652)
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.
2018-06-28 16:09:23 -07:00
Paddy
f6f062d696
Merge pull request #1620 from terraform-providers/paddy_update_vendor
Update schema to 0.11.7.
2018-06-11 13:08:54 -07:00
Vincent Roseberry
32d965062d
Support update for DNS Managed Zone (#1617)
* vendor google.golang.org/api/dns/v1beta2

* Support update for DNS Managed Zone
2018-06-08 09:27:08 -07:00
Paddy
5117943e38 Add missing dependency. 2018-06-07 18:20:29 -07:00
Paddy Carver
709d537a1c Update schema to 0.11.7.
Update our helper/schema to v0.11.7, and update all its dependencies to
their latest, as well.
2018-06-07 15:38:10 -07:00
Dana Hoffman
dc46348d67
Add support for custom request headers in backend services (#1537)
* revendor compute beta apis

* changes to subnetwork iam from api revendoring

* add support for custom request headers in backend services
2018-05-29 13:29:40 -07:00
Dana Hoffman
974c3f7646
Add GKE Shared VPC support (#1528)
All this needed was to allow setting the network/subnetwork to a self link.

~WIP for now because I want to run the tests in CI.~ Tests are passing.
2018-05-23 16:47:17 -07:00
Dana Hoffman
20616e424d
Use new serviceusage API for google_project_service[s] (#1522)
* vendor service usage api

* use serviceusage api instead of servicemanagement for project services

* add bigquery-json to test

* add import for project service

* add serviceusage_operation.go
2018-05-22 17:45:22 -07:00
Dana Hoffman
bc8f3046ad
initial tf changes needed to support redis (#1513) 2018-05-21 12:01:06 -07:00
Paddy
cd7364d649
Merge pull request #1503 from terraform-providers/paddy_app_engine_app
Add App Engine Application support
2018-05-18 17:12:34 -07:00
Paddy Carver
e74ab9d507 Vendor. 2018-05-18 16:08:15 -07:00
Dan Couture
4f7a6c828f Add new google_cloudbuild_trigger resource (#1357) 2018-05-07 12:53:34 -07:00
Nick Jacques
0d309b1e56 Update ssl_policy to use v1 API (#1368)
* Update compute/v1 to latest

* Update ssl_policy resource and test to v1 API
2018-04-24 14:43:00 -07:00
Nathan McKinley
d3bbfbd22b
Add DNS PTR record to Compute Instance (#1349) 2018-04-20 11:14:38 -07:00
Janos Lenart
1840363c74 Adding private_cluster (#1250)
* Updated google.golang.org/api/container/v1beta1

* Added support for private_cluster and master_ipv4_cidr

This is to implement #1174. See
https://groups.google.com/forum/#!topic/google-cloud-sdk-announce/GGW3SQSANIc

* Added simple test for private_cluster and master_ipv4_cidr

* Review replies

* Added some documentation for private_cluster
2018-03-30 10:10:25 -07:00
Dana Hoffman
fde96ca9d9
Add new google_compute_security_policy resource (#1242)
* revendor compute/v0.beta

* add new `google_compute_security_policy` resource

* docs updates for security policy

* Add link to official docs
2018-03-21 16:52:23 -07:00
Dana Hoffman
6d8a8b1747
Add more beta scaffolding for GKE resources (#1139)
* vendor container/v1beta1

* revendor container/v1beta1

* add beta scaffolding for gke resources

* fix json unmarshal error

* fix issues with trying to convert interface instead of struct

* same fixes but for node pool

* move setid calls back
2018-03-06 17:44:05 -08:00
Simon Pizonka
fec2f0bc02 Add support for Google Cloud IoT Core registry (#970) 2018-01-24 13:03:09 -08:00
Lawrence Jones
9f42aeb652 PostgreSQL high availability (#1001)
* Update sqladmin api

Pull in updates to the generated sqladmin api and update callers for
the change in the StorageAutoResize setting

* Add support for availability_type setting

Allow specifying ZONAL or REGIONAL to allow for PostgreSQL HA
setup.

* vendor: update sqladmin/v1beta4

* Test setting AvailabilityType for PostgreSQL

Add tests that cover the creation of a Postgres database with
AvailabilityType set to REGIONAL, and correct some small issues that
were preventing compilation.

* Fix breaking change w/ disk_autoresize in cloudsql

95e5582766

The cloudsql admin client changed the way it handles StorageAutoResize
as a parameter, in order to be more explicit about when the server has
ommitted the field. This changed the type from being bool to *bool, and
we need to modify provider code so that we supply the right value to the
api client.
2018-01-24 09:23:48 -08:00
Vincent Roseberry
c9826b1452
Support subnetwork IP CIDR range expansion (#945)
* Vendor schema/helper/customdiff

* Support subnetwork IP CIDR range expansion

* Change wording
2018-01-17 12:58:37 -08:00
Nathan McKinley
f50d4a19b4
New Resource: Dataflow Job (#855)
Add support for Google Dataflow jobs

Note: A dataflow job exists when it is in a nonterminal state, and does not exist if it
is in a terminal state (or a non-running state which can only transition into terminal
states).  See doc for more detail.
2018-01-10 14:38:15 -08:00
sarunask
f07c332849 Cloud functions (#899)
* Initial commit

* Adding google_cloudfunction_function resource

* Some FMT updates

* Working Cloud Function Create/Delete/Get
Create is limited to gs:// source now.

* Fixed tests import

* Terraform now is able to apply and destroy function

* Fully working Basic test

* Added:
1. Allowed region check
2. readTimeout helper

* Found better solution for conflicting values

* Adding description

* Adding full basic test

* dded Update functionality

* Made few more optional params

* Added test for Labels

* Added update tests

* Added storage_* members and made function source deploy from storage bucket object

* Adding comments

* Adding tests for PubSub

* Adding tests for Bucket

* Adding Data provider

* Fixing bug which allowed to miss error

* Amending Operation retrieval

* Fixing vet errors and vendoring cloudfunctions/v1

* Fixing according to comments

* Fixing according to comments round #2

* Fixing tabs to space

* Fixing tabs to space and some comments #3

* Re-done update to include labels in one update with others

* Adding back default values. In case of such scenario, when user creates function with some values for "timeout" or "available_memory_mb", and then disables those attributes. Terraform plan then gives:
No changes. Infrastructure is up-to-date.
This is an error. By adding const we would avoid this error.

* Fixed MixedCase and more tabs
2018-01-10 13:25:43 -08:00
Vincent Roseberry
0569f41f3c
Upgrade terraform core to v0.11.2 (#940) 2018-01-10 10:52:15 -08:00
Nathan McKinley
a767b11593
Revendor servicemanagement API. (#921) 2018-01-04 17:26:30 -08:00
Vincent Roseberry
293728929f
Add update support for routing mode in google_compute_network (#857)
* Fetch latest compute v1 client

* Add update support for rounting in google_compute_network
2017-12-14 14:28:58 -08:00
Vincent Roseberry
433fdcc49f
Storage bucket doesn't remove lifecycle rules properly (#850)
* Update storage client

* Read lifecycle from API and improve acceptance tests
2017-12-13 16:46:48 -08:00
Nic Cope
94a405d179 Add Alias IP and Guest Accelerator support to Instance Templates (#639)
* Move AliasIpRange helpers into utils

To reflect the fact they'll be used by multiple resources.

* Pass Config to build helpers, not meta

It's the only thing meta is used for.

* Refactor getNetwork util methods to return early for the happy path.

* Update compute APIs

compute.Instance.MinCpuPlatform is now GA.

* Fix panic in TestComputeInstanceMigrateState

This seemed to be a pre-existing issue, i.e. I could repro it in master.

--- FAIL: TestComputeInstanceMigrateState (0.00s)
panic: interface conversion: interface {} is nil, not *google.Config [recovered]
        panic: interface conversion: interface {} is nil, not *google.Config

goroutine 85 [running]:
testing.tRunner.func1(0xc4205d60f0)
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:711 +0x2d2
panic(0x203acc0, 0xc4205d2080)
        /usr/local/Cellar/go/1.9.1/libexec/src/runtime/panic.go:491 +0x283
github.com/terraform-providers/terraform-provider-google/google.migrateStateV3toV4(0xc4205f2000, 0x0, 0x0, 0x0, 0x48, 0xc4205f2000)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate.go:182 +0x2405
github.com/terraform-providers/terraform-provider-google/google.resourceComputeInstanceMigrateState(0x2, 0xc4205f2000, 0x0, 0x0, 0x0, 0x0, 0xe0000000000)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate.go:48 +0x21a
github.com/terraform-providers/terraform-provider-google/google.runInstanceMigrateTest(0xc4205d60f0, 0x2260816, 0x8, 0x227d23a, 0x20, 0x2, 0xc4205ec0f0, 0xc4205ec120, 0x0,
 0x0)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate_test.go:803 +0xc1
github.com/terraform-providers/terraform-provider-google/google.TestComputeInstanceMigrateState(0xc4205d60f0)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate_test.go:71 +0xc84
testing.tRunner(0xc4205d60f0, 0x22d81c0)
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:746 +0xd0
created by testing.(*T).Run
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:789 +0x2de
FAIL    github.com/terraform-providers/terraform-provider-google/google 0.035s

* Use only the v1 API for resource_compute_instance

Alias IP ranges, Accelerators, and min CPU platform are now GA.

* Move common instance code into utils.go

Methods used by both resource_compute_instance and
resource_compute_instance_template are currently spread between their respective
files, and utils.go.

This commit moves them all into utils.go for the sake of consistency. It may be
worth considering an instance_common.go file or similar.

* Unify compute_instance and compute_instance_template network_interface and service_account code

This has the side effect of enabling Alias IP range support for
compute_instance_templates.

* Add tests for compute instance template Alias IP ranges

* Mark instance template region as computed

We compute it from the subnet its network interfaces are in. Note this
is not new behaviour - I believe it was erroneously missing the computed
flag.

* Support guest accelerators for instance templates

Since most of the code is already there.

* Add a test for using 'address' rather than 'network_ip' for instance templates

* Don't mark assigned_nat_ip as deprecated

* Remove network_interface schema fields that don't make sense for a compute instance template

* Add newline after count in instance template docs

* Don't try to dedupe guest accelerator expansion code

The API calls to Google to create guest accelerators take different values
for instances and instance templates. Instance templates don't have a zone
and can thus *only* be passed a guest accelerator name.

* Use ParseNetworkFieldValue instead of getNetworkLink

* Add support for parsing regional fields, and subnetworks specifically

Currently unused because subnetworks may have a separate project from that
of the instance using them, which complicates looking up the project field.

* Fall back to provider region when parsing regional field values

Also slightly refactors getXFromSchema field helper functions for readability.

* Revert to assigned_nat_ip in compute instance docs

* Add beta scaffolding to compute instance and compute instance template

Note these resources don't currently use beta features - this is futureproofing.

* Fix indentation in comment about instance template alias IP ranges

* Consolidate metadata helper functions in metadata.go

* Move compute instance (and template) related helpers into their own file
2017-11-28 10:01:27 -08:00
Vincent Roseberry
454384fc70
All beta fields in compute firewall are GA (#768)
* Upgrade compute v1 client
* Upgrade gensupport
* Use v1 API now that all beta features are in GA for `google_compute_firewall`
2017-11-20 15:38:47 -08:00