Commit Graph

389 Commits

Author SHA1 Message Date
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
James Nugent
a02b335b1d provider/google: Provide valid config in acctest
The changes to allow for testing ID-only refresh conflict with passing
in "" as Config for tests. In this case we instead construct a config
with a known-non-existent bucket name.
2016-05-23 17:20:19 -05: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
James Nugent
8c7dcec8de Merge pull request #6574 from uber/b-gcp-acc-test-env
provider/google: correct error messages in acceptance tests
2016-05-13 17:29:56 -04:00
Evan Brown
1dd7de97a9 providers/google: support optionial uuid naming for Instance Template (#6604)
Auto-generating an Instance Template name (or just its suffix) allows the
create_before_destroy lifecycle option to function correctly on the
Instance Template resource. This in turn allows Instance Group Managers
to be updated without being destroyed.
2016-05-11 22:54:47 +01:00
Bill Fumerola
efd1a3f727 Correct error messages in google provider test library 2016-05-10 10:59:11 -07:00
James Nugent
edc89f2dcb Fix import formatting across code base 2016-04-18 17:28:46 -07:00
Evan Brown
421c1f6e9b Update docs and fix computed container settings 2016-04-14 16:33:52 -07:00
Evan Brown
0653c5272c provider/google: Support manual subnetworks and addons config 2016-04-14 16:31:24 -07:00
Seth Vargo
42d1600543 Read more default envvars for GCP
- Closes #5874
- Fixes #5872
2016-04-11 12:19:07 -04: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
Seth Vargo
63bd4b8dd1 Switch the order of gcp buildNetworks func to be more go-like
The current implementation returns error as the first parameter, 
but it is usually the last parameter.
2016-04-10 13:01:23 -04:00
Seth Vargo
418f854e83 Deprecate unused "region" attribute in gcp global_forwarding_rule 2016-04-10 13:01:23 -04:00
Seth Vargo
88c035fa88 Make GCP provider "project" attribute optional 2016-04-10 13:01:23 -04:00
Clint
9bcd3c0ad2 provider/google: Accept GOOGLE_CLOUD_KEYFILE_JSON env var for credentials 2016-04-04 16:56:35 -05:00
Bill Fumerola
ef0982895d provider/google: use non-deprecated image in acceptance tests, documentation 2016-03-26 09:55:28 -07:00
James Nugent
37f553c95a Merge pull request #5428 from shaneog/google_dns_managed_zone
description is now a required field for google_dns_managed_zone
2016-03-19 17:06:13 +00:00
Bill Fumerola
1de15ff2ef google_compute_instance_group: Correct error message for invalid instances 2016-03-18 09:25:28 -07:00
Lars Wander
0d35e58e8c provider/google: Mark next_hop_network as read only. 2016-03-10 13:58:09 -05:00
Paul Hinze
727fcee313 Merge pull request #5501 from evandbrown/vpnval
provider/google: Validate VPN tunnel peer_ip
2016-03-09 18:55:10 -06:00
Paul Hinze
3875f5396b Merge pull request #5497 from evandbrown/flakeygcs
provider/google: Address flaky GCS acceptance tests.
2016-03-09 18:48:44 -06:00
Eric Robert
f0784f3a45 Fix Google instance template creation for preemptible VM 2016-03-08 16:18:23 +00:00
Evan Brown
cc09f9cfee provider/google: Validate VPN tunnel peer_ip 2016-03-07 21:35:08 -08:00
Evan Brown
01b47596f4 provider/google: Address flaky GCS acceptance tests.
Acceptance tests for GCS that do rapid create/delete/create
on GCS buckets using the same name sometimes fail as the
bucket namespace is eventually consistent. This change makes
tests use a random bucket name for each test (adapted from
the existing ACL tests).
2016-03-07 14:26:19 -08:00
Evan Brown
0a3906ca83 provider/google: Fix Pubsub acceptance tests
Acceptance tests for Pubsub topics and subscriptions failed after
incorrectly determining that resources were not deleted in the
CheckDestroy phase.

Fixes 5437
2016-03-02 15:36:32 -08:00
Evan Brown
55600cd96d provider/google: Fix VPN tunnel creation test
The GCE API for creating VPN tunnels began validating the `peerIp` field
and rejecting RFC5735 addresses. The previous test was using one of
these addresses and failing as a result. This commit uses 8.8.8.8
for the peerIp.
2016-03-02 13:17:38 -08:00
Shane O'Grady
a9604c4104 description is now a required field for google_dns_managed_zone
The description field for a managed-zone is now a required field when using the Cloud API.
This commit defaults the field to use the text "Managed by Terraform" to minimize required boilerplate for Terraform users.

Ref: https://cloud.google.com/sdk/gcloud/reference/dns/managed-zones/create
2016-03-02 17:23:11 -03:00
Lars Wander
67b35fb02a Merge pull request #4087 from ajcrowe/google-instance_groups
provider/google: Support for unmanaged instance groups (google_compute_instance_group)
2016-02-26 15:33:08 -05:00
Alex Crowe
4cf19278e7 Added google_compute_instance_group resource 2016-02-26 18:41:35 +00:00
Paul Hinze
267cb8109a provider/google: cover fix in #5110 2016-02-22 18:55:22 -06:00
Paul Hinze
cd3ccbbcfd Merge pull request #5110 from fd/patch-1
google_pubsub_subscription crashes when ack_deadline_seconds is provided
2016-02-22 18:54:19 -06:00
James Nugent
57a17a0655 Merge pull request #5241 from sl1pm4t/b-google-network-backcompat
provider/google: Fix Google compute network forces new resource
2016-02-22 13:11:42 -05:00
Lars Wander
906bcbe1ad provider/google: Add support for reading SQL instance assigned IP Addresses 2016-02-22 10:38:14 -05:00
Matt Morrison
e70b3187eb Fix Google compute network forces new resource 2016-02-22 21:55:42 +13:00
James Nugent
a61aa751b2 Merge pull request #5177 from hashicorp/f-go-1.6
Update Travis to use Go 1.6
2016-02-18 10:01:49 -08:00
James Nugent
8de4033845 Gix gofmt errors 2016-02-18 08:51:27 -08:00
James Nugent
77a9ac216a provider/google: Clarify comment about defaults 2016-02-18 08:37:58 -08:00
James Nugent
438f0dd680 Remove TODO comment 2016-02-18 08:37:58 -08:00
James Nugent
c8c3521518 Correct format specifier 2016-02-18 08:37:58 -08:00
Matt Morrison
b5c5cbd5d4 Add more acceptance tests, and fix some test cases 2016-02-18 08:37:58 -08:00
Matt Morrison
98f8b0b3c7 Add subnetwork resource ACC tests, additional doc updates 2016-02-18 08:37:58 -08:00
Matt Morrison
9fd044c0f0 Update google resources where necessary to make use of subnetworks, update som docs 2016-02-18 08:37:58 -08:00
Matt Morrison
7d97c69498 [WIP] support for creating distributed networks, and subnetwork resources 2016-02-18 08:37:57 -08:00
James Nugent
34833ac922 Merge pull request #5125 from lwander/b-gcp-vpn-gateway-region
provider/google: Fix VPN Region bug
2016-02-17 13:45:32 -08:00
Trevor Pounds
32a939c9dd Enable go vet -unusedresult check and fix warnings. 2016-02-17 11:59:50 -08:00
Lars Wander
9041d2a8a8 provider/google: Fix VPN Region bug 2016-02-13 09:47:35 -05:00
James Nugent
61f5055367 Merge pull request #5075 from uber/fix-issue-4895
provider/google: Fix google_compute_backend_service max_utilization backend attribute
2016-02-12 13:15:48 -08:00
Simon Menke
c51878ff3f google_pubsub_subscription crashes when ack_deadline_seconds is provided 2016-02-12 12:41:20 +01:00
Bill Fumerola
e1ca77cc2a provider/google Fix backend service max_utilization attribute
Fixes issue #4985 by correcting copy/paste error that caused the
max_utilization attribute to be read from the max_rate_per_instance
attribute.

N.B. There is still no test coverage for this issue.
2016-02-09 13:41:01 -08:00