Commit Graph

574 Commits

Author SHA1 Message Date
Paddy Carver
aefef54ab0 Fix our calls to d.Set that returned errors.
We had several calls to `d.Set` that returned errors we weren't
catching, that turning on the panic flag for the tests caught. This PR
addresses them, and fixes the one test that was not safe to run in
parallel because it relied on a hardcoded name being unique.

This is largely just removing calls to `d.Set` for fields that don't
exist in the Schema, fixing how Sets get set, correcting typos, and
converting types.
2018-03-19 09:47:33 -07:00
Nathan McKinley
70ec9e5341
Properly delete dataflow jobs in the event of terraform destroy. (#1194) 2018-03-16 15:32:40 -07:00
Nick Jacques
8ada4ffdb2 Add deletion_protection wrapper for deleting instance (#1211) 2018-03-16 14:09:21 -07:00
Nathan McKinley
dd79754059
cdn_policy should also be computed. (#1210) 2018-03-16 13:56:27 -07:00
Alessandro Siragusa
7d3d13c7b1 Adding instance_group_urls in resource_container_node_pool (#1207) 2018-03-16 12:54:01 -07:00
Nick Jacques
46a3d2fd47 Add deletion protection to resource_compute_instance (#1205) 2018-03-16 11:57:42 -07:00
Paddy
ea0b05d287 Add debian-cloud to the list of acceptable projects for images. (#1209)
We have a set of constraints we apply to our organization as part of a
test for the organization policy functionality. This can get stuck from
quota issues, or it can run in parallel to other tests. The policy
currently limits the projects that images can be used from to the
project running the test, but a lot of our tests use images from the
debian-cloud project. This just updates the policy to allow debian-cloud
images to be used, too, so even if the policy doesn't properly get
cleaned up or if it runs in parallel with other tests, our tests are
still within the policy.

The real fix for this is to set up a separate org for testing, so we're
not modifying the test environment under running tests, but that'll take
a bit more time, so this is the patchfix until that can happen.
2018-03-16 10:52:52 -07:00
Dana Hoffman
eb8b19eeef
Add cdn_policy field to backend service (#1208)
* Add CDN policy support

* docs and reorderings for cdn policy

* test fmt
2018-03-16 10:50:32 -07:00
Dana Hoffman
462c4cebc8
importify gke tests (#1204)
* importify gke tests

* fix typo

* add in missed tests after merge

* remove import-specific tests

* fixes based on tests that failed
2018-03-15 17:08:39 -07:00
Nathan McKinley
e717edb7a6
Add network policy config. (#1200) 2018-03-15 14:50:24 -07:00
Paddy Carver
dd70d264bf Merge branch 'master' into paddy_managed_zone_tests 2018-03-15 13:37:58 -07:00
Paddy
0ecc366f95
Merge pull request #1202 from terraform-providers/paddy_remove_comment
Remove commented out code.
2018-03-15 13:37:14 -07:00
Paddy Carver
c223521d31 Remove commented out code.
We don't really need dead code, and this is breaking our `make fmt` test
because it gets indented differently in go 1.10 from in go 1.9.
2018-03-15 13:30:01 -07:00
Dana Hoffman
fe8ceed1d5
Add support for GKE metadata concealment (#1199)
* add support for gke metadata concealment

* docs for metadata concealment
2018-03-15 13:28:30 -07:00
Paddy Carver
4698711ab1 Fix managed zone tests.
Managed zone tests are failing because we're attempting to use the naked
domain as the managed zone, when it's already being managed by GCP. By
making a subdomain the managed zone, we avoid this problem.
2018-03-15 13:22:29 -07:00
Nathan McKinley
2ea356204f
Reduce flakiness by ensuring three successful fetches of IAM resources before returning. (#1197) 2018-03-15 11:15:42 -07:00
ishashchuk
14f1431896 Rolling update support for instance group manager (#1137) 2018-03-15 11:10:09 -07:00
Nathan McKinley
5bbc02c378
Add the organization iam policy, with suitable warnings. (#1196) 2018-03-14 15:21:33 -07:00
Dana Hoffman
65147fd23e
Add support for pod security policy (#1192)
* move setid calls back

* add support for pod security policy

* pod security policy docs

* Revert "move setid calls back"

This reverts commit 0c7b2dbf92aff33dac8c5beb95568c2bc86dd7de.

* cleanup

* remove comments about disabling update
2018-03-14 14:00:31 -07:00
Nathan McKinley
aaac3a1df9
Force validation of region for cloudfunctions. (#1188) 2018-03-13 12:11:41 -07:00
Dana Hoffman
99860f39e4
Dataproc autogen bucket changes (#1171)
* add extra wait for storage bucket object deletion

* make timeout for object deletion 5 minutes, make it succeed 3 times

* delete the cluster before deleting the bucket

* deprecate delete_autogen_bucket

* improve deprecation message
2018-03-13 11:46:27 -07:00
Dana Hoffman
fd0819786b
revive initial_node_count (#1176) 2018-03-13 11:45:01 -07:00
Benjamin Pineau
f65127585a Datasource for Backend Services (#1150)
Exposes existing `google_compute_backend_service` as data sources.
This addresses #149 .

This allows, for instance, to collect a backend service's self_link and
use it from an other workspace/tfstate, sharing most of the
loadbalancers definition.
2018-03-12 15:09:30 -07:00
ssaqua
9155a556ef Update to Cloud Functions Pub/Sub trigger event (#1180) 2018-03-12 14:55:55 -07:00
Dana Hoffman
9ae7a8ddb0
test fixes (#1185) 2018-03-12 13:18:39 -07:00
ishashchuk
2efa710696 Datasource for GCE service account (#1119)
* Data source for retrieving GCE service account
* Added project id for service account lookups (#15)
* Renaming attribute project_id -> project
2018-03-12 09:41:15 -07:00
Dana Hoffman
c33b33e1cc
expect 4 labels in dataproc cluster test (#1182) 2018-03-12 09:06:05 -07:00
Dana Hoffman
edf8918db6
Add generated resources for http(s)_health_check, updates to backend_bucket, and import helpers (#1177)
* add import helpers for generated code

* Updates to backend bucket and transport.go from MM

* add generated http(s)_health_check resources

* name is required; transport import style

* update docs with new fields/timeouts

* fixes
2018-03-09 17:14:32 -08:00
Toby Lawrence
08e81f528c Support distributionPolicy when creating regional instance group managers. (#1092)
* Support `distributionPolicy` when creating regional instance group managers.

* Better match the API structure of distributionPolicy.

* Switch to "distribution_policy_zones".

This approach lets us more simply allow a list of zones to use, while
providing a deprecation path for implementing the distribution policy
field more holistically, avoiding backwards-incompatible changes.

* fix typo

* use slice instead of Set for flattenDP
2018-03-09 11:04:09 -08:00
Dana Hoffman
1d1cfa64c4
increase timeout for dataproc test jobs completing (#1172) 2018-03-08 19:24:57 -08:00
Dana Hoffman
ab385ff574
don't set omitted fields when converting between a map and a struct (#1165) 2018-03-08 10:51:25 -08:00
Dana Hoffman
fc58b8e54c
Fix typo in pubsub iam test (#1169) 2018-03-08 09:16:50 -08:00
Dana Hoffman
46fb949c1f
Set ID for GKE resources before waiting (#1158) 2018-03-07 11:06:00 -08:00
Dana Hoffman
6d8a8b1747
Add more beta scaffolding for GKE resources (#1139)
* vendor container/v1beta1

* revendor container/v1beta1

* add beta scaffolding for gke resources

* fix json unmarshal error

* fix issues with trying to convert interface instead of struct

* same fixes but for node pool

* move setid calls back
2018-03-06 17:44:05 -08:00
Vincent Roseberry
91c9e0851c
Add IAM resources for pubsub subscriptions (#1156)
* Add IAM resources for pubsub subscription

* Add documentation

* Refactored topic and subscription computed methods

* Add project field to documentation

* Addressed Dana's comments
2018-03-06 09:52:39 -08:00
Paddy
9f47852189
Merge pull request #1141 from terraform-providers/paddy_863
Fix perpetual diff in #863.
2018-03-05 16:40:26 -08:00
Vincent Roseberry
35c2cb2abf
Add project field to iam pubsub topic resources (#1154)
* Add project field to iam pubsub topic resources

* Update documentation
2018-03-05 15:31:24 -08:00
Julien Phalip
3e4b66884b Let the compute zones data source accept a project parameter (#1122) 2018-03-05 13:32:14 -08:00
Florian Pfeiffer
6a2fca86a0 Loosen regex on projectId for importSpannerInstanceId and importSpannerDatabaseId (#1151) 2018-03-05 13:24:55 -08:00
Nathan McKinley
e8ffe89817
Extra error handling for node pools that don't match instance manager pattern. (#1149) 2018-03-02 17:14:48 -08:00
Florian Pfeiffer
5ea98d27f9 Loosen regex in computeDiskUserRegexString - accept ":" or "." (#1145) 2018-03-02 12:10:40 -08:00
Dana Hoffman
1d64cc5d26
allow importing a pubsub topic using its full id (#1142) 2018-03-02 11:22:58 -08:00
Dana Hoffman
263240dd9f
fix typos in pyspark dataproc job resource (#1120) 2018-03-01 18:02:33 -08:00
Genevieve
7e358d894a SQL DB Instance has attribute first_ip_address (#1050)
* Expose first ip address on sql db instance.

Signed-off-by: Desmond Pompa Alarcon Rawls <captaingrover@gmail.com>

* Use the ip_address key on the first map in ip_address list.

Signed-off-by: Genevieve LEsperance <glesperance@pivotal.io>

* Run first_ip_address test check if there is an ip address.

Signed-off-by: Desmond Pompa Alarcon Rawls <captaingrover@gmail.com>

* Add first_ip_address to sql db instance scheme.

Signed-off-by: Genevieve LEsperance <glesperance@pivotal.io>
2018-03-01 17:12:33 -08:00
Nathan McKinley
58a7ef9d03
Fix incorrect result on Read ignoring most authorized networks. (#1097) 2018-03-01 13:19:18 -08:00
Paddy Carver
61c1eb2719 Make RRdatas case insensitive.
The GCP backend apparently lowercases the values, no matter what you
enter, so we consider uppercase and lowercase values to be equivalent.
This fixes #862.
2018-03-01 13:01:30 -08:00
Paddy Carver
391516d741 Fix perpetual diff in #863.
This treats record set RRdata values as equivalent if they're quoted and
unquoted, as the GCP backend likes to return TXT records quoted.
2018-03-01 12:50:47 -08:00
ishashchuk
67ecf5345e Data source for retrieving project information (#1111)
* Project data source

* Mirroring project datasource from project resource (#14)
2018-02-28 12:37:24 -08:00
Dana Hoffman
313eb0fb89
Check set equality for service account scope changes (#1130)
* add debug printfs

* more logs for debugging

* check set equality for service acct scope changes

* revert changes to region igm

* style things
2018-02-27 14:29:00 -08:00
Dana Hoffman
919e7ee52f
Don't store disk id in state if it didn't create (#1129) 2018-02-26 11:13:20 -08:00