Commit Graph

110 Commits

Author SHA1 Message Date
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
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
Dan Isla
bb6c757ad1 Container cluster delete timeout to 30 min. (#1745)
Matches Create operation timeout. Should reduce timeouts when deleting regional clusters.
2018-07-26 10:22:39 -07:00
Paddy Carver
c404cd740b Use map helper. 2018-07-13 14:14:00 -07:00
Paddy Carver
0435b1f387 Fix crash when updating container cluster resource labels.
We had a bad type coercion in the code to update container cluster
resource labels. This fixes the coercion.

We didn't notice this because there was no test exercising the update
code path. I've added the test, which reproduced the panic before this
PR was applied and passes successfully now that the coercion is fixed.
2018-07-13 02:27:40 -07:00
Renzo Toma
90eabdec15 Increase max number of master_authorized_networks to 20, per GKE docs.
See https://cloud.google.com/kubernetes-engine/docs/how-to/authorized-networks#setting_up_an_authorized_network
2018-07-05 22:10:17 +02:00
Paddy
cf72a65aa5
Merge pull request #1663 from garethjevans/resourcelabels
Added ability to configure resource labels on a GKE cluster
2018-07-02 11:50:25 -07:00
Emily Ye
6b0dbf5bbe check d.Set errors for complex values for container cluster 2018-06-22 10:35:46 -07:00
Emily Ye
f3b092b3ca make sure TypeList keys still have empty values 2018-06-20 16:45:49 -07:00
emily
a2b95e35e6
Add diff suppress for empty/default pod_security_policy_config (#1670)
* add diff suppress for pod_security_policy_config

* change key comparison to exact
2018-06-19 16:37:10 -07:00
Gareth Evans
fee1c7f682 Type conversion issue 2018-06-15 11:39:08 +01:00
Gareth Evans
e14aa8bf39 Added ability to configure resource labels on a GKE cluster 2018-06-15 11:10:25 +01:00
Dana Hoffman
ac6e30d335
allow beta kubernetes logging; add monitoring validation (#1589)
Fixes #1577
2018-06-04 15:09:52 -07:00
Dana Hoffman
974c3f7646
Add GKE Shared VPC support (#1528)
All this needed was to allow setting the network/subnetwork to a self link.

~WIP for now because I want to run the tests in CI.~ Tests are passing.
2018-05-23 16:47:17 -07:00
Nathan McKinley
e37c25abe5
Can't move from region to region without a recreate. (#1456) 2018-05-09 12:55:28 -07:00
Dana Hoffman
8907321d60
Roll forward beta scaffolding PR (#1453)
* Revert "Merge pull request #1434 from terraform-providers/paddy_revert_beta"

This reverts commit 118cd71201, reversing
changes made to d59fcbbc59.

* add ConvertSelfLinkToV1 calls to places where beta links are stored
2018-05-09 11:24:40 -07:00
Vincent Roseberry
9cb159f992
ValidateFunc accepts blank value for cluster_ipv4_cidr (#1446)
* ValidateFunc accepts blank value for cluster_ipv4_cidr in google_container_cluster

* Simplify tests
2018-05-07 15:34:56 -07:00
Paddy Carver
f91c62d598 Revert "remove switch statements between api versions for container"
This reverts commit 9c85e57b8c7e84de385995df7ca04dd93e843f5b.
2018-05-04 07:52:42 -07:00
Dana Hoffman
d59fcbbc59
Remove switch statements between api versions for container; clean up dead version code (#1427)
* remove switch statements between api versions for container

* remove dead api version code and move things around
2018-05-03 21:51:54 -07:00