Commit Graph

471 Commits

Author SHA1 Message Date
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 ae5332b42c provider/google: Unset the id for resource_google_project if the create operation fails (#13644) 2017-04-13 16:16:47 -07:00
Mathieu Herbert 25cbbdea8a provider/google: datasource subnetwork and network (#12442)
* first version of this datasource

* add network and subnetwork datasource and documentation

* modify sidebar reference in documentation

* fix elements after review on network and subnetwork datasources

* fix fmt on Google provider.go

* modify code with the review

* modify documentation layout order

* fix alphabetic order in provider.go

* fix rebase issue and documentation datasource => data
2017-04-13 13:25:29 -07:00
Paddy a00dafd2c6 Merge pull request #13635 from hashicorp/paddy_fix_node_version
provider/google: bump container cluster version in tests.
2017-04-13 13:23:47 -07:00
Paddy d34006bbbf Merge pull request #13270 from JDiPierro/google_address_importability
Google address importability
2017-04-12 15:46:08 -07:00
Dana Hoffman 11a20ddb53 provider/google: Add node_pool field in resource_container_cluster. (#13402) 2017-04-12 12:57:53 -07:00
Paddy dea8b267a9 provider/google: bump container cluster version in tests.
The version we were using has been deprecated and is no longer
available, making the withVersion test no longer pass. I've bumped it to
the latest available version.
2017-04-12 12:38:45 -07:00
Justin DiPierro 8092d90f25 Importability for Google Compute Global Address 2017-04-01 13:25:34 -04:00
Justin DiPierro 8d8d3a728a Google Compute Address Importability 2017-04-01 13:22:39 -04:00
Radek Simko 9e7839b0ed provider/google: Mark GKE pass as sensitive (#13148) 2017-03-29 11:22:33 +01:00
Dana Hoffman 82608ca54b provider/google: turn compute_instance_group.instances into a set (#12790) 2017-03-22 17:47:41 -07:00
Dana Hoffman a208c08630 provider/google: replace instance group manager urls with instance group urls in container cluster tests 2017-03-22 16:33:11 -07:00
Marc Rooding ab699db458 Support the container cluster local ssd count property 2017-03-22 09:39:36 +01:00
Dana Hoffman 596f0a28cf Merge pull request #12743 from danawillow/gke-nodeconfig
provider/google: add support for a few more fields in NodeConfig
2017-03-21 15:24:14 -07:00
Dana Hoffman d187df75e8 provider/google: add support for a few more fields in NodeConfig 2017-03-15 15:11:09 -07:00
Paddy 97b40a2005 provider/google: drop the account file.
This was already marked as removed, but the way the provider handled it,
people were still being prompted for input anyways. This removes it from
the provider entirely, so people won't be prompted for input.
2017-03-15 11:00:54 -07:00
Dana Hoffman 2cf70fce98 provider/google: Check all fields in GKE tests instead of just that the resource exists (#12147) 2017-03-14 17:50:58 -07:00
Paddy 3940ae5ee7 Merge pull request #12659 from hashicorp/paddy_remove_deprecated_gcp_project_fields
provider/google: Remove deprecated project fields.
2017-03-14 16:52:40 -07:00
Paddy c14fc480ba Prune dead function.
This function isn't called anymore, so let's get rid of it.
2017-03-14 16:38:40 -07:00
Paddy 93196f3907 Merge pull request #12668 from hashicorp/paddy_deprecate_google_credentials_file
provider/google: remove deprecated account_file field.
2017-03-14 13:23:59 -07:00
Paddy 216cf76196 Merge pull request #12663 from hashicorp/paddy_deprecate_backend_region
provider/google: remove the backend region field
2017-03-14 13:00:07 -07:00
Paddy 5c53828bd5 Remove validateAccountFile function.
As @danawillow noticed, if the field is removed, we don't need to
validate it. Which means more deleting code!
2017-03-14 12:56:02 -07:00
Paddy 7a06d3f089 Merge pull request #12662 from hashicorp/paddy_9051_forwarding_rule_cycle
provider/google: fix single port diff cycle
2017-03-14 12:49:47 -07:00
Paddy 4f235c870d Merge pull request #12387 from hashicorp/paddy_11763_gcp_iam_diff
provider/google: ignore expanded v collapsed policies in diff
2017-03-14 12:48:05 -07:00
Paddy 014983dc42 Merge pull request #12223 from hashicorp/paddy_10984_better_image_resolution
provider/google: upgrade our image resolution logic
2017-03-13 23:45:12 -07:00
Paddy 47e5547ce7 Fix variable indents.
Tabs vs spaces is the worst. I really need a way to run terraform fmt on
these inline configs.
2017-03-13 23:23:32 -07:00
Paddy 6ca92fbbc1 Refactored into helpers.
Refactored some helpers out that help with retrieving the policies from
state and comparing them, hopefully leading to less code duplication.
2017-03-13 23:20:27 -07:00
Paddy 72bfc435ad Update typo.
We never updated the error to use the expectation, not hardcode it to 2.
2017-03-13 22:04:08 -07:00
Paddy 17a92b65c2 provider/google: remove deprecated account_file field.
Remove the shims for the long-deprecated account_file field in the
Google provider.
2017-03-13 21:58:39 -07:00
Paddy 3b71036877 provider/google: remove the backend region field
Remove the field region on compute_backend_service as it has been
deprecated a while now and was never used to begin with.
2017-03-13 17:25:32 -07:00
Paddy 023ede0c26 provider/google: fix single port diff cycle
When specifying a single port in port_range, the API would accept it as
input, but would return it as {PORT}-{PORT}. Terraform would then see
this as different, even though (semantically) it's the same.

This commit adds a test that exposes the diff cycle created by this, and
an inline DiffSuppressFunc to resolve it.

Fixes #9051.
2017-03-13 17:03:20 -07:00
Paddy 4c41729f98 Update with @danawillow's feedback.
* Make our regexes more permissive (though still separated out for
  readability, despite being identical)
* Add a helper that will improve readability while sanity testing our
  regex results.
2017-03-13 16:39:42 -07:00
Paddy 630b245770 provider/google: Remove deprecated project fields.
Remove the deprecated fields from google_project, and drop all the logic
that went into supporting them. Tests still pass after one minor change.
2017-03-13 16:19:53 -07:00
Paddy 1a55aecc79 Merge pull request #12486 from hashicorp/paddy_4336_instance_manager_api_bug
provider/google: fix container instance group URLs
2017-03-13 11:15:17 -07:00
tpoindessous 9a2e9914de providers/google : google_compute_disk.go : Minor correction : "Deleting disk" message in Delete method (#12521)
* WIP: added a new resource type : google_compute_snapshot

* [WIP]: added a test acceptance for google_compute_snapshot

* Cleanup

* Minor correction : "Deleting disk" message in Delete method

* Error in merge action

* Error in merge action
2017-03-08 17:34:49 +02:00
Paddy 6cce8d6c1a provider/google: fix container instance group URLs
Google Container Engine's cluster API returned instance group manager
URLs when it meant to return instance group URLs. See #4336 for details
about the bug.

While this is undeniably an upstream problem, this PR:

* detects the error, meaning it will work as expected when the API is
  fixed.
* corrects the error by requesting the instance group manager, then
  retrieving its instance group URL, and using that instead.
* adds a test that exercises the error and the solution, to ensure it is
  functioning properly.
2017-03-06 21:14:32 -08:00
Dana Hoffman 322044695b provider/google: initial commit for node pool resource (#11802)
provider/google: initial commit for node pool resource
2017-03-06 14:59:24 -08:00
Paddy 6de8e25b16 Merge pull request #12434 from hashicorp/paddy_fix_gcp_storage_region_test
provider/google: add location to storage tests.
2017-03-03 16:58:18 -08:00
Paddy 6531ef57e1 provider/google: log the op name in sql op errors.
To aid in tracking down the error that's causing
TestAccGoogleSqlDatabaseInstance_basic to fail (it's claiming an op
can't be found?) I've added the op name (which is unique) to the error
output for op errors.
2017-03-03 16:45:25 -08:00
Paddy a318cd9d61 provider/google: add location to storage tests.
Add location to storage tests that need it, which fixes the failing
TestAccStorageStorageClass test.
2017-03-03 15:51:36 -08:00
Paddy 3cb5107bd2 provider/google: retry storage creation/deletion on rate limiting
Our GCP storage tests are really flaky right now due to rate limiting.
In theory, this could also impact Terraform users that are
deleting/creating large numbers of Google Cloud Storage buckets at once.

To fix, I'm detecting the specific error code that GCP returns when it's
a rate limit error, and using that with resource.Retry to try the
request again.
2017-03-02 16:42:28 -08:00
Paddy 9b1da31ca4 provider/google: ignore expanded v collapsed policies in diff
When comparing the config and state for google_project_iam_policy,
always merge the bindings down to a common representation, to avoid a
perpetual diff.

Fixes #11763.
2017-03-02 14:00:45 -08:00
Dana Hoffman 75eb9209b7 provider/google: fix url map test and update logic (#12317) 2017-03-01 09:47:12 +00:00
Paddy 6868ba72c7 Update the docs for resolveImage.
Update the explanation of the logic being followed in resolveImage.
2017-02-23 22:09:07 -08:00
Paddy 90254b9451 provider/google: update image resolution code.
Add tests that ensure that image syntax resolves to API input the way we
want it to.

Add a lot of different input forms for images, to more closely map to
what the API accepts, so anything that's valid input to the API should
also be valid input in a config.

Stop resolving image families to specific image URLs, allowing things
like instance templates to evolve over time as new images are pushed.
2017-02-23 21:55:30 -08:00
Paddy 73565af503 Merge branch 'master' into paddy_10984_better_image_resolution 2017-02-23 15:12:47 -08: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
Dana Hoffman 069467edc1 provider/google: Write the raw disk encryption key in the state file to avoid diffs on plan (#12068) 2017-02-20 19:28:32 +02:00
Paddy 27c185e1c9 Merge pull request #12044 from sbadia/gcs_storage_class
doc: gcs - Update storage_class documentation and tests
2017-02-17 16:13:29 -08:00
Mike Fowler bfdeae0e33 provider/google-cloud: Add maintenance window (#12042)
* provider/google-cloud: Add maintenance window

Allows specification of the `maintenance_window` within the `settings`
block. This controls when Google will restart a database in order to
apply updates. It is also possible to select an `update_track` to
relatively control updating between instances in the same project.

* Adjustments as suggested in code review.
2017-02-18 01:33:47 +02:00