Commit Graph

2332 Commits

Author SHA1 Message Date
Jonathan Pentecost
8f31fec857 New datasource: service account and service account key (#1535) 2018-05-31 17:31:45 -07:00
Paddy
c71ab3f62f Add link to sidebar for liens. (#1575) 2018-05-31 15:38:22 -07:00
Dana Hoffman
a8a6e59a4c
Update CHANGELOG.md 2018-05-31 14:51:06 -07:00
Seth Vargo
aff6bc6519 Retry while listing enabled services (#1573)
This fixes GH-1562 for realz
2018-05-31 14:50:38 -07:00
Bruno
5f0dcf4787 Update container_cluster.html.markdown (#1570)
* Update container_cluster.html.markdown

Just a more clear explanation of what happens when this field is not provided, since there was already an issue with this topic.

* Update container_cluster.html.markdown

Cleared extra comma.
2018-05-31 09:29:48 -07:00
Vincent Roseberry
5838e0c095
Update CHANGELOG.md 2018-05-31 09:28:40 -07:00
Seth Vargo
40094ba417 Lions, tigers, and services being enabled with "precondition failed", oh my! (#1565)
* Use errwrap to retain original error

* Use built-in Page function, only return names when listing services

This removes the custom logic on pagination and uses the built-in Page function in the SDK to make things a bit simpler. Additionally, I added a field filter to only return service names, which drastically reduces the size of the API call (important for slow connections, given how frequently this function is executed).

Also added errwrap to better trace where errors originate.

* Add helper function for diffing string slices

This just looked really nasty inline

* Batch 20 services at a time, handle precondition failed, better errwrap

This commit does three things:

1. It batches services to be enabled 20 at a time. The API fails if you try to enable more than 20 services, and this is documented in the SDK and API. I learned this the hard way. I think Terraform should "do the right thing" here and batch them in series' of twenty, which is what this does. Each batch is tried in serial, but I think making it parallelized is not worth the complexity tradeoffs.

2. Handle the precondition failed error that occurs randomly. This just started happened, but it affects at least two APIs consistently, and a rudimentary test showed that it failed 78% of the time (78/100 times in an hour). We should fix this upstream, but that failure rate also necessitates (in my opinion) some mitigation on the Terraform side until a fix is in place at the API level.

3. Use errwrap on errors for better tracing. It was really difficult to trace exactly which error was being throw. That's fixed.

* Updates from code review
2018-05-31 09:26:40 -07:00
Vincent Roseberry
74ecaea42e
Update CHANGELOG.md 2018-05-30 16:01:57 -07:00
The Magician
6240cf2ab4 Add support for SSL policy to google_compute_target_ssl_proxy (#1568) 2018-05-30 16:00:53 -07:00
Dana Hoffman
5c292c1fa9
Update CHANGELOG.md 2018-05-30 15:49:13 -07:00
Tenorio Orta JM
8a77e42698 Added support for restoring default organization policies (#1477)
* Added support for restoring default organization policies

* Added support for restoring default folder/project organization policies

* Refactored code

* Fixes #1239

* Clarify docs

* Clarify docs

* Clarify docs
2018-05-30 15:48:08 -07:00
Vincent Roseberry
f40eff9076
Update CHANGELOG.md 2018-05-30 15:33:16 -07:00
Tenorio Orta JM
c6b0cfcbfa Added user label support in sql_database_instance (#1372) (#1567)
* Added user label support in sql_database_instance (#1372)

* Fixes #1372
2018-05-30 15:32:11 -07:00
Vincent Roseberry
ad25778d54
Update CHANGELOG.md 2018-05-30 15:29:55 -07:00
Vincent Roseberry
ebbae91b77
Convert instance_group self_link to v1 (#1549) 2018-05-30 15:25:07 -07:00
David Dobmeier
22be133626 Add "server_ca_cert" Attribute reference (#1563)
* Add "server_ca_cert" Attribute reference

Documents the addition of the `server_ca_cert` attribute for use in configuring SSL with GCP SQL Instances - added in PR #1020

* Updated formatting

Updates formatting to match the above fields.
2018-05-30 14:21:28 -07:00
Dana Hoffman
a119deb154
Update CHANGELOG.md 2018-05-30 10:34:51 -07:00
Dana Hoffman
10019179a4
Update CHANGELOG.md 2018-05-29 17:21:00 -07:00
Ian L
b4be2fa124 Add basic update for google_kms_crypto_key resource (#1511)
* Add basic update for `google_kms_crypto_key` resource

Prior to this commit, any changes to `rotation_period` would
force a new resource as no `Update` was defined for the resource.
This commit introduces a basic `Update` through calling the
`Patch` service method. It only modifies the `rotation_period`,
and `next_rotation_time` at the moment, but this is reflective
of what is "allowed" on https://console.cloud.google.com/security/kms.

* Remove unused `Purpose` value in `CryptoKey`

We are only patching the `rotation_period`, and `next_rotation_time`,
so that value will not be affected.

* nit: format `Patch` operation to be in a single line

* Extend `TestAccKmsCryptoKey_rotation` test steps

- Test change in rotation period
- Test removal of rotation period

* Do not parse `NextRotationTime` if it is not set

* remove ForceNew: false
2018-05-29 17:20:32 -07:00
Vincent Roseberry
62f5ee359b
Update CHANGELOG.md 2018-05-29 14:46:26 -07:00
Vincent Roseberry
e4c9b2d4b1
Add a DiffSupress for ipv6 shortening (#1551) 2018-05-29 14:43:39 -07:00
Vincent Roseberry
a598390697
Update CHANGELOG.md 2018-05-29 14:28:13 -07:00
Vincent Roseberry
8bb494520f
project field for google_project_services can use the default provider project (#1553) 2018-05-29 14:26:58 -07:00
Vincent Roseberry
61dcc56282
Update CHANGELOG.md 2018-05-29 14:25:10 -07:00
Vincent Roseberry
8c2f47ba69
Remove label from bucket (#1550)
* Remove label from bucket

* Remove debugging statement

* Fix typos
2018-05-29 14:23:37 -07:00
Dana Hoffman
66afc153ab
Update CHANGELOG.md 2018-05-29 13:30:37 -07:00
Dana Hoffman
dc46348d67
Add support for custom request headers in backend services (#1537)
* revendor compute beta apis

* changes to subnetwork iam from api revendoring

* add support for custom request headers in backend services
2018-05-29 13:29:40 -07:00
Dana Hoffman
926420ab90
Update CHANGELOG.md 2018-05-29 13:28:38 -07:00
Dana Hoffman
1af48cddf5
add disabled property to firewall (#1536)
* add disabled property to firewall

* add test and change update to patch
2018-05-29 13:27:29 -07:00
Vincent Roseberry
33899fc64c
Update CHANGELOG.md 2018-05-29 11:40:03 -07:00
Jamie Lennox
cd83bab7dc Use the project defined in the trigger_template when creating trigger (#1556)
When creating a trigger by using the project defined in the schema we
enforce that the repo must be in that same project. We should be looking
at the project defined in the trigger_template data and falling back to
that first project if not found.

Closes: #1555
2018-05-29 11:38:12 -07:00
Vincent Roseberry
cdcda8384a
Update CHANGELOG.md 2018-05-29 11:02:42 -07:00
Vincent Roseberry
f0857a09d5
Accept subnetwork name only in forwarding rule (#1552)
* Accept subnetwork name only in forwarding rule

* Fix acceptance test
2018-05-29 11:00:04 -07:00
Vincent Roseberry
1d0f88f903
Clarify documentation around JSON credentials file (#1554) 2018-05-29 10:57:09 -07:00
etiennedub
656014540d Update compute_instance.html.markdown : add note about live migration and GPUs (#1540) 2018-05-28 09:55:10 -07:00
nownabe
a030dbe205 Fix link to app engine locations page (#1545) 2018-05-28 09:26:49 -07:00
Nathan McKinley
9681e76ed3
Update container_cluster.html.markdown
#1534 followup - those attributes are documented in the `master_auth` block, which previously didn't mention the computed attributes present.
2018-05-24 17:50:41 -07:00
mclavel
c2a8aeb868 Update container_cluster.html.markdown (#1534)
adding documentation about attributes `username` and `password` for `master_auth`.
2018-05-24 17:17:44 -07:00
tf-release-bot
a16f106a53 Cleanup after v1.13.0 release 2018-05-24 17:08:04 +00:00
tf-release-bot
8a35c173c5
v1.13.0 2018-05-24 17:03:11 +00:00
Dana Hoffman
2497272795
Update CHANGELOG.md 2018-05-23 16:47:41 -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
Paddy
53450244c3
Merge pull request #1523 from terraform-providers/paddy_project_read_fix
Ignore API not enabled errors when reading project
2018-05-23 14:53:48 -07:00
Paddy
23acaf2dd3
Merge pull request #1524 from terraform-providers/paddy_eventual_services
Guard against eventually consistent services
2018-05-23 14:53:14 -07:00
Dana Hoffman
b8ac22d936
Add redis docs to sidebar (#1527) 2018-05-23 13:06:43 -07:00
Dana Hoffman
1d39ee946a
Update CHANGELOG.md 2018-05-23 11:26:50 -07:00
The Magician
488b9e86f3 Redis resource (#1485)
<!-- This change is generated by MagicModules. -->
/cc @danawillow
2018-05-23 11:25:48 -07:00
Paddy Carver
4ec59fccea Guard against eventually consistent services
When enabling services, after the waiter returns, list the enabled
services and ensure the ones we enabled are in there. If not, retry. May
not always resolve #1393, but should help. Unfortunately, the real
answer is probably either:

1. For us to try and get the API updated to only return the waiter when
the service will consistently be available. I don't know how feasible
this is, but I'm willing to open a ticket.
2. For us to build retries into ~all our resources to retry for a set
amount of time when a service not enabled error is returned. This would
greatly slow down the provider in the case of the service legitimately
not being enabled, but is how other providers handle this class of
problem.

Unfortunately, due to the eventual consistency at play, this is a hard
issue to reproduce and prove, though it matches with my
experience--while testing this patch, one of the tests failed with the
error that the serviceusage API hadn't been enabled, but only on step 4
of the test, when calls had already succeeded. Which suggests eventual
consistency, to me. Regardless, this patch shouldn't _hurt_ and should
mostly be an imperceptible change to users, and should make instances
like #1393 less likely.
2018-05-23 04:01:05 -07:00
Dana Hoffman
cac3502bac
Update CHANGELOG.md 2018-05-22 17:56:25 -07:00
Dana Hoffman
20616e424d
Use new serviceusage API for google_project_service[s] (#1522)
* vendor service usage api

* use serviceusage api instead of servicemanagement for project services

* add bigquery-json to test

* add import for project service

* add serviceusage_operation.go
2018-05-22 17:45:22 -07:00