Commit Graph

470 Commits

Author SHA1 Message Date
Lars Wander f8784df82b provider/google: Mark next_hop_network as read only. 2016-03-10 13:58:09 -05:00
Paul Hinze 5ece31dc88 Merge pull request #5501 from evandbrown/vpnval
provider/google: Validate VPN tunnel peer_ip
2016-03-09 18:55:10 -06:00
Paul Hinze c1f8dda863 Merge pull request #5497 from evandbrown/flakeygcs
provider/google: Address flaky GCS acceptance tests.
2016-03-09 18:48:44 -06:00
Eric Robert 92d535267c Fix Google instance template creation for preemptible VM 2016-03-08 16:18:23 +00:00
Evan Brown 23af84ca09 provider/google: Validate VPN tunnel peer_ip 2016-03-07 21:35:08 -08:00
Evan Brown aa5099fe9b 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 2e958f7a12 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 87006d6a0c 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 b03fc1d2e9 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 6a8c814be8 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 b3f7d1e386 Added google_compute_instance_group resource 2016-02-26 18:41:35 +00:00
Paul Hinze 79dee04a98 provider/google: cover fix in #5110 2016-02-22 18:55:22 -06:00
Paul Hinze 1d67fc4bb8 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 a449730494 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 20f8104caf provider/google: Add support for reading SQL instance assigned IP Addresses 2016-02-22 10:38:14 -05:00
Matt Morrison 6ccfd8db93 Fix Google compute network forces new resource 2016-02-22 21:55:42 +13:00
James Nugent 0d9a7a65ef 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 a040110c0f Gix gofmt errors 2016-02-18 08:51:27 -08:00
James Nugent b32a863ed3 provider/google: Clarify comment about defaults 2016-02-18 08:37:58 -08:00
James Nugent b77bcd64fd Remove TODO comment 2016-02-18 08:37:58 -08:00
James Nugent 31f47e5abf Correct format specifier 2016-02-18 08:37:58 -08:00
Matt Morrison f66f37f4d8 Add more acceptance tests, and fix some test cases 2016-02-18 08:37:58 -08:00
Matt Morrison d6039af398 Add subnetwork resource ACC tests, additional doc updates 2016-02-18 08:37:58 -08:00
Matt Morrison 430ed48a44 Update google resources where necessary to make use of subnetworks, update som docs 2016-02-18 08:37:58 -08:00
Matt Morrison aedc5ba4af [WIP] support for creating distributed networks, and subnetwork resources 2016-02-18 08:37:57 -08:00
James Nugent 815cde7fd2 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 3eb65f2cbb Enable `go vet -unusedresult` check and fix warnings. 2016-02-17 11:59:50 -08:00
Lars Wander 14d133f574 provider/google: Fix VPN Region bug 2016-02-13 09:47:35 -05:00
James Nugent 636f05a941 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 49e76ecf58 google_pubsub_subscription crashes when ack_deadline_seconds is provided 2016-02-12 12:41:20 +01:00
Bill Fumerola 6fa4fba83e 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
Trevor Pounds 0cd0ff0f8e Use built-in schema.HashString. 2016-02-07 16:29:34 -08:00
clint shryock 840d2e7ccc Switch to acctest.RandInt for acceptance tests 2016-02-04 11:20:22 -06:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
chris 9aa8bbda93 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
James Nugent ea9e01cc78 Merge pull request #4669 from lwander/f-gcp-sql-user
provider/google: SQL user resource, documentation & tests
2016-01-14 06:51:17 +00:00
Lars Wander 7245a63077 Merge pull request #3893 from lwander/b-gcp-bucket-content
provider/google: Content field for bucket objects
2016-01-13 17:14:53 -05:00
Lars Wander 504bc87ec6 Merge pull request #4265 from lwander/gcp-assigned-nat-ip
provider/google: provide assigned_nat_ip as well as nat_ip
2016-01-13 17:13:16 -05:00
Lars Wander b8c66dc5e5 provider/google: Content field for bucket objects 2016-01-13 17:06:58 -05:00
Lars Wander 456ec4d151 provider/google: SQL user resource, documentation & tests 2016-01-13 16:33:08 -05:00
Lars Wander 6a7da01d6b provider/google: Clarify SQL database name cannot be reused 2016-01-08 11:54:55 -05:00
Lars Wander 01a53922a4 Merge pull request #3913 from lwander/b-gcp-delete-behavior
provider/google: Updated Read(..) behavior to handle deleted resources
2016-01-07 10:56:28 -05:00
Lars Wander cef0589498 provider/google: Updated Read(..) behavior to handle deleted resources 2016-01-07 10:39:04 -05:00
Lars Wander 9a0ecd05eb provider/google: limit hardcoded test resource names 2016-01-05 19:49:06 -05:00
Lars Wander fb80ec8d33 provider/google: remove conflicting names from acceptance tests 2016-01-05 16:57:24 -05:00
Paul Hinze 8677f8eea7 provider/google: Collision fixes in compute backend service tests 2016-01-05 12:39:30 -06:00
Paul Hinze c4aff4a585 provider/google: Some more collision avoidance test tweaks 2016-01-05 12:26:44 -06:00
Paul Hinze 3f697d5b12 Merge pull request #4512 from lwander/b-gcp-fix-sshkey-metadata
provider/google: Fix project metadata sshkeys from showing up
2016-01-05 11:13:14 -06:00
Lars Wander a006a6a399 provider/google: Fix project metadata sshkeys from showing up 2016-01-05 11:37:52 -05:00
Paul Hinze e916bd1527 provider/google: enchance storage acctests to avoid collisions
Generate bucket names and object names per test instead of once at the
top level. Should help avoid failures like this one:

https://travis-ci.org/hashicorp/terraform/jobs/100254008

All storage tests checked on this commit:

```
TF_ACC=1 go test -v ./builtin/providers/google -run TestAccGoogleStorage
=== RUN   TestAccGoogleStorageBucketAcl_basic
--- PASS: TestAccGoogleStorageBucketAcl_basic (8.90s)
=== RUN   TestAccGoogleStorageBucketAcl_upgrade
--- PASS: TestAccGoogleStorageBucketAcl_upgrade (14.18s)
=== RUN   TestAccGoogleStorageBucketAcl_downgrade
--- PASS: TestAccGoogleStorageBucketAcl_downgrade (12.83s)
=== RUN   TestAccGoogleStorageBucketAcl_predefined
--- PASS: TestAccGoogleStorageBucketAcl_predefined (4.51s)
=== RUN   TestAccGoogleStorageObject_basic
--- PASS: TestAccGoogleStorageObject_basic (3.77s)
=== RUN   TestAccGoogleStorageObjectAcl_basic
--- PASS: TestAccGoogleStorageObjectAcl_basic (4.85s)
=== RUN   TestAccGoogleStorageObjectAcl_upgrade
--- PASS: TestAccGoogleStorageObjectAcl_upgrade (7.68s)
=== RUN   TestAccGoogleStorageObjectAcl_downgrade
--- PASS: TestAccGoogleStorageObjectAcl_downgrade (7.37s)
=== RUN   TestAccGoogleStorageObjectAcl_predefined
--- PASS: TestAccGoogleStorageObjectAcl_predefined (4.16s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google 68.275s
```
2016-01-05 09:07:45 -06:00
Paul Hinze 5c6304ed57 provider/google: skip remainder of metadata tests
Any of the tests can fail due to
https://github.com/hashicorp/terraform/issues/4504
2016-01-05 08:29:59 -06:00
Paul Hinze c57aae34c1 provider/google: skip failing test so build can go green
Failure reason filed as
https://github.com/hashicorp/terraform/issues/4504, fixing PR can unskip
test as it resolve the underlying issue.
2016-01-04 19:00:53 -06:00
Paul Hinze 4c6c5f5798 provider/google: Fix collisions in SQL instance acctests 2016-01-04 18:04:55 -06:00
Paul Hinze 983b34291d provider/google: fix InstanceGroupManager CheckDestroy in tests
Nil check was just backwards. Vetted by comparing to other tests with
similar CheckDestroy implementations
2016-01-04 16:29:31 -06:00
Paul Hinze 5e9e22d4fd provider/google: Allow acctests to set credentials via file
Makes things easier on Travis.
2016-01-04 13:20:21 -06:00
stack72 14b7559cd1 Fixing Gofmt errors 2015-12-17 00:43:50 +01:00
Lars Wander 889b9fc95d Merge pull request #3763 from sl1pm4t/b-gce-instance-no-exist
Issue #3742 - terraform destroy fails if Google Compute Instance no...
2015-12-15 15:02:36 -05:00
Lars Wander 41cd85c7d8 Merge pull request #3892 from lwander/b-gcp-instance-group-restart
provider/google: Fix instance group manager instance restart policy
2015-12-15 11:38:12 -05:00
stack72 ed8c5cdeea Fixing some gofmt errors that keep appearing on my master branch 2015-12-12 11:00:54 +00:00
Lars Wander a1676f9eb1 provider/google: gofmt 2015-12-11 12:59:13 -05:00
Lars Wander a1a5788ed8 provider/google: provide assigned_nat_ip as well as nat_ip 2015-12-11 12:57:18 -05:00
pat 6f7ef2fadd golang pubsub SDK has been released. moved topics/subscriptions to use that
Conflicts:
	builtin/providers/google/provider.go
	builtin/providers/google/resource_subscription.go
	builtin/providers/google/resource_subscription_test.go

golang pubsub SDK has been released.  moved topics/subscriptions to use that

Conflicts:
	builtin/providers/google/provider.go
	builtin/providers/google/resource_subscription.go
	builtin/providers/google/resource_subscription_test.go

file renames and add documentation files

remove typo'd merge and type file move

add to index page as well

only need to define that once

remove topic_computed schema value

I think this was used at one point but is no longer. away.

cleanup typo

adds a couple more config values

- ackDeadlineSeconds: number of seconds to wait for an ack
- pushAttributes: attributes of a push subscription
- pushEndpoint: target for a push subscription

rearrange to better match current conventions

respond to all of the comments
2015-12-02 10:36:00 -08:00
Paul Hinze 2f25d57e7c Merge pull request #3993 from lwander/b-gcp-test-ssl-cert
provider/google: self-signed ssl certs for testing
2015-11-20 10:36:27 -06:00
Lars Wander 93ff7edb13 provider/google: self-signed ssl certs for testing 2015-11-20 11:32:25 -05:00
Paul Hinze e9a18a8f9f provider/google: fix sql database test
Was missing a required parameter

/cc @lwander @sparkprime
2015-11-20 09:52:23 -06:00
Paul Hinze eb9a93862b provider/google: read credentials as contents instead of path
Building on the work in #3846, shifting the Google provider's
configuration option from `account_file` to `credentials`.
2015-11-16 15:14:32 -06:00
Lars Wander 7be90215bc provider/google: Fix instance group manager instance restart policy 2015-11-12 15:44:31 -05:00
Lars Wander 28819603ba provider/google: HTTPS health checks resource + tests & documentation 2015-11-12 10:48:26 -05:00
Eddie Forson ad1c28990c providers/google: add pubsub auth endpoint #3803 2015-11-07 14:05:03 +00:00
Matt Morrison ede5ebb368 Add logging when instance no longer exists 2015-11-06 10:15:35 +13:00
Matt Morrison 5f90a4bc7e Issue #3742 - terraform destroy fails if Google Compute Instance no longer exists 2015-11-05 12:38:17 +13:00
Dave Cunningham bb5eb4ff46 Merge pull request #3702 from lwander/f-gcp-global-forwarding-rule
provider/google: global forwarding rule tests & documentation
2015-11-03 13:41:08 -05:00
Lars Wander d344d3e39a provider/google: global forwarding rule tests & documentation 2015-11-03 13:31:46 -05:00
Lars Wander d11524682a provider/google: Target HTTPS proxy resource + tests & documentation 2015-11-03 12:34:13 -05:00
Lars Wander e7ebb0ac40 provider/google: target http proxies resource + tests & documentation 2015-11-03 08:54:30 -05:00
Lars Wander ccb3f92bd1 provider/google: Added url map resource + tests & documentation 2015-11-02 17:12:41 -05:00
Dave Cunningham 232a538c14 Merge pull request #3723 from lwander/f-gcp-ssl-certs
provider/google: SSL Certificates resource + tests & documentation
2015-11-02 14:44:19 -05:00
Lars Wander f70d4079c1 provider/google: SSL Certificates resource + tests & documentation 2015-11-02 14:35:51 -05:00
Lars Wander 4ec1da4c86 provider/google: global address + tests & documentation 2015-10-30 17:57:09 -04:00
Dave Cunningham 8ff8f17add Merge pull request #3667 from lwander/f-gcp-instance-template-preemptible
provider/google: Added `preemtible` flag to `instance_template`
2015-10-30 17:38:15 -04:00
Lars Wander 2da1ba0118 provider/google: Added `preemtible` flag to `instance_template` 2015-10-30 16:07:11 -04:00
Lars Wander 07de5e7260 provider/google: SQL instance & database tests & documentation 2015-10-30 15:35:29 -04:00
clint shryock ec2d22cf29 update with go fmt 2015-10-29 17:10:44 -05:00
Dave Cunningham 66336f577a Merge pull request #3643 from lwander/f-gcp-instance-scheduling
provider/google: Added scheduling block to compute_instance
2015-10-26 19:29:33 -04:00
Lars Wander 5a311dbd11 provider/google: Added scheduling block to compute_instance 2015-10-26 16:16:06 -04:00
Dave Cunningham c0bf7aecb3 Merge pull request #3554 from lwander/f-gcp-version
provider/google: Accurate Terraform Version
2015-10-26 02:59:51 -04:00
Dave Cunningham a4eee72c78 Merge pull request #3620 from lwander/b-gcp-large-instance-group-timeout
provider/google: Fixed timeout bug on large instance groups
2015-10-26 02:56:18 -04:00
Daniel Imfeld f23a8bfe4e Update list of GCE service scope short names 2015-10-23 17:58:04 -05:00
Lars Wander 0c81a9c108 provider/google: Fixed timeout bug on large instance groups 2015-10-23 15:12:53 -04:00
Lars Wander bba2c3221d Added oauth2 support for GCP 2015-10-20 15:08:04 -04:00
Lars Wander d4f7cdc877 GCP UserAgent now shows accurate Terraform version 2015-10-20 14:45:11 -04:00
Paul Hinze f6e525e531 provider/google: one more test that should skip predefined_acl
it was depreceted in https://github.com/hashicorp/terraform/pull/3272
2015-10-14 22:36:19 -05:00
Paul Hinze 0efffc67f0 provider/google: storage bucket tests shouldn't not check predefined_acl
it was depreceted in https://github.com/hashicorp/terraform/pull/3272
2015-10-14 22:17:34 -05:00
Paul Hinze b2b41192ac provider/google: container test needed bigger instance to pass 2015-10-14 22:16:58 -05:00
Paul Hinze 4f400a1944 provider/google: one more fix to GCE metadata
In #3501 @lwander got us almost all the way there, but we still had
tests failing. This seemed to be because GCE sets
`metadata.startup-script` to a blank string on instance creation, and if
a user specifies any `metadata` in their config this is seen as the
desired full contents of metadata, so we get a diff trying to remove
`startup-script`.

Here, to address this, we just proactively remove the "startup-script"
key from `Read`, and then we enforce that "metadata_startup_script"
is the only way to configure startup scripts on instances.
2015-10-14 21:34:33 -05:00
Lars Wander b7f7c7a731 Provider GCE, fixed metadata state update bug 2015-10-14 12:47:54 -05:00
Lars Wander 12625997c1 Added global address & tests 2015-10-14 12:47:53 -05:00
Panagiotis Moustafellos e4845f75cc removed extra parentheses 2015-10-08 15:48:04 +03:00
Radek Simko f9efede852 gofmt files from recently merged PRs 2015-10-07 13:35:06 -07:00
Dave Cunningham b816ed6c87 Merge pull request #3272 from lwander/f-gce-bucket-acls
provider/gce: Implemented bucket & object ACLs, as well as documentation and tests
2015-10-06 14:49:20 -04:00
Dave Cunningham f9fc89dfde Merge pull request #3258 from lwander/f-gce-optional-region
provider/gce: Make region optional for remaining GCE resources
2015-10-06 14:48:36 -04:00
Lars Wander d15acb042c Implemented bucket & object ACLs, as well as documentation and tests 2015-10-06 14:46:47 -04:00
Lars Wander 1be8e85d44 Implements optional region for remaining GCE resources 2015-10-06 14:44:40 -04:00
Radek Simko 9cbcb9a438 Remove no-op Updates from resource schemas 2015-10-03 14:29:19 -07:00
Dave Cunningham 2619b66e21 Merge pull request #3242 from lwander/b-gce-network-interface-name
provider/gce: Instance Template Network Interface Should be URL
2015-09-25 16:40:16 -04:00
Lars Wander 158af9d0d4 Refactored wait code to delete duplicated code & share functionality 2015-09-24 16:30:12 -04:00
Dave Cunningham 488738163b Merge pull request #3240 from lwander/f-gce-bucket-website
provider/gce: Implement "website features" for GCE buckets
2015-09-16 17:37:32 -04:00
Dave Cunningham 30c27362b1 Merge pull request #3213 from lwander/f-gce-vpn
provider/gce: VPN resources, documentation, tests and example
2015-09-15 16:29:41 -04:00
Lars Wander 6850786422 Documentation and tests written for GCE VPN config 2015-09-15 16:13:48 -04:00
Lars Wander 4fd5c72540 Fix "malformed url" bug in instance template when using network name 2015-09-15 15:59:26 -04:00
Lars Wander 53e7058dee Address issue #2292 2015-09-15 15:06:52 -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 602acadde8 Implemented GCS bucket objects 2015-09-08 16:57:18 -04:00
Dave Cunningham 455ba7bdb1 Merge pull request #3131 from lwander/gce-fix-metadata
Brought GCE project metadata code up to spec with GCE API change
2015-09-08 15:51:25 -04:00
Radek Simko 567c299a84 Use computed fingerprint 2015-09-08 12:00:22 +01:00
Radek Simko a36f893d7e Rename backend_service_test to compute_backend_service_test 2015-09-08 11:56:20 +01:00
Radek Simko 011b62974a google: Add acc. tests for google_compute_backend_service 2015-09-08 10:22:14 +01:00
Radek Simko 7d3976e7b6 google: Add new resource - google_compute_backend_service 2015-09-08 10:22:14 +01:00
Radek Simko cff26ea65a Add extra debugging for google OperationWaiter 2015-09-08 10:22:14 +01: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
Radek Simko 53499a9391 google: Add regression test for #2978 2015-08-20 21:40:57 +01:00
Radek Simko f27f64e8af Merge pull request #2978 from djworth/master
Convert int to int64 when building the cluster.NodeConfig struct
2015-08-20 21:34:54 +01:00
Radek Simko f27b0a0cf1 Merge pull request #3000 from TimeIncOSS/code-formatting
Format code via gofmt + fix whitespacing
2015-08-19 10:45:11 +01:00
Dave Cunningham aa45266fdb Fix #2901 2015-08-19 02:57:04 -04:00
Radek Simko 00ad41bf7d google: Code formatted via gofmt 2015-08-14 12:06:06 +01:00
djworth 75c1475cc1 Convert int to int64 when building the cluster.NodeConfig struct
related to issue https://github.com/hashicorp/terraform/issues/2901
2015-08-11 08:27:32 -04:00
Dave Cunningham 6e7c6122e9 Merge pull request #2894 from sparkprime/optional_target_pool
Make target_pools optional
2015-07-30 13:52:44 -04:00
Dave Cunningham 65ba4c1b06 Make target_pools optional 2015-07-30 10:46:16 -04:00
Justin Campbell 7884456c4b providers/google: Fix reading account_file path 2015-07-29 15:59:33 -04:00
Justin Campbell 4764a556c0 providers/google: Fix error appending 2015-07-29 15:59:33 -04:00
Clint Shryock 8faa111156 providers/google: Return if we could parse JSON 2015-07-29 15:59:32 -04:00
Justin Campbell 773852e2d5 providers/google: Change account_file to JSON
If JSON fails to parse, treat it as a file path
2015-07-29 15:59:32 -04:00
Justin Campbell 2a04708d66 providers/google: Default account_file* to empty
Prevents prompting for input
2015-07-29 15:59:32 -04:00
Justin Campbell a7ca7e0b36 providers/google: Add account_file/account_file_contents ConflictsWith 2015-07-29 15:59:32 -04:00
Justin Campbell 4ce776d252 providers/google: Use account_file_contents if provided 2015-07-29 15:59:32 -04:00
Justin Campbell a8d0a70c03 providers/google: Add account_file_contents to provider 2015-07-29 15:59:32 -04:00
Dave Cunningham e8e5495483 Increase timeout, IGM delete can be slow 2015-07-28 14:09:43 -04:00
Dave Cunningham 24167b1085 Make failure of "basic" test not interfere with success of "update" test 2015-07-28 14:09:29 -04:00
Dave Cunningham 1ec247ef37 Use new autoscaler / instance group manager APIs. 2015-07-27 20:47:10 -04:00
Dave Cunningham c6f0bf479b Merge branch 'master' into gce_autoscaling 2015-07-20 14:25:26 -04:00
Sander van Harmelen e1d5af8ccf Fixing the build...
The v0.beta is removed, so I also removed it from here. Strangely
enough I cannot find any code that actually used it other then in being
instantiated in the provider config func.
2015-07-16 18:44:09 +02:00
Radek Simko f5e22d0675 Add new resource - google_container_cluster 2015-07-11 18:56:24 +01:00
Dave Cunningham 447da2177e Add ForceNew metadata_startup_script field 2015-07-01 21:24:34 -04:00
Mitchell Hashimoto cddd54c3de fmt 2015-06-23 22:31:24 -07:00
Dave Cunningham b222499ee0 Add beta compute client 2015-06-10 00:14:13 -04:00
Paul Hinze 84afeb73b1 acc tests: ensure each resource has a _basic test
Helpful for breadth first acc test sweeps `-run '_basic$'`
2015-06-07 18:18:14 -05:00
Dan Hilton b909f7826b provider/google: Add support for Google Compute Stogare buckets.
Configure Google Compute Storage buckets using:
* name (compulsory attribute)
* predefined_acl (optional, default: `projectPrivate`)
* location (optional, default: `US`)
* force_destroy (optional, default: `false`)

Currently supporting only `predefined_acl`s. Bucket attribute updates happen via re-creation. force_destroy will cause bucket objects to be purged, enabling bucket destruction.
2015-06-01 11:36:50 +01:00
Dave Cunningham 419b4f02d2 Merge autoscaler & instance group PR from dwatson
Additionally:
Update CHANGELOG
Make cooldown period optional for autoscaler
Refactor autoscaler and add more error checking
Instance template now supports image aliases
Replace instance group manager 'size' -- use target_size (now writeable)
Add documentation for autoscaler
Add beta warnings to docs
2015-05-16 20:14:38 -04:00
Clint Shryock f7b6b6b2b5 Strip 'sdk' suffix from methods; it's a remnant 2015-05-12 14:58:10 -05:00
Dave Cunningham 372908cc6f Merge pull request #980 from BashtonLtd/gce_instance_template_network_update
Update Instance Template network definition to match changes to Instance.
2015-05-12 15:46:04 -04:00
Dave Cunningham e27393af41 Merge pull request #1894 from dcarley/gce_health_check_defaults
provider/gce: Fix updates for http_health_check (set defaults)
2015-05-12 12:29:40 -04:00
Dave Cunningham 5f15a9d26a Allow local SSDs, Fix #1088 2015-05-11 21:40:37 -04:00
Dan Carley 579c37cd74 provider/gce: Set defaults for http_health_check
In order to fix the failing test in the preceding commit when optional
params are changed from their default "computed" values.

These weren't working well with `HttpHealthCheck.Patch()` because it was
attempting to set all unspecified params to Go's type defaults (eg. 0 for
int64) which the API rejected.

Changing the call to `HttpHealthCheck.Update()` seemed to fix this but it
still didn't allow you to reset a param back to it's default by no longer
specifying it.

Settings defaults like this, which match the Terraform docs, seems like the
best all round solution. Includes two additional tests for the acceptance
tests which verify the params are really getting set correctly.
2015-05-10 21:20:40 +01:00
Dan Carley 13e9e6f51d provider/gce: Test updates to http_health_check
By first creating a very simple resource that mostly uses the default
values and then changing the two thresholds from their computed defaults.

This currently fails with the following error and will be fixed in a
subsequent commit:

    --- FAIL: TestAccComputeHttpHealthCheck_update (5.58s)
            testing.go:131: Step 1 error: Error applying: 1 error(s) occurred:

                    * 1 error(s) occurred:

                    * 1 error(s) occurred:

                    * Error patching HttpHealthCheck: googleapi: Error 400: Invalid value for field 'resource.port': '0'.  Must be greater than or equal to 1
                    More details:
                    Reason: invalid, Message: Invalid value for field 'resource.port': '0'.  Must be greater than or equal to 1
                    Reason: invalid, Message: Invalid value for field 'resource.checkIntervalSec': '0'.  Must be greater than or equal to 1
                    Reason: invalid, Message: Invalid value for field 'resource.timeoutSec': '0'.  Must be greater than or equal to 1
2015-05-10 21:20:32 +01:00
Dan Carley 88f4df28ac provider/gce: Fix whitespace in test fixture
Mixture of hard and soft tabs, which isn't picked up by `go fmt` because
it's inside a string. Standardise on hard-tabs since that is what's used
in the rest of the code.
2015-05-10 21:06:33 +01:00
Paul Hinze 75c8396f7a provider/google: compute template metadata to map
Needs to match instance, since shared processing helper functions are
used.

Closes #1665
2015-05-06 12:33:35 -05:00
Dave Cunningham 85cc4ec0c1 Use a set for service account scopes. Fix #1759 2015-04-30 21:21:21 -04:00
Dave Cunningham f6554fb4a9 Support Google Cloud DNS, Fix #1148 2015-04-30 01:32:34 -04:00
Dainis Tillers 2fa8403673 Fix - typo in healthcheck names 2015-04-27 11:42:50 +03:00
Mitchell Hashimoto 9037a3a4bc Merge pull request #1426 from dainis/master
provider/google: add additional options to google provider
2015-04-22 08:50:22 +02:00
Mitchell Hashimoto d02abb7a8c Merge pull request #1484 from sparkprime/deprecate-network
deprecate google instance 'network' attribute in favor of network_interface
2015-04-22 08:49:04 +02:00
Dave Cunningham e0905d89f8 Add a UserAgent with version temporarily set to 0.0.0 2015-04-15 18:17:21 -04:00
Paul Hinze 76701884cd Merge pull request #1517 from hashicorp/f-simplify-google-instance
google: simplify instance metadata schema
2015-04-15 11:48:37 -05:00
Paul Hinze 01e75e0fc3 google: simplify instance metadata schema
It doesn't need to be a List of Maps, it can just be a Map.

We're also safe to remove a previous workaround I stuck in there.

The config parsing is equivalent between a list of maps and a plain map,
so we just need a state migration to make this backwards compatible.
2015-04-15 11:01:35 -05:00
Paul Hinze 64f0897c82 core: avoid diff mismatch on NewRemoved fields during -/+
fixes #1508

In a DESTROY/CREATE scenario, the plan diff will be run against the
state of the old instance, while the apply diff will be run against an
empty state (because the state is cleared when the destroy node does its
thing.)

For complex attributes, this can result in keys that seem to disappear
between the two diffs, when in reality everything is working just fine.

Same() needs to take into account this scenario by analyzing NewRemoved
and treating as "Same" a diff that does indeed have that key removed.
2015-04-14 17:23:30 -05:00
Dave Cunningham c08d69a509 deprecate google instance 'network' attribute in favor of network_interface 2015-04-10 17:03:51 -04:00
Dave Cunningham d149db41d6 Avoid 'source' being undefined in legacy network Read 2015-04-09 13:29:59 -04:00
Dainis Tillers ab71de8650 Just removing network refresh wont cut it, value from config must be used 2015-04-08 15:38:07 +03:00
Dainis Tillers 8f717c3e60 Fix #1394, network value for network_interface isn't a computed value and there is no need to refresh it each time instance data is read 2015-04-08 15:29:46 +03:00
Dainis Tillers 22616764fc Added - disk device name 2015-04-08 14:34:37 +03:00
Dainis Tillers 8ee3bb2d16 Added - create disk from snapshot 2015-04-08 14:21:39 +03:00
Paul Hinze 66dbf91ffd helper/schema: ensure ForceNew set when Update is not
If a given resource does not define an `Update` function, then all of
its attributes must be specified as `ForceNew`, lest Applys fail with
"doesn't support update" like #1367.

This is something we can detect automatically, so this adds a check for
it when we validate provider implementations.
2015-04-03 09:57:30 -05:00
Mitchell Hashimoto 5e7007e38f Merge pull request #1239 from BashtonLtd/gce_fix_false_bools
providers/google: Updates to GCE Instances and Instance Templates to allow for false bools.
2015-03-26 10:20:52 -07:00
Mitchell Hashimoto 591376f88d Merge pull request #1238 from BashtonLtd/gce_update_instance_template_disk_tests
providers/google: Update GCE Instance Template tests now that existing disk must exist first.
2015-03-26 10:20:29 -07:00
Mitchell Hashimoto 266670c1a1 Merge pull request #1154 from stuntgoat/gce-add-network
providers/google: add network field to the network_interface
2015-03-26 10:19:00 -07:00
Mitchell Hashimoto d21c112593 Merge pull request #1236 from BashtonLtd/gce_update_imports
Update Google API import to point to the new location.
2015-03-26 10:14:33 -07:00
Nolan Darilek 9d75fa72ab Add disk size to google_compute_instance disk blocks. 2015-03-24 11:45:20 -05:00
David Watson 988da2f90b Updates to GCE Instances and Instance Templates to allow for false values to be set for the auto_delete setting. 2015-03-18 17:50:03 +00:00
David Watson c675c20a48 Update GCE Instance Template tests now that existing disk must exist prior to template creation. 2015-03-18 17:42:03 +00:00
David Watson 33496eeaf8 Update Google API import to point to the new location. 2015-03-18 17:10:39 +00:00
stungtoat 1ae50a18f8 add network field to the network_interface 2015-03-06 22:13:07 -08:00
David Watson 84bf1220db Tests for GCE autoscaler resource. 2015-03-04 10:15:26 +00:00
David Watson c706081dd4 Initial commit of autoscaler resource. 2015-03-04 10:14:59 +00:00
Mitchell Hashimoto 1c2d19dc00 providers/google: set only top-level configs for lists [GH-929] 2015-03-02 10:00:24 -08:00
Dave Cunningham 04cbbe6a01 Remove unnecessary ; 2015-02-23 13:35:07 -05:00
Dave Cunningham 3e0e7753c9 Fix argument order 2015-02-23 13:30:41 -05:00
Mitchell Hashimoto 523639b5cd fmt 2015-02-20 10:22:26 -08:00
David Watson de9d052445 Remove debugging log lines. 2015-02-19 16:31:11 +00:00
David Watson fa6d945e08 Update tests to include updated network definition for instance templates from #980. 2015-02-19 11:47:53 +00:00
David Watson 4418cb7e2d Remove old todo comment. 2015-02-19 11:43:18 +00:00
David Watson c3d22ec068 Update Instance Template network definition to match changes to Instances. 2015-02-16 17:04:56 +00:00
David Watson 07b44a816a Add InstanceGroupManager to GCE. 2015-02-16 16:06:23 +00:00
Dave Cunningham b7f5f491e2 Make Google Instance disk attribute all ForceNew. Fix #608. 2015-02-13 14:23:49 -05:00
Dave Cunningham 4d280f0931 Use new oauth2 golang library 2015-02-11 21:21:24 -05:00
Dave Cunningham 106a1c62f5 Revert to upstream oauth2 2015-02-11 01:46:40 -05:00
Dave Cunningham 66ad26f19a Merge branch 'master' into oauth2 2015-02-11 00:37:13 -05:00
Paul Hinze 448edd1a83 Merge pull request #959 from BashtonLtd/gce_instance_template
GCE instance template support
2015-02-10 08:57:45 -06:00
David Watson 418bf2a692 Remove leftover todo comment. 2015-02-10 14:31:43 +00:00
Paul Hinze 24a9559365 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 a3ca34ac88 Add SelfLink field to GCE route resource. 2015-02-10 11:15:07 +00:00
David Watson 91b000fd31 Add SelfLink field to GCE network resource. 2015-02-10 11:14:37 +00:00
David Watson 4e1a421652 Add SelfLink field to GCE firewall resource. 2015-02-10 11:14:15 +00:00
David Watson 2b26177903 Add SelfLink field to GCE disk resource. 2015-02-10 11:13:55 +00:00
David Watson 006b98cdae Add optional to disk_name field. 2015-02-10 10:49:20 +00:00
David Watson ec1f874bdc Add tests for Instance Template support to google provider. 2015-02-10 10:29:49 +00:00
David Watson dfa97dfc17 Add Instance Template support to google provider. 2015-02-10 10:29:27 +00:00
Dave Cunningham 26b90c10a0 Merge branch 'master' into gcp_image 2015-02-10 03:25:45 -05:00
Dave Cunningham e898daf573 Merge branch 'master' into oauth2 2015-02-09 20:07:36 -05:00
Paul Hinze e81c995301 Merge pull request #951 from sparkprime/fix_health_check
Fix a number of healthcheck bugs
2015-02-09 18:50:14 -06:00
Paul Hinze 6e27da8c47 Merge pull request #937 from sparkprime/pr_network_interface
Deprecated 'network', introduce 'network_interface'
2015-02-09 18:49:56 -06:00
Dave Cunningham fbe99605e6 Fix whitespace 2015-02-07 19:05:19 -05:00
Dave Cunningham 4e4dcac276 Fix a number of healthcheck bugs 2015-02-07 19:03:18 -05:00
Julien Vey 33eebbed51 provider/gce: Add description in firewall resource 2015-02-06 13:33:02 +01:00
Dave Cunningham b385093502 Deprecated 'network', introduce 'network_interface' 2015-02-06 03:21:22 -05:00
Paul Hinze c6ab3b1711 Merge pull request #906 from BashtonLtd/gce_instance_selflink
Expose SelfLink field for GCE instances.
2015-02-03 15:46:46 -06:00
Dave Cunningham a07ff4bacb Remove service_accounts (legacy dupe of service_account) 2015-02-03 16:16:41 -05:00
David Watson 4ec0c34794 Expose SelfLink for GCE instances to allow other resources to reference instances. 2015-02-02 09:46:35 +00:00
Dave Cunningham aa009516b7 Port to oauth2, fix #606 2015-01-30 14:53:09 -05:00
Dave Cunningham 6046647f38 Multiple gcp improvements and new resources 2015-01-30 10:32:35 -06:00
Dave Cunningham e85c7113fa Allow specifying project or full URL when specifying image 2015-01-29 20:00:02 -05:00
Paul Hinze 9fff0b1729 providers/google: fix instance creation
with this commit, the google compute instance acceptance tests are
passing

 - remove GOOGLE_CLIENT_FILE requirement from provider tests to finish
   out #452
 - skip extra "#" key that shows up in metadata maps, fixes #757 and
   sprouts #883 to figure out core issue
 - more verbose variablenames in metadata parsing, since it took me
   awhile to grok and i thought there might have been a shadowing bug in
   there for a minute. maybe someday when i'm a golang master i'll be
   smart enough to be comfortable with one-char varnames. :)
2015-01-28 15:50:56 -06:00
stungtoat d3814d6180 providers/google: remove secrets file
fixes #452
2015-01-28 15:47:49 -06:00
Jeff Mitchell f2bd1f45ab Move duplicated envDefaultFunc out of each provider and into Schema. 2015-01-16 17:25:39 +00:00
Armon Dadgar 34d5464c63 Merge pull request #725 from jgoldschrafe/feature-google-compute-service-accounts
Support service accounts on GCE instances
2015-01-05 11:30:38 -08:00
Jeff Goldschrafe d3081e0da8 Support service accounts on GCE instances
Update the Google Compute Engine provider to add support for service
accounts on `google_compute_instance`. Both gcloud shorthand (`compute-ro`,
`storage-ro`, etc.) and OAuth2 API endpoints are supported.

This feature is currently limited to a single service account (supporting
multiple scopes) and an automatically-generated service account email.
2015-01-02 01:25:19 -05:00
Ferran Rodenas fc0902d230 provider/google: Add Ubuntu images
Ubuntu images are now GA, so add them to the list of available public images
2014-12-31 03:16:52 -08:00
Sander van Harmelen 36ed95c86d Fixing the acc tests
I do wonder when these tests where last run successfully… Must be quite
some time ago considering what I needed to fix in here 😉
2014-11-20 14:30:02 +01:00
Sander van Harmelen bed36cc86a Refactoring the resourceInstanceTags func just a little
My eye caught this somewhat un-logic mixed use of ‘vs’ and
‘v.(*schema.Set)’, so thought to make it a little cleaner…
2014-11-20 11:32:15 +01:00
Sander van Harmelen 144ceb8003 providers/google: update schema to use a DefaultFunc
This makes testing easier and gives you a way to configure the provider
using env variables. It also makes the provider more inline following
the TF 0.2 approach.
2014-11-20 11:25:23 +01:00
stungtoat afa1666cad set default host on connection info 2014-10-19 00:04:17 -07:00
stungtoat fe4e89bef7 consistent spacing 2014-10-18 23:17:14 -07:00
stungtoat 6cc10998ec go fmt 2014-10-18 23:15:43 -07:00
stungtoat fd979d0a8e providers/google: add external_address; needed for connection 2014-10-18 23:03:37 -07:00
Mitchell Hashimoto 36f225dea0 fmt 2014-10-10 14:50:35 -07:00
Mitchell Hashimoto 9e953c9908 Merge pull request #372 from jgoldschrafe/feature-google-compute-disk-types
Configurable disk types for GCE
2014-10-08 10:50:38 -07:00
Jeff Goldschrafe 88a020e0b5 Support IP forwarding on GCE instances
This change exposes the CanIpForward property of the Instance, allowing
users to create instances that are allowed to function as NAT or VPN
gateways.
2014-10-07 12:28:20 -04:00
Jeff Goldschrafe ddfdfebcc5 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 2f681c4bcc providers: fix tests 2014-09-28 17:32:39 -07:00
Mitchell Hashimoto 3941dbac5d fmt 2014-09-28 11:51:49 -07:00
Mitchell Hashimoto e2534e4210 builtin: fix all compilation 2014-09-28 11:51:39 -07:00
Jeff Goldschrafe 0598f2fdb0 google_compute_firewall: Support target tags 2014-09-26 01:15:31 -04:00
Mitchell Hashimoto ecc10616ba providers/google: tests passing, compiling 2014-09-16 17:17:09 -07:00
Mitchell Hashimoto a5c884f5aa fmt 2014-09-09 13:43:03 -07:00
Dainis Tillers 0ba2194503 Added - flag to set whether disk needs to be delete or not when instance terminates 2014-09-02 16:52:49 +03:00
Dainis Tillers 47ee01b7ce Fixed - allow to attach already existing disks 2014-09-02 16:52:21 +03:00
Dainis Tillers ebdceac770 Require project id as otherwise it will fail with cryptic error 2014-09-02 16:49:16 +03:00
Mitchell Hashimoto 3e4b7b862a providers/google: compute_firewall partial state 2014-08-26 20:33:53 -07:00