Commit Graph

54 Commits

Author SHA1 Message Date
The Magician
20391bd842 Add location / node_locations fields to GKE (#3114)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2019-03-13 09:32:46 -07:00
The Magician
43d8943745 Restore name_prefix for node pools (#2975)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-01 11:34:45 -08:00
The Magician
5a06139281 fixes to updating node versions (#2872)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-01-18 09:59:11 -08:00
The Magician
91a513ab83 clean up operation code (#2734) 2018-12-26 17:42:37 -08:00
The Magician
c605b0bc4b [Terraform]: Apply gofmt -s to all files managed by MM (#2676)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
The Magician
9961246b94 Remove max_pods_per_node from GA provider (#2391)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
The Magician
1b1538a6a4 Regional Clusters are GA followup (#2387)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
Chris Stephens
ce78bb0ce8 Remove name_prefix from container node pool 2018-12-20 17:22:22 -08:00
Nathan McKinley
902675c324 Reverting 1.20 and 1.19 cherrypick branches. 2018-12-20 17:22:22 -08:00
The Magician
4570cd119a Regional Clusters are GA followup (#2387)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-12 17:23:35 -08:00
Paddy Carver
9a3dd8db6e Fix provider_versions.html link. 2018-10-03 18:46:20 -07:00
Riley Karson
ee67a87a65 Change deprecation message. 2018-10-03 12:58:52 -07:00
Riley Karson
a8747b4909 Deprecate handwritten beta fields. 2018-10-02 14:44:09 -07:00
Dana Hoffman
546401277a
Make max_pods_per_node ForceNew (#2139)
I don't see any way of updating in the API, and even if there were, we aren't calling it right now.

Fixes #2084
2018-10-02 12:40:12 -07:00
Ville Törhönen
80e03f7f28 Set computed flag for 'max_pods_per_node' (#2077) 2018-09-19 14:46:41 -07:00
Jamie Lennox
c24d622b8f Set correct nodepool Id using 4 part importer (#2035)
The ID that is created for a nodepool is 3 parts in the form of
<location>/<cluster>/<nodepool>. When we use the newer 4 part import
format the ID becomes that string. Then when checking the existence of
the nodepool the name is incorrectly parsed out of the ID.

When using the 4 part import form we need to set the correct ID so that
terraform can parse the name from the ID.

Closes: #1846
2018-09-12 18:44:52 -07:00
Nathan McKinley
81f8befbb5
Add support for max pods per node to node pool. (#2038) 2018-09-12 17:49:26 -07:00
Dana Hoffman
00e5bd5363
allow updating node image types (#1843)
Fixes #1702.

@chrisst I'm putting you as a reviewer, but no rush. Feel free to ask as many questions as you have! Also feel free to offer suggestions 😃 (or just say it's perfect as-is, that works too)
2018-08-07 14:07:28 -07:00
Dana Hoffman
34a68289cd
retry node pool writes on failed precondition (#1660)
Hypothetically fixes #1643.

@thomasriley, are you able to patch this change into your provider to see if it fixed the problem? I haven't been able to get a working repo so I haven't verified the fix yet.
2018-06-22 16:21:35 -07:00
Daisuke Fujita
b7f2025fb9 Add project to container_node_pool import name (#1653)
## What

As well as https://github.com/terraform-providers/terraform-provider-google/pull/1282 , make `resource_container_node_pool` importer accept `{project}/{zone}/{cluster}/{name}` format to specify the project where the node pool belongs to actually.

## Why

Sometimes I want to import container pool in different project from default SA's. However, currently there is no way to specify project the target node pool belongs to, Terraform tries to retrieve node pool from SA's project, then it fails due to `You cannot import non-existent resources using Terraform import.` error.
2018-06-14 09:54:08 -07:00
Darren Haken
2b1b668953 #1300 Supporting regional clusters for node pools (#1320)
This PR also switched us to using the beta API in all cases, and that had a side effect which is worth noting, note included here for posterity.

=====
The problem is, we add a GPU, and as per the docs, GKE adds a taint to
the node pool saying "don't schedule here unless you tolerate GPUs",
which is pretty sensible.

Terraform doesn't know about that, because it didn't ask for the taint
to be added. So after apply, on refresh, it sees the state of the world
(1 taint) and the state of the config (0 taints) and wants to set the
world equal to the config. This introduces a diff, which makes the test
fail - tests fail if there's a diff after they run.

Taints are a beta feature, though. :) And since the config doesn't
contain any taints, terraform didn't see any beta features in that node
pool ... so it used to send the request to the v1 API. And since the v1
API didn't return anything about taints (since they're a beta feature),
terraform happily checked the state of the world (0 taints I know about)
vs the config (0 taints), and all was well.

This PR makes every node pool refresh request hit the beta API. So now
terraform finds out about the taints (which were always there) and the
test fails (which it always should have done).

The solution is probably to write a little bit of code which suppresses
the report of the diff of any taint with value 'nvidia.com/gpu', but
only if GPUs are enabled. I think that's something that can be done.
2018-04-24 17:55:21 -07:00
Dana Hoffman
7596164ad1
Deprecate name_prefix (#1035)
* deprecate name_prefix

* make name_prefix computed and add migration instructions
2018-04-02 10:28:59 -07:00
Dana Hoffman
78e8c7b378
fix bug in np version code (#1276) 2018-03-30 10:59:33 -07:00
Dana Hoffman
33d87a2bc1
add support for node pool versions (#1266) 2018-03-29 13:27:11 -07:00
Dana Hoffman
42cca119eb add gke taints 2018-03-27 14:55:42 -07:00
Alessandro Siragusa
7d3d13c7b1 Adding instance_group_urls in resource_container_node_pool (#1207) 2018-03-16 12:54:01 -07:00
Dana Hoffman
fe8ceed1d5
Add support for GKE metadata concealment (#1199)
* add support for gke metadata concealment

* docs for metadata concealment
2018-03-15 13:28:30 -07:00
Dana Hoffman
fd0819786b
revive initial_node_count (#1176) 2018-03-13 11:45:01 -07:00
Dana Hoffman
46fb949c1f
Set ID for GKE resources before waiting (#1158) 2018-03-07 11:06:00 -08:00
Dana Hoffman
6d8a8b1747
Add more beta scaffolding for GKE resources (#1139)
* vendor container/v1beta1

* revendor container/v1beta1

* add beta scaffolding for gke resources

* fix json unmarshal error

* fix issues with trying to convert interface instead of struct

* same fixes but for node pool

* move setid calls back
2018-03-06 17:44:05 -08:00
Nathan McKinley
e8ffe89817
Extra error handling for node pools that don't match instance manager pattern. (#1149) 2018-03-02 17:14:48 -08:00
Vincent Roseberry
842256abc2
Return an error if name and name prefix are specified in node pool (#1062) 2018-02-08 13:35:35 -08:00
Emily Ye
41a0fddfbd remove multiple locks from cluster update and add lock helper 2018-02-05 09:45:53 -08:00
Dana Hoffman
92b9984dae
fix gke tests (#977) 2018-01-18 09:51:55 -08:00
Vincent Roseberry
6ba6dfa6d2
Ensures operation on a cluster are applied serially (#937) 2018-01-09 12:39:04 -05:00
Dana Hoffman
585c734503
Set default scopes when creating GKE clusters/node pools (#924)
* set scopes by default

* clarify list -> list/set
2018-01-08 15:54:45 -08:00
Vincent Roseberry
dab491d28d
Make zone field consistent and truly optional for all resources (#914) 2018-01-03 16:18:40 -05:00
Nathan McKinley
114b646fae
Enable 'zone' to be specified at the provider level instead of per-resource. (#816)
- Fetch Zone attribute any place where it *was* being fetched from the schema by
	combination schema / provider-level attribute.
- Allow region to be unspecified if zone is specified.
- Switch one example to using provider-level zone as an example.
- Make provider-level zone optional.  (Individual resources will fail if they can't find a zone.)
- Add tests for getZone and getRegion.
2017-12-06 14:30:04 -08:00
Vincent Roseberry
6c5d6b72e0
Store project and region in state (#784)
* Store project and region in state

* Delete unused project in runtimeconfig_variable
2017-11-27 16:32:20 -08:00
David Quarles
34297fe478 Add support for google_container_node_pool management (#669)
* add support for `google_container_node_pool` management (sans-tests)

* [review] add tests, docs, general cleanup

* add docs

* [review] amend test to check updates and terraform fmt

* test updates, make nested management fields non-computed
2017-11-21 12:56:29 -08:00
Johannes Brüderl
7a9582ac00 allow node pools with size 0 (#752) 2017-11-16 17:38:42 -08:00
Dana Hoffman
adbb5dd4fb
Update GKE docs to match actual schema; reorder fields in schema (#637)
* reorder schemas and update docs

* initial_node_count is optional

* clarify when initial_node_count must be set
2017-10-27 15:18:34 -07:00
Dana Hoffman
5b3bd3455c Fix crash when creating node pools with name_prefix (#531) 2017-10-04 16:41:35 -07:00
Dana Hoffman
bb0ab8e1f6 Merge the schemas and logic for the node pool resource and the node pool field in the cluster to aid in maintainability (#489) 2017-10-03 17:09:34 -07:00
Dana Hoffman
617ad7362b allow min node counts of 0 for node pool autoscaling (#468) 2017-09-26 15:57:51 -07:00
Joe Selman
0605638885 Add preemptible as an option to node config (#341)
* Add preemptible as an option to node config

* Check for preemptible in test matching functions

* Move flattenClusterNodeConfig to node_config

* Handle bools properly when comparing in cluster and node pool tests

* Use a supported image_type in cluster tests
2017-09-01 13:02:26 -07:00
Roberto Jung Drebes
5602218586 allow configuring node_config of node_pools specified in container_cluster (#299) 2017-08-11 12:23:17 -07:00
Riley Karson
9e76fab11b Convert old validation functions to use IntAtLeast from helper/validation. (#312)
* Convert old validation functions to use IntAtLeast in helper/validation.

* make fmt

* Remove unused import.
2017-08-10 13:01:45 -07:00
Vincent Roseberry
c9e2ce7f08 Change google_container_node_pool ID format to zone/cluster/name to remove artificial restriction on node pool name across clusters (#304) 2017-08-07 12:52:02 -07:00
Anders Bruun Olsen
f06970c97a Make google_container_node_pool resources importable. (#284) 2017-08-07 10:35:39 -07:00