Commit Graph

12 Commits

Author SHA1 Message Date
Paddy 50ee426b72 Check for errors when deleting project metadata.
Our delete operation for google_compute_project_metadata didn't check an
error when making the call to delete metadata, which led to a panic in
our tests. This is also probably indicative of why our tests
failed/metadata got left dangling.
2017-02-16 02:36:03 -08:00
Igor Wiedler ad9a3fe44d [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 bacf5abf3c 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 cef0589498 provider/google: Updated Read(..) behavior to handle deleted resources 2016-01-07 10:39:04 -05:00
Lars Wander a006a6a399 provider/google: Fix project metadata sshkeys from showing up 2016-01-05 11:37:52 -05:00
Radek Simko f9efede852 gofmt files from recently merged PRs 2015-10-07 13:35:06 -07:00
Lars Wander 158af9d0d4 Refactored wait code to delete duplicated code & share functionality 2015-09-24 16:30:12 -04:00
Lars Wander b240628799 Refactored project/instance metadata to use same code whenever possible
Also added optimistic locking to instance metadata
2015-09-15 14:06:26 -04:00
Anthony Scalisi 198e1a5186 remove various typos 2015-09-11 11:56:20 -07:00
Lars Wander 3f4c451fe8 Brought metadata code up to spec with GCE API change 2015-08-31 14:43:45 -04:00
Clint Shryock 5d7e156982 provider/google: Misc. cleanups for tests to pass 2015-08-31 09:06:25 -05:00
Lars Wander 2aad1f7bd2 Implemented CRUD project metadata operations
Common metadata state is now stored

Optimistic locking support added to common_metadata

Revisions to keys in project metadata are now reflected in the project state

Wrote tests for project metadata (all pass)

Relaxed test conditions to work on projects with extra keys

Added documentation for project metadata
2015-08-24 12:53:28 -04:00