Commit Graph

3704 Commits

Author SHA1 Message Date
Dave Cunningham
90c5bf8f0e 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
feedddb9d8 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
4b79e55133 Allow local SSDs, Fix #1088 2015-05-11 21:40:37 -04:00
Dave Cunningham
27319e1366 Allow local SSDs, Fix #1088 2015-05-11 21:40:37 -04:00
Dan Carley
11f7b0c2ba 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
9847850e8e 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
f96e47590f 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
4208e83c64 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
b39460bd62 Use a set for service account scopes. Fix #1759 2015-04-30 21:21:21 -04:00
Dave Cunningham
7437a02c43 Support Google Cloud DNS, Fix #1148 2015-04-30 01:32:34 -04:00
Dave Cunningham
6d763bacfd Support Google Cloud DNS, Fix #1148 2015-04-30 01:32:34 -04:00
Dainis Tillers
bce21fe6ac Fix - typo in healthcheck names 2015-04-27 11:42:50 +03:00
Mitchell Hashimoto
01402c8a90 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
b99fce59e3 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
0f7483ab54 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
ec3feff9ca Add a UserAgent with version temporarily set to 0.0.0 2015-04-15 18:17:21 -04:00
Paul Hinze
7dab6a450a 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
a985b68edb 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
29c83231ce 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
d55ac06b4f deprecate google instance 'network' attribute in favor of network_interface 2015-04-10 17:03:51 -04:00
Paul Hinze
11402f3075 docs: fill out all provider env var configuration
I find env vars a lot easier to use in day-to-day practice, so it's
probably a good idea to let the users have that benefit too!
2015-04-10 14:31:53 -05:00
Dave Cunningham
f1e26ba5de Avoid 'source' being undefined in legacy network Read 2015-04-09 13:29:59 -04:00
Dainis Tillers
74b4f960cb Just removing network refresh wont cut it, value from config must be used 2015-04-08 15:38:07 +03:00
Dainis Tillers
28e29aec19 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
c9f500de4e Added - documentation about added features 2015-04-08 14:41:47 +03:00
Dainis Tillers
c3317e3560 Added - disk device name 2015-04-08 14:34:37 +03:00
Dainis Tillers
54bff0e3b5 Added - create disk from snapshot 2015-04-08 14:21:39 +03:00
Paul Hinze
952af7ad20 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
ba69c0dea2 Merge pull request #1272 from ndarilek/google-instance-docs-fix
website: 'project' requires ID, not name
2015-03-26 10:21:12 -07:00
Mitchell Hashimoto
52b43d550a 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
1ea826f5ea 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
2acedf19a6 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
a8917b2b34 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
1af0c7a2d3 Add disk size to google_compute_instance disk blocks. 2015-03-24 11:45:20 -05:00
Nolan Darilek
0cca21d927 Add disk size to google_compute_instance disk blocks. 2015-03-24 11:45:20 -05:00
Nolan Darilek
2c900dd4f9 'project' should be set to the project's ID, not its name. 2015-03-21 09:16:16 -05:00
David Watson
8cfd51bed7 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
13dbe2e991 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
56c5854e5b Update Google API import to point to the new location. 2015-03-18 17:10:39 +00:00
stungtoat
86913b0363 add network field to the network_interface 2015-03-06 22:13:07 -08:00
David Watson
1e28af1b46 Tests for GCE autoscaler resource. 2015-03-04 10:15:26 +00:00
David Watson
43cb8ff2a9 Initial commit of autoscaler resource. 2015-03-04 10:14:59 +00:00
Mitchell Hashimoto
dee37aa1dd providers/google: set only top-level configs for lists [GH-929] 2015-03-02 10:00:24 -08:00
Dave Cunningham
8a96c0c41e Remove unnecessary ; 2015-02-23 13:35:07 -05:00
Dave Cunningham
4d28f60235 Fix argument order 2015-02-23 13:30:41 -05:00
Mitchell Hashimoto
9b5d40c2e3 fmt 2015-02-20 10:22:26 -08:00
David Watson
a670b907c3 Remove debugging log lines. 2015-02-19 16:31:11 +00:00
David Watson
0fa06bae2e Update tests to include updated network definition for instance templates from #980. 2015-02-19 11:47:53 +00:00
David Watson
2187833dee Remove old todo comment. 2015-02-19 11:43:18 +00:00
David Watson
406d374baa Update Instance Template network definition to match changes to Instances. 2015-02-16 17:04:56 +00:00