Commit Graph

28 Commits

Author SHA1 Message Date
Sam Bashton
092b29c4ba Allow resizing of Google Cloud persistent disks (#15077) 2017-06-05 20:19:57 +03:00
Sam Bashton
951efa991f Add ability to import Google Compute persistent disks (#14573)
* Add ability to import Google Compute persistent disks

* Fix additional URL names
2017-05-30 14:16:12 +01:00
Paddy
4baea4e612 Merge branch 'master' into paddy_gcp_detach_deleted_disks 2017-05-23 14:45:27 -07:00
Thomas Poindessous
7e31db5cf5 Golint from Atom 2017-05-22 22:51:31 +02:00
Thomas Poindessous
acc0e9590a Be more specific on the regexp used to detect URI 2017-05-22 22:51:31 +02:00
Thomas Poindessous
b1e96506e0 Enable use of URI for snapshot name 2017-05-22 22:51:30 +02:00
Paddy
127283a858 provider/google: detach disks before deleting them.
When a `google_compute_disk` is attached to a `google_compute_instance`,
deleting can be tricky. GCP doesn't allow disks that are attached to
instances to be deleted. Normally, this is fine; the instance depends on
the disk, so by the time the disk is deleted, the instance should
already be gone.

However, some reports have cropped up (#8667) that deleting disks is
failing because they're still attached to instances. Though this
shouldn't happen, it appears it can happen under some unknown
conditions.

This PR adds logic that will attempt to detach disks from any instances
they're attached to before deleting the disks, adding another safeguard
that should prevent this behaviour.
2017-05-18 17:28:16 -07:00
Dana Hoffman
da2a1b5659 provider/google: Handle all 404 checks in read functions via the new function 2017-05-10 14:50:19 +03:00
Paddy
f95b8ccbe1 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
tpoindessous
d625406706 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
bfde91ecb1 Start adding tests for image resolution.
Add tests that show what we want image input strings to resolve to, so
we can test that behaviour.
2017-01-23 16:45:06 -08:00
Dana Hoffman
5e04661a5a providers/google: Add support for encrypting a disk (#11167)
* providers/google: add support for encrypting a disk

* providers/google: Add docs for encrypting disks

* providers/google: CSEK small fixes: sensitive params and mismatched state files
2017-01-18 13:49:48 +00: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
Evan Brown
3ca0bea7c0 providers/google: Don't fail deleting disks that don't exist.
Addresses #5942
2016-05-16 11:57:04 -07: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
Lars Wander
af69d1cd76 provider/google: Updated Read(..) behavior to handle deleted resources 2016-01-07 10:39:04 -05:00
Lars Wander
05503f4f9c Refactored wait code to delete duplicated code & share functionality 2015-09-24 16:30:12 -04:00
Dainis Tillers
54bff0e3b5 Added - create disk from snapshot 2015-04-08 14:21:39 +03:00
David Watson
56c5854e5b Update Google API import to point to the new location. 2015-03-18 17:10:39 +00:00
Paul Hinze
f458187d86 Merge pull request #960 from BashtonLtd/gce_self_links
Add SelfLink fields to all GCE resources
2015-02-10 08:10:20 -06:00
David Watson
3f7ab15362 Add SelfLink field to GCE disk resource. 2015-02-10 11:13:55 +00:00
Dave Cunningham
d9add1b513 Allow specifying project or full URL when specifying image 2015-01-29 20:00:02 -05:00
Mitchell Hashimoto
d9fefb9ee0 fmt 2014-10-10 14:50:35 -07:00
Jeff Goldschrafe
69c09c1cb7 Configurable disk types for GCE
Supports configuring the disk type for Google Compute Engine disk
resources. Both `google_compute_disk` and `google_compute_instance`
disk types are supported.

Resolves #351.
2014-10-07 01:40:20 -04:00
Mitchell Hashimoto
36d4ec4fd4 providers/google: on refresh, treat 404 as resource gone 2014-08-25 22:49:14 -07:00
Mitchell Hashimoto
d4c23e9e85 providers/google: check operations for errors 2014-08-25 22:44:27 -07:00
Mitchell Hashimoto
5f79e59ed1 providers/google: compute_disk 2014-08-25 16:23:28 -07:00