Commit Graph

128 Commits

Author SHA1 Message Date
The Magician
da338edfba use the cluster subnet to look up the node cidr block (#3654)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-05-20 14:31:38 -07:00
The Magician
5f03562eab Revert "Add conflicts_with for cluster remove_default_node_pool and n… (#3497)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-30 12:43:57 -07:00
The Magician
4688b0d33f Fix explicitly setting the default network + subnetwork in GKE (#3492)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-26 15:31:16 -07:00
The Magician
58a58c769f Use attr syntax on cluster-specific GKE fields. (#3448)
<!-- This change is generated by MagicModules. -->
Original Author: @rileykarson
2019-04-16 16:10:29 -07:00
The Magician
55c7a8b332 Hard remove broken Removed fields, fix 0.12 configs (#3437)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-15 18:14:01 -07:00
The Magician
61894cc787 Remove Computed from GKE cluster cidr_blocks (#3427)
<!-- This change is generated by MagicModules. -->
Original Author: @rileykarson
2019-04-15 13:29:32 -07:00
The Magician
7f46f5c4fc Add conflicts_with for cluster remove_default_node_pool and node_pool (#3422)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-11 17:24:13 -07:00
The Magician
55ef37fe38 GET clusters in error states so we see state information in debug logs. (#3389)
<!-- This change is generated by MagicModules. -->
Original Author: @rileykarson
2019-04-08 16:37:49 -07:00
The Magician
799f7387d1 Relax the limit on # of master authorized networks in GKE (#3397)
<!-- This change is generated by MagicModules. -->
Original Author: @rileykarson
2019-04-08 12:57:00 -07:00
The Magician
48d1168c03 Mark node_ipv4_cidr_block as Computed (#3319)
<!-- This change is generated by MagicModules. -->
/cc @samschlegel
2019-03-27 12:49:36 -07:00
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
705a9a754d Just don't set remove_node_pool on import (#3180)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-03-04 18:03:58 -08:00
The Magician
749e6b0281 Make VPC Native configurable in GKE (#3174)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2019-03-04 14:08:40 -08:00
The Magician
84902cc34e Only set remove_default_node_pool for import if false - fixes TF tests (#3169)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-03-01 15:45:21 -08:00
The Magician
1a5624c8ea Specify CIDR block sizes for GKE cluster subnets (#3145)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-28 21:19:29 -08:00
The Magician
77c086de1c [TF] GKE Cluster - fix import on some convenience fields (#3146)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-28 13:08:55 -08:00
The Magician
92a2409c11 [TF] Fix container cluster private cluster diff suppress/validation (#3110)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-25 14:01:02 -08:00
The Magician
b2f501754f Clean up failed cluster creation (#3044)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-14 10:29:34 -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
97347e5de5 Reconcile Magician formatting changes due to Go tools upgrade (#2869)
Reconcile Magician formatting changes due to Go tools upgrade
2019-01-14 09:40:18 -08:00
The Magician
ea98aa7fb3 Increase update timeout for clusters (#2859)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-01-11 10:44:52 -08:00
The Magician
91a513ab83 clean up operation code (#2734) 2018-12-26 17:42:37 -08:00
The Magician
cd6ec96c6e use cluster update for logging/monitoring in beta (#2631)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-12-20 17:22:22 -08:00
The Magician
b807d04e10 Fix for permadiff in container cluster caused by beta resource. (#2488) 2018-12-20 17:22:22 -08:00
The Magician
9ff5284d15 Container cluster changes ancillary to beta support for autoprovisioning. (#2415) 2018-12-20 17:22:22 -08:00
Chris Stephens
2c828110f0 Make master_auth user/pass optional 2018-12-20 17:22:22 -08:00
The Magician
7c3445229c Make removals in google_container_cluster (#2395) 2018-12-20 17:22:22 -08:00
The Magician
0f5c81ce65 regional and private clusters are in GA now (#2364)
<!-- This change is generated by MagicModules. -->
/cc @danawillow 

Fixes #2286
2018-12-20 17:22:22 -08:00
The Magician
0bed3bd5c7 add retries on create for container cluster (#2352)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-12-20 17:22:22 -08:00
The Magician
fd6666b3ff Output from magician generating into ga and beta providers (#2271)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
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
Riley Karson
4a0ee14304
Duplicate what tpgb does for master_ipv4_cidr_block (#2661)
Looks like we missed a couple lines while cherrypicking; copied these from tpgb.
2018-12-13 10:56:59 -08:00
The Magician
a138701b75 Fix for permadiff in container cluster caused by beta resource. (#2488) 2018-12-12 17:23:35 -08:00
The Magician
a5f1e6002c Container cluster changes ancillary to beta support for autoprovisioning. (#2415) 2018-12-12 17:23:35 -08:00
The Magician
b08884f49e regional and private clusters are in GA now (#2364)
<!-- This change is generated by MagicModules. -->
/cc @danawillow

Fixes #2286
2018-12-12 17:23:35 -08:00
The Magician
b7801660c9 add retries on create for container cluster (#2352)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-12-12 17:23:35 -08:00
The Magician
4a4a33da8a Output from magician generating into ga and beta providers (#2271)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-12-12 17:23:35 -08:00
Riley Karson
5512f8a961 Guard against nil empty typelists. 2018-10-11 09:48:19 -07: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
Alex Barron
70faf686b5 Add "enable_tpu" flag to google_container_cluster (#1974)
* add enable_tpu flag

* missed one

* add docs

* fix test

* tabs

* update tests to new format

* formatting

* formatting
2018-10-01 09:41:54 -07:00
Dana Hoffman
9960e2fa62
Simplify GKE cluster code (#2105)
We don't need quite so many `GetOk`s since the client library will ignore any fields that are set to the zero value for that type. I left a few that involved error-handling or things that had to be set before other things, but this at least should make the code a bit nicer to look at.

Tests are passing except the ones that were already failing in CI.
2018-09-25 11:42:37 -07:00
Nathan McKinley
9065b5a624 Addition of create_subnetwork and other fields relevant for Alias IPs (#1921)
* Addition of create_subnetwork and use_ip_aliases.

* add fields for [cluster|services]_ipv4_cidr_block and subnetwork_name
2018-09-05 09:52:06 -07:00
Dana Hoffman
d90e7fb4f6
fix panic on gke binauth (#1924) 2018-08-22 12:47:43 -07:00
David Asabina
bf7626a5c6 Fix panic on empty list for authorized masters' cidr_blocks (#1904)
* test empty authorized masters' cidr_blocks

When the `cidr_block` isn't simply blank but contains an empty list as in

```
master_authorized_networks_config {
  cidr_blocks = []
}
```

a panic occurs looking something like

```
goroutine 26 [running]:
github.com/terraform-providers/terraform-provider-google/google.expandMasterAuthorizedNetworksConfig(0x15a4f80, 0xc4202586e0, 0x21)
	/tmp/GOPATH/src/github.com/terraform-providers/terraform-provider-google/google/resource_container_cluster.go:1355 +0x4f2
github.com/terraform-providers/terraform-provider-google/google.resourceContainerClusterCreate(0xc420146a80, 0x16b1800, 0xc4200b8000, 0x0, 0x0)
	/tmp/GOPATH/src/github.com/terraform-providers/terraform-provider-google/google/resource_container_cluster.go:520 +0x2848
github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc420495490, 0xc420341310, 0xc4202582c0, 0x16b1800, 0xc4200b8000, 0x1, 0xc42024eae0, 0xc4201e3650)
	/tmp/GOPATH/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:227 +0x364
github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc4204c6700, 0xc4203412c0, 0xc420341310, 0xc4202582c0, 0x14ee1441a000, 0x0, 0x18)
	/tmp/GOPATH/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0xa4
github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc4202d7c40, 0xc42035de80, 0xc42025c160, 0x0, 0x0)
	/tmp/GOPATH/src/github.com/terraform-providers/terraform-provider-google/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:527 +0x57
reflect.Value.call(0xc4203feae0, 0xc42000e038, 0x13, 0x19e88a8, 0x4, 0xc42015ff20, 0x3, 0x3, 0xc420047ee8, 0xc4204c6798, ...)
	/usr/local/go/src/reflect/value.go:434 +0x905
reflect.Value.Call(0xc4203feae0, 0xc42000e038, 0x13, 0xc420047f20, 0x3, 0x3, 0xc400000001, 0x0, 0x0)
	/usr/local/go/src/reflect/value.go:302 +0xa4
net/rpc.(*service).call(0xc420418600, 0xc42007c140, 0xc42001e798, 0xc4200c4000, 0xc4202d6c40, 0x1557f80, 0xc42035de80, 0x16, 0x1557fc0, 0xc42025c160, ...)
	/usr/local/go/src/net/rpc/server.go:381 +0x142
created by net/rpc.(*Server).ServeCodec
	/usr/local/go/src/net/rpc/server.go:475 +0x36b
```

which we trigger by altering the first step to contain the HCL notation
for an empty list instead of simply an empty string.

In order to accomplish this, the tests had to be modified to accept an
emptyValue string as well which contains the content of the
`emptyValue` string when the cidrBlocks array is empty. This maintains
the old behavior of the original tests when `emptyValue` is an empty
string, while also facilating differing behavior for the new testcase by
setting `emptyValue` to whichever string we want to test instead. I
don't think this is very clean, but I guess it's pragmatic enough.

I'll hear if this is a thorn in the side to someone 😏.

* avoid panic on cidr_block type assertion

This is basically the fix. Since the value can be nil, we want to ensure
we handle a failure during the assertion since we know that asserting
`nil` conforms to `map[string]interface{}` will cause a run-time panic.

* flatten to config on empty list for cidr_blocks

since an empty list for cidrBlocks constitutes valid input, one should
return a map containing an empty list for the cidr_blocks field instead
of a nil value.

The nil value is only appropriate when the input Config is also nil.
2018-08-20 19:29:37 -07:00
Dana Hoffman
d1bf585724
Add support for binary authorization in GKE (#1884)
* revendor container/v1beta1

* add support for binauthz in gke

* update description
2018-08-16 17:51:03 -07:00
Nathan McKinley
f9f95e444d
Correctly update regional resource. (#1887) 2018-08-16 13:57:41 -07:00
Alexey Medvedchikov
3fc71ee432 Don't recreate google_container_cluster on master_auth change (#1873)
* Update google_container_cluster master_auth username and password without recreation of cluster, using setMasterAuth method

* Add tests to update and disable master_auth password and username values
2018-08-15 12:50:17 -07:00
Walker
c810e4b408 provider: Ensures schema.TypeMap elements are schema.Schema (#1835) 2018-08-14 16:53:39 -07:00