Commit Graph

2615 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
Dana Hoffman
35ab6d1671
Update CHANGELOG.md 2018-08-21 14:13:49 -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
Nathan McKinley
41e088dcef
Update compute_instance.html.markdown (#1912) 2018-08-21 13:47:52 -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
Chris Stephens
c088a129b8
Merge pull request #1868 from chrisst/cloud-armor-example
Adding a Cloud Armor example
2018-08-21 11:07:48 -07:00
Chris Stephens
3d75b751aa Updating from code review 2018-08-21 11:07:14 -07:00
Craig Furman
93d0caa9ad Document a default in google_storage_bucket (#1905)
The default of the log_object_prefix is the name of the bucket we are
enabling logging on, not the name of the bucket that receives the logs.
2018-08-20 22:00:36 -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
b05998781d
Update CHANGELOG.md 2018-08-20 16:47:04 -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
The Magician
fb66cd88c5 Fix documentation for resource manager lien. (#1901) 2018-08-17 16:33:38 -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
aidy
5bca1b3f03 Fix length of day in documentation (#1881) 2018-08-17 14:47:47 -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
503e029f4f
Update CHANGELOG.md 2018-08-16 17:51:39 -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
92afc9c938
Update CHANGELOG.md 2018-08-16 13:58:32 -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
Nathan McKinley
5a34315549
Update CHANGELOG.md 2018-08-15 23:00:58 -07:00
Riley Karson
8506527a80 Add support for boot_disk_type to google_dataproc_cluster (#1855) 2018-08-15 23:00:11 -07:00
The Magician
d768c67b30 Formatting fixes around dashes in documentation (#1849) 2018-08-15 22:59:44 -07:00
Nathan McKinley
e0dc8e0094
Update CHANGELOG.md 2018-08-15 22:50:13 -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
Dana Hoffman
a79fbac1c5
Update CHANGELOG.md 2018-08-15 15:46:33 -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
Nathan McKinley
b695bdc914
Update CHANGELOG.md 2018-08-15 12:50:55 -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
Scott Jungwirth
ee2e6c4440 Fix typo in google_project_service import docs (#1874) 2018-08-14 17:08:22 -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
Simon St John-Green
7558497940 Update google_storage_notification docs to not hardcode service account (#1832)
It's neater to use the google_storage_project_service_account data provider
instead.
2018-08-14 16:51:30 -07:00
Chris Stephens
93a8d9ce27 Adding a Cloud Armor example
This example shows how to build a network with a simple back end that
can be black/white listed by ip address.
2018-08-14 14:37:11 -07:00
Nathan McKinley
8df78d8725
Update CHANGELOG.md 2018-08-14 14:17:49 -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
Dana Hoffman
924e47fd4a
Update CHANGELOG.md 2018-08-14 11:48:51 -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
e39818a766
Update CHANGELOG.md 2018-08-14 11:26:14 -07:00
Nathan McKinley
69082eb4bb
Update CHANGELOG.md 2018-08-14 11:25:25 -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