Commit Graph

17 Commits

Author SHA1 Message Date
Paddy
44bf0bec96 Read update_strategy before overwriting it. (#11013)
As brought up in #10174, our update_strategy property for instance group
managers in GCP would always be set to "RESTART" on read, even if the
user asked for them to be "NONE" in the config.

This adds a test to ensure that the user wishes were respected, which
fails until we check for update_strategy in the ResourceData before we
update it within the Read function. Because the update_strategy property
doesn't map to anything in the API, we never need to read it from
anywhere but the config, which means the ResourceData should be
considered authoritative by the time we get to the Read function.

The fix for this was provided by @JDiPierro in #10198 originally, but
was missing tests, so it got squashed into this.
2017-01-09 23:15:50 +00:00
Noah Webb
6e2c679c8a provider/google: Support Import of'google_compute_instance_group_manager' 2016-08-18 15:13:52 -04:00
Igor Wiedler
a3188d0885 [provider/google] Use resource-specific project when waiting for creation
Creating most google cloud resources uses the compute_operation to
wait for the creation to complete. However, the computeOperationWait*
functions always uses the global `config.Project`, instead of the resource-
specific one.

This means that creating resource in a project other than the main one
fails with a 404 on the operation resource.

This patch uses the project from google_compute_instance instead of the
global one.
2016-06-10 11:55:21 +02:00
Seth Vargo
e2c5e9a1d5 Update documentation to include new "project" attribute
This commit also normalizes the format we display attributes.
2016-04-10 17:34:15 -04:00
Seth Vargo
9756d62378 Accept "project" as an attribute to GCP resources
This is the first step in removing the config dependency on "project".
This change is backwards-compatible because the value for this new
attribute defaults to the value from the provider.
2016-04-10 13:01:24 -04:00
Trevor Pounds
a77d60e006 Use built-in schema.HashString. 2016-02-07 16:29:34 -08:00
chris
d99a368c03 provider/google: Support named_port on instance_group_manager
This allows HTTP and HTTPs load-balancers to direct traffic to ports other than tcp/80 and tcp/443.
2016-01-20 09:15:30 -05:00
Lars Wander
af69d1cd76 provider/google: Updated Read(..) behavior to handle deleted resources 2016-01-07 10:39:04 -05:00
stack72
76e0099e3c Fixing Gofmt errors 2015-12-17 00:43:50 +01:00
Lars Wander
0d6c40a454 provider/google: Fix instance group manager instance restart policy 2015-11-12 15:44:31 -05:00
clint shryock
dc2a87c505 update with go fmt 2015-10-29 17:10:44 -05:00
Lars Wander
5006049b3f provider/google: Fixed timeout bug on large instance groups 2015-10-23 15:12:53 -04:00
Lars Wander
05503f4f9c Refactored wait code to delete duplicated code & share functionality 2015-09-24 16:30:12 -04:00
Radek Simko
e175531884 google: Code formatted via gofmt 2015-08-14 12:06:06 +01:00
Dave Cunningham
9fb2258451 Make target_pools optional 2015-07-30 10:46:16 -04:00
Dave Cunningham
217393d674 Increase timeout, IGM delete can be slow 2015-07-28 14:09:43 -04:00
Dave Cunningham
d5b089fc69 Use new autoscaler / instance group manager APIs. 2015-07-27 20:47:10 -04:00