Commit Graph

132 Commits

Author SHA1 Message Date
Vincent Roseberry
c9e2ce7f08 Change google_container_node_pool ID format to zone/cluster/name to remove artificial restriction on node pool name across clusters (#304) 2017-08-07 12:52:02 -07:00
Anders Bruun Olsen
f06970c97a Make google_container_node_pool resources importable. (#284) 2017-08-07 10:35:39 -07:00
Vincent Roseberry
018e01887b Fail if both name and name_prefix are set for node_pool in google_container_cluster (#296) 2017-08-04 15:34:02 -07:00
Vincent Roseberry
1480539c82 Remove ConflictsWith for network and subnetwork. More than one interface is supported and ConflictsWith doesn't support List properly (#294) 2017-08-04 14:22:04 -07:00
Riley Karson
a4e1083fd1 Add a test that multiple nics work in google_compute_instance. (#289)
* Add a test that multiple nics works in google_compute_instance.

* Add note that multiple nics is in Beta.
2017-08-04 14:18:07 -07:00
Vincent Roseberry
3fde8cf24e google_compute_instance can specified the subnetwork using a self_link (#290) 2017-08-04 11:00:45 -07:00
Riley Karson
68f2e3528c Add Beta support & Beta feature ip_version to google_compute_global_address (#250)
* Make google_compute_global_address a versioned resource with Beta support.

* Added Beta support for ip_version in google_compute_global_address.

* Move checks to TestCheckFuncs, add a regression test for IPV4 on v1 resources.

* Consolidated TestCheckFuncs to a single function.

* Add missing return statement.

* Fix IPV4 test

* Clarified comment.
2017-08-04 10:53:43 -07:00
Matt Morrison
0be42521c1 Fix error if container_node_pool deleted out of band (#293)
Prior to this change it was possible for Terraform to error during plan / apply with the following:
Error 404: The resource "node pool \"foo\" not found"
2017-08-04 10:24:53 -07:00
Riley Karson
0d02b116c7 Add Beta support & Beta feature ip_version to google_compute_global_forwarding_rule (#265)
* Add versioned Beta support to google_compute_global_forwarding_rule.

* Add Beta support for ip_version in google_compute_global_forwarding_rule.

* Temporary commit with compute_shared_operation.go changes.

* Added a test to see if v1 GFR is still IPV4, moved to a TestCheckFunc

* This API returns the original self links, but let's make sure we don't diff.
2017-08-04 10:15:51 -07:00
alex1x
8570849022 Add Support for Google source repos (#256) 2017-08-03 15:00:34 -07:00
Vincent Roseberry
ec21efb665 google_compute_instance reads scheduling fields from GCP. (#237) 2017-08-03 13:51:45 -07:00
Riley Karson
9f429e7ed2 Read from the zone set in state when possible in google_compute_autoscaler (#193) 2017-08-03 12:52:48 -07:00
Dana Hoffman
0afcb4d52c compute-component api has been replaced by compute, update tests (#276) 2017-08-03 10:58:58 -07:00
Riley Karson
3877b340e6 Add Beta support for auto_healing_policies to instance group manager. (#249)
* Add support for auto_healing_policies to google_compute_instance_group_manager.

* Add a test for self link stability when a v1 resource uses a versioned resource.

* Add a comment about what the stable self link test does.

* make fmt

* Fixed formatting on new tests.

* Address review comments.

* Fix make vet
2017-08-02 10:12:16 -07:00
Matt Morrison
0595ef25a5 Fix disk type’Malformed URL’ error (#275)
* Fix disk type’Malformed URL’ error

The API expects the disk type to be a SelfLink URL, but the disk type 
name was being used (e.g. “pd-ssd”).

* Add ACC Tests for boot disk type

* Fix acceptance test & fmt test config

The Instance data does not contain the actual disk type, just "PERSISTENT". This commit uses the computeClient to pull the disk data from the API, allowing checking of the disk type.

Also fmt'd the test configuration.
2017-08-01 15:39:32 -07:00
Dana Hoffman
947c18ec7a Persist state from the API for google_sql_database_instance regardless of what attributes the user has set (#208) 2017-08-01 13:13:09 -07:00
Joe Selman
c6ae260d63 Use a unique key when running project_metadata_item import tests (#274)
CI runs tests concurrently and will interfere with each other with the
current global key name.
2017-08-01 11:14:13 -07:00
Joe Selman
28f8931f0b Fix bug where startup-script metadata did not refresh (#180)
* Fix bug where startup-script metadata did not refresh

* Remove MetadataFormatSchema and replace with explicit filters/transforms
2017-08-01 10:47:58 -07:00
Dana Hoffman
32d7c3f62c Add support for legacyAbac to google_container_cluster (#261)
* revendor container api

* Add support for legacyAbac to `google_container_cluster`

* change to single enabled field
2017-07-31 11:09:05 -07:00
Aleksandr Didenko
1ec19cf3d9 Add support node config for GKE node pool (#184)
* Add support node config for GKE node pool

* Review fixes:
- Set max items in node config schema
- Fill missing node config fields
- Put test helpers above than test vars

* Update checks in node pool tests

* Fix node pool check match
2017-07-31 09:28:39 -07:00
Vincent Roseberry
53e481434e Add new data source: google_dns_managed_zone (#268) 2017-07-31 09:27:18 -07:00
Joe Selman
060861e678 Add an additional test with multiple project metadata items (#222)
This additional test would have caught the error fixed in
8f75c1c9a5
2017-07-28 15:50:12 -07:00
Joe Selman
88b1f092ff Fix issue with nondeterminism in tests (#226) 2017-07-28 12:59:19 -07:00
Paddy
37df58296b Merge pull request #171 from terraform-providers/paddy_iam
Add google_project_iam_binding and google_project_iam_member resources.
2017-07-28 12:22:33 -07:00
Joe Selman
50c10d4e7d Revert "Revert metadata item changes (#225)" (#257)
* Revert "Revert metadata item changes (#225)"

This reverts commit 884158d891.

* Use computeOperationWait instead of computeOperationWaitGlobal
2017-07-28 10:49:02 -07:00
Vincent Roseberry
3eaf4751db Add new resource google_compute_network_peering (#259) 2017-07-28 09:51:29 -07:00
Paddy
6f98217d66 Fix embarrassing typo in log message. 2017-07-27 14:37:39 -07:00
Paddy
d3426d5bc6 Don't set IDs in RMW loops.
We don't need to set the ID to "" in read-modify-write helpers, because
once they're done, we read anyways to update state based on the changes.
And that read checks if the binding/member still exists, and does the
SetId("") if it doesn't.

This way, we stick with state only getting set based on the API state,
not by what we think the state will be.
2017-07-27 14:29:25 -07:00
Paddy
ac5df40896 Return a type that was needed, rename a test function.
Tests need to have unique names. Whoooops.

Also, the Elem property accepts an interface I guess, which means we
actually need the struct type repetition there.
2017-07-27 14:11:52 -07:00
Paddy
f88e0429c7 Test adding multiple bindings at once. 2017-07-27 14:06:15 -07:00
Paddy
78545359bd Add logging statements, update : to / in IDs.
Update member IDs to use / instead of :.

Make sure we're logging any time we remove something from state.
2017-07-27 14:01:47 -07:00
Paddy
f94c3872af Switch to / as separator.
Switch to using / as a separator for IDs, instead of :.
2017-07-27 13:50:31 -07:00
Paddy
adc206a02d Add test case for updating to remove member.
Add a test case that updates a binding to remove a member.
2017-07-27 13:50:06 -07:00
Paddy
199ff5d1f1 Excise unnecessary type declarations.
Some struct types can be inferred instead of being repeated, so let's
take advantage of that.
2017-07-27 13:39:23 -07:00
Riley Karson
50069050c1 Removed the Compute Operation Wait Zone and migrated to universal wait. (#251)
* Removed the Compute Operation Wait Zone and migrated to universal wait.

* Removed unused var.
2017-07-27 08:48:25 -07:00
Riley Karson
01eecebac6 Remove the Compute Operation Wait Region methods, migrating to the universal wait. (#246) 2017-07-26 15:24:03 -07:00
Riley Karson
232cb87c7a Add versioned Beta support to google_compute_instance_group_manager (#234)
* Vendor GCP Compute Beta client library.

* Refactor resource_compute_instance_group_manager for multi version support (#129)

* Refactor resource_compute_instance_group_manager for multi version support.
* Minor changes based on review.
* Removed type-specific API version conversion functions.

* Add support for Beta operations.

* Add v0beta support to google_compute_instance_group_manager.

* Renamed Key to Feature, added comments & updated some parameter names.

* Fix code and tests for version finder to match fields that don't have a change.

* Store non-v1 resources' self links as v1 so that dependent single-version resources don't see diffs.

* Fix weird change to vendor.json from merge.

* Add a note that Convert loses ForceSendFields, fix failing test.

* Moved nil type to a switch case in compute_shared_operation.go.

* Move base api version declaration above schema.
2017-07-26 13:37:59 -07:00
Dana Hoffman
42a898dbd0 Add support for node pool autoscaling (#157)
* add node pool autoscaling

* docs for node pool autoscaling

* remove enabled attribute

* remove enabled from docs
2017-07-26 13:21:51 -07:00
Riley Karson
1f8254f260 Migrate all occurrences of WaitGlobal/WaitGlobal time to universal wait. (#243) 2017-07-26 09:40:06 -07:00
Vincent Roseberry
01ef451a94 Support import for google_compute_subnetwork (#227) 2017-07-26 09:30:59 -07:00
jimmy-btn
12ed8d8dd9 Update expected type of expiration time (#209) 2017-07-25 16:58:35 -07:00
Riley Karson
ec162c666c Refactor Compute Operations to work identically & introduce a scope-less API (#191)
* Refactor compute_operation.go to duplicate less code.

* Determine what scope type an Operation is from it's Operation object.

* Inlined operation type switch statement into if/else methods.
2017-07-25 16:22:27 -07:00
Paddy
775d931476 Merge pull request #6 from pdecat/f-google-storage-bucket-lifecycle
Add provider/google/google_storage_bucket lifecycle interface
2017-07-25 16:11:59 -07:00
Paddy
655435f940 Terraform fmt on our test configs. 2017-07-25 12:17:20 -07:00
Paddy
91d227cdb0 id => project_id
For clarity and explicitness(? is that a word?) use the project_id
instead of Terraform's internal id in our test configs.
2017-07-25 12:15:28 -07:00
Paddy
b0e3790b61 Use the policy r/m/w helper and handle edge case.
Use the new projectIamPolicyReadModifyWrite helper to manage the RMW
loop for our policy member resource.

Handle the case of having a binding server-side that doesn't have the
member we expect more elegantly.
2017-07-25 12:14:05 -07:00
Paddy
52d552d740 id => project_id in test configs.
Helps keep things explicit.
2017-07-25 12:00:03 -07:00
Paddy
f9eeb36657 terraform fmt test configs. 2017-07-25 11:56:27 -07:00
Paddy
5282ad7b12 Use string slice conversion helper. 2017-07-25 11:52:38 -07:00
Paddy
729e9fc501 Create an iam policy read/modify/write helper.
We were repeating that logic a lot, so this helper just reads a policy,
calls the passed modify function on the policy, then writes the policy
back and takes care of the optimistic concurrency logic for the caller.
So now all the caller has to do is the unique part, which is the modify
function.
2017-07-25 11:43:49 -07:00