Commit Graph

907 Commits

Author SHA1 Message Date
Riley Karson
fbad37ebff
Fix storage notification tests (#1913)
* Update google_storage_project_service_account to mirror API.

* Fix storage notifications test, clarify docs.
2018-08-22 08:19:52 -07:00
The Magician
875f1f874e Generate resource_compute_firewall in magic-modules. I also decided to use PATCH instead of PUT for updates, because a lot of the fields we had marked as ForceNew can be updated with PATCH. (#1907)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-08-21 14:12:46 -07:00
Paddy
1bcddf995a
Merge pull request #1879 from terraform-providers/paddy_image_fix
Switch from debian-8 to debian-9
2018-08-21 13:40:31 -07:00
Paddy Carver
be76ffaa78 Fix whitespace, really.
Tabs v spaces strikes again.
2018-08-21 13:36:04 -07:00
Riley Karson
3f0088515a Add a detailed error message to google_project Create when lacking permissions. (#1910) 2018-08-21 12:42:03 -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
The Magician
3ff7ccca7c Add Policy, Attestor, and Note resources for Binary Authorization (#1885)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-08-20 16:46:13 -07:00
Nathan McKinley
ea4a6438d8
Handle service account key 403 on nonexistent resource requested (#1900)
* 403 on delete / read should count as deleted for this product.
2018-08-17 16:00:13 -07:00
Nathan McKinley
d77c0adbb2
Add support for bucket encryption (#1876)
* Support encryption in Storage bucket.
* Add self links to crypto keys and key ring ids
* Update ID documentation to talk about self link instead.
2018-08-17 14:33:27 -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
The Magician
085a05cefc Fix region disk type (#1890)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-08-16 12:29:39 -07:00
The Magician
81420a2e57 move getProject/op call and allow sending objects in delete (#1888) 2018-08-16 12:16:14 -07:00
Riley Karson
8506527a80 Add support for boot_disk_type to google_dataproc_cluster (#1855) 2018-08-15 23:00:11 -07:00
Nathan McKinley
0909aa5b20
If a router interface or peer is the last one, ensure it's removed. (#1877) 2018-08-15 22:49:36 -07:00
Christoph Blecker
60dc8bccad Add google_project_services data source (#1822) 2018-08-15 15:45:54 -07:00
The Magician
3db96c9073 Make flatteners of sets return sets (#1880)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-08-15 13:46:55 -07:00
Paddy Carver
bfcb07bdfb Fix migration tests. 2018-08-15 13:30:24 -07:00
Paddy Carver
b2405d8da0 Fix bad paste. 2018-08-15 13:26:02 -07:00
Paddy Carver
f9c6993990 Fix whitespace. 2018-08-15 13:23:31 -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
Paddy Carver
614b98b3fc Fix indenting. 2018-08-15 12:29:11 -07:00
Harry Pidcock
8fbbee00b9 Fix cloud function sourceArchiveUrl incorrect interpretation. (#1844) 2018-08-14 17:09:32 -07:00
Megumi Tomita
004c010b33 Add supported locations of cloudfunction (#1863)
Cloudfunction facility is now supported in 4 locations.
This pull-request updates the list to catch up with it.
2018-08-14 17:07:43 -07:00
Walker
c810e4b408 provider: Ensures schema.TypeMap elements are schema.Schema (#1835) 2018-08-14 16:53:39 -07:00
Nathan McKinley
841926e07b
Fix project iam policy import to work even without provider project. (#1875) 2018-08-14 14:17:01 -07:00
Michael Haro
2c4afd3aec Allow other forms of project names to be matched. (#1865) 2018-08-14 11:48:08 -07:00
Nathan McKinley
4408183c9f
Suppress diff for ubuntu-minimal-lts as well as ubuntu-lts. (#1870) 2018-08-14 11:24:37 -07:00
Paddy Carver
dd56795f2a Use family, not name, in image data source. 2018-08-14 11:18:39 -07:00
Paddy Carver
5c9ce55172 Continue our deprecation of debian-8. 2018-08-13 16:20:33 -07:00
Landon Spear
f604f3eac2 Add us-west2 to app engine locations (#1867) 2018-08-13 14:23:10 -07:00
Chris Stephens
a0e0afc537
Merge pull request #1848 from chrisst/link-helper-comments
Clarifying helper method usage
2018-08-13 11:22:17 -07:00
Paddy Carver
a13bcfbda1 Start updating to use the latest debian release. 2018-08-13 10:31:18 -07:00
The Magician
41d92fda3e Remove request helper methods. (#1856)
Since we added custom verbs for a lot of resources, we should just use sendRequest directly.
2018-08-08 15:29:10 -07:00
Nathan McKinley
d01c0cd60e
Fixes related to autogenerating the VPN Tunnel resource (#1850) 2018-08-07 17:55:45 -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
Chris Stephens
d94100dee4 Clarifying helper method usage
Changing comments and method signature
2018-08-07 11:32:35 -07:00
Dana Hoffman
c5388d27c4
add hash function for self link name (#1836) 2018-08-03 16:23:21 -07:00
The Magician
a6e1ecad7a Make redis alternativeLocationId computed (#1754) 2018-07-26 17:35:18 -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
Nathan McKinley
aaf18dacca
CloudBuild Trigger substitutions (#1810) 2018-07-25 13:38:35 -07:00
The Magician
0fdc262183 Add LabelFingerprint and Label to Address and GlobalAddress. (#1811) 2018-07-25 13:25:16 -07:00
oceyral
7da529f3c1 Implement multiple versions for regional instance groups (#1809) 2018-07-25 13:21:20 -07:00
Dana Hoffman
b8cf81e527
use customizediff to allow all role-entity pairs to be unordered (#1787) 2018-07-24 15:36:30 -07:00
Dana Hoffman
b4bb79f58e
lock on master name when creating replicas (#1798) 2018-07-24 15:32:18 -07:00
Dana Hoffman
080f6fe2e1
don't call full read when updating billing acct (#1795) 2018-07-19 13:32:29 -07:00
The Magician
cacdaec642 handle nil resourceref links in generated code (#1794)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-07-19 12:26:40 -07:00
Dana Hoffman
7c47e13aa6
Changes to things that got merged too early (#1790) 2018-07-18 15:47:23 -07:00
Luke Hoban
cf4e731236 Add support for updating function code in place (#1781)
Remove ForceNew from the source inputs on function resources, and add support for updating the function in place from a new source bucket+object.
2018-07-18 14:48:00 -07:00
The Magician
c0610c5544 Add google_compute_region_disk resource. (#1755)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-07-18 14:24:21 -07:00