Commit Graph

795 Commits

Author SHA1 Message Date
Nick Jacques
0d309b1e56 Update ssl_policy to use v1 API (#1368)
* Update compute/v1 to latest

* Update ssl_policy resource and test to v1 API
2018-04-24 14:43:00 -07:00
The Magician
e02587855a Release autogenerated google_compute_target_ssl_proxy resource (#1373) 2018-04-24 14:01:53 -07:00
The Magician
0544ef468f ResourceRef fields accept name-only or partial/full self_link (#1366) 2018-04-23 16:19:26 -07:00
Nathan McKinley
de9363502b
Fix for networkPolicyEnabled test - must explicitly add default network policy. (#1363) 2018-04-20 11:39:20 -07:00
Nathan McKinley
d3bbfbd22b
Add DNS PTR record to Compute Instance (#1349) 2018-04-20 11:14:38 -07:00
Paddy Carver
33750deb23 Bump GKE version.
Tests were failing with an invalid version error, so bumping the version
like this should fix the tests.
2018-04-19 14:47:55 -07:00
Dana Hoffman
51f9424dbf Fix IAM tests (#1337) 2018-04-19 14:30:20 -07:00
Nathan McKinley
039e82cf6d
Regional cluster update support for additional zones (#1359) 2018-04-19 14:17:38 -07:00
jschwing
0ae2047783 Add max_connections and max_connections_per_instance to backend service (#1353) 2018-04-19 14:00:34 -07:00
Vincent Roseberry
331ecb25a7
Move method prior to autogenerating ssl proxy resource (#1358) 2018-04-19 11:01:33 -07:00
Nathan McKinley
8ca616e707
Add default cluster version to data source. (#1355) 2018-04-19 10:59:52 -07:00
Nathan McKinley
92d98fc8e1
Make sure that additional zones are added-then-removed instead of all at once. (#1354) 2018-04-18 17:29:07 -07:00
David Watson
b70db7b40a Ensure that a terraform plan works if the resource does not exist (but is currently in the tfstate). (#1340) 2018-04-17 16:23:16 -07:00
Nathan McKinley
3628e263e2
Switch from protoc_output to protoc_output_base64. (#1290) 2018-04-17 13:00:37 -07:00
Paddy
4975fe47db
Merge pull request #1343 from terraform-providers/paddy_clarify_iam_policy
Clarify IAM policy deprecation.
2018-04-16 19:48:19 -07:00
Nathan McKinley
470d44c2ff
Wait for the billing account to be set up correctly. (#1345) 2018-04-16 14:25:01 -07:00
Nathan McKinley
7d92392a3e
MergeBindings ignores empty bindings. (#1344) 2018-04-16 13:13:09 -07:00
Paddy Carver
6e9aa0d30e Clarify IAM policy deprecation.
Make it a bit clearer what the IAM policy deprecation means.
2018-04-16 10:55:40 -07:00
Vincent Roseberry
49191c5d91
Fix auto-delete default network in google_project. (#1336)
* Use projectId and enable required compute API

* Delete firewall rules before deleting default network
2018-04-16 10:25:49 -07:00
Seth Vargo
0cdcd66f67 Use standard user-agent header (#1332)
This PR does a few things to the User-Agent header:

1. It puts Terraform/(version) first, since that's the way the RFC
expects it

2. It removes the goos and goarch data, although I could be convinced to
put it back in, I don't see what value it's providing

3. Moves directly to consuming the version package (which is the comment
above the function previously being called)
2018-04-13 09:19:16 -07:00
Vincent Roseberry
4695f6fe81
Notice changes (#1329) 2018-04-12 16:08:42 -07:00
Dana Hoffman
bde72e7576
un-deprecate name_prefix for instance templates (#1328) 2018-04-12 16:08:31 -07:00
Dana Hoffman
d786c3b9c4
make all ImportStates have a matching ImportStateVerify (#1327) 2018-04-12 15:45:28 -07:00
Dana Hoffman
9dccfeb472
iam import ids same as create (#1322) 2018-04-11 15:45:10 -07:00
Nathan McKinley
98dbf7a758
Delete the default network created by the project. (#1316) 2018-04-10 15:23:04 -07:00
conzetti
7a84ea845d Add timeouts for SQL database resource (#1318)
This simply adds the specification for operation timeouts, and sets
sane defaults. In testing against specific regions, creation of SQL
databases would fluctuate between 7-14 minutes against us-east1. As
such, a 15m creation threshold is recommended for this. Update and
Delete operations will adhere to 10m timeouts.

This follows a similar format as #1309.
2018-04-10 15:17:42 -07:00
Nathan McKinley
79600b0eac
Update resource_compute_snapshot.go to add timeouts. (#1309) 2018-04-10 10:42:07 -07:00
Ben Galvin
1c992ab241 Use correct project id regex in instanceGroupManagerURL (#1311) 2018-04-10 09:52:54 -07:00
Thom Knowles
024e0b75bc Escape the display name in active folder data source (in case of spaces, etc) (#1261)
* escape the folder name (in case of spaces, etc)

* add test case for folder with space

* add missing args

* make separate tests for each folder test, get folder name length under API limits

* further abstract out the resource name to prevent test collisions

* workaround multiple results returning for a given query by looping over return

* split test cases into separate funcs
2018-04-09 10:32:14 -07:00
Dana Hoffman
8ad6f15478
fix error introduced when attached disks are deleted out of band (#1301)
* fix error introduced when attached disks are deleted out of band

* add comment about nil check
2018-04-06 17:40:49 -07:00
Dana Hoffman
cd0a462735
add subnetwork iam resources (#1305) 2018-04-06 17:38:48 -07:00
lnesci
b02686b9eb google folder data source (#1280)
* adding google folder data source with get by id, search by fields and lookup organization functionality

* removing search functionality

* creating folders for each test and updating documentation with default values
2018-04-05 16:59:47 -07:00
ashish-amarnath
f488a6e6bf Add support for regional GKE clusters in google_container_cluster (#1181)
* Add support for regional GKE clusters in google_container_cluster:

* implement operation wait for v1beta1 api
* implement container clusters get for regional clusters
* implement container clusters delete for regional cluster
* implement container clusters update for regional cluster
* simplify logic by using generic 'location' instead of 'zone' and 'region'
* implement a method to generate the update function and refactor
* rebase and fix

* reorder container_operation fns

* cleanup

* add import support and docs

* additional locations cleanup
2018-04-05 14:51:35 -07:00
Vincent Roseberry
fc43130d6f
Fix failing project_services import test and merge it (#1297)
* Fix failing project_services import test and merge it

* Use the original list of services
2018-04-05 13:32:26 -07:00
Vincent Roseberry
1bf076f6a9
Add disable_on_destroy flag to project_services (#1293) 2018-04-04 16:20:13 -07:00
Michael Parker
b8adcc28fe Updates container_cluster to set enable_legacy_abac to false by default (#1281)
* Updates the default GKE legacy ABAC setting to false

* Updates docs for container_cluster

* Update test comments

* Format fix

* Adds ImportState test step to default legacy ABAC test
2018-04-04 10:58:08 -07:00
Dana Hoffman
7bee5507f6
add timeouts support for sql database instance (#1288)
* add timeouts support for sql database instance

* rm a tag
2018-04-03 14:44:18 -07:00
emily
360260d8d0
Add project to container cluster import name. (#1282)
* allow import of container cluster by project as well

* update docs for importing container cluster with project

* combine tests
2018-04-03 13:39:28 -07:00
Matthew Jones
b80aad4bc6 fix: include object versions when deleting all objects in GCS bucket (#1285)
* fix: include object versions when deleting all objects in GCS bucket

* test: acceptance test for force destroy with versioning
2018-04-03 13:21:29 -07:00
Dominik Lekse
3460ddcaa7 Retrieve current OAuth access token from google_client_config data source (#1277)
* Added access_token field to google_client_config data source

* Refined documentation of google_client_config
2018-04-03 12:54:48 -07:00
Nathan McKinley
b3a1f43dbc
Set isn't a valid key for a TypeMap (#1259)
This line wasn't doing anything so we might as well get rid of it.  :)
2018-04-02 13:11:09 -07:00
Dana Hoffman
7596164ad1
Deprecate name_prefix (#1035)
* deprecate name_prefix

* make name_prefix computed and add migration instructions
2018-04-02 10:28:59 -07:00
Dana Hoffman
78e8c7b378
fix bug in np version code (#1276) 2018-03-30 10:59:33 -07:00
Adrián Matellanes
1f6ffa0f4b Add time partitioning field to google_bigquery_table resource (#1240)
* Add time partitioning field to google_bigquery_table resource

* Fix flatten time partitioning field to google_bigquery_table resource

* Add resource bigquery table time partitioning field test

* Move resource bigquery table time partitioning field test to basic

* Add step to check that all the fields match

* Mark resource bigquery table time partitioning field as ForceNew

* Add time partitioning field test to testAccBigQueryTable config
2018-03-30 10:15:06 -07:00
Janos Lenart
1840363c74 Adding private_cluster (#1250)
* Updated google.golang.org/api/container/v1beta1

* Added support for private_cluster and master_ipv4_cidr

This is to implement #1174. See
https://groups.google.com/forum/#!topic/google-cloud-sdk-announce/GGW3SQSANIc

* Added simple test for private_cluster and master_ipv4_cidr

* Review replies

* Added some documentation for private_cluster
2018-03-30 10:10:25 -07:00
Paddy
ea3d1034d6
Merge pull request #1260 from wayfair/ishashchuk_rigm_rolling
rIGM rolling update support
2018-03-29 14:30:17 -07:00
Paddy
69dc1c290c
Merge pull request #1272 from terraform-providers/paddy_org_tests_fix
Fix organization policy tests.
2018-03-29 13:43:03 -07:00
Paddy Carver
dfa40af993 Comment on shadowing variable. 2018-03-29 13:27:54 -07:00
Dana Hoffman
33d87a2bc1
add support for node pool versions (#1266) 2018-03-29 13:27:11 -07:00
Paddy Carver
0c3cbfc2e6 Fix organization policy tests.
This updates the organization policy tests to be run sequentially,
instead of in parallel, as they share a resource that they're modifying.
It also updates them to use a separate organization than the one all our
other tests are running in, which prevents other tests from failing
because they're run in parallel to the organization policy changing
under them.
2018-03-29 13:15:08 -07:00
Seth Vargo
4b353bb7a0 Read GOOGLE_CLOUD_PROJECT environment variable also (#1271) 2018-03-29 11:43:45 -07:00
emily
7fd537db69
Fix IAM policy deletion/read for deleted resources (#1262)
* add util for handling wrapped/raw google api errors

* add 404 error handling to shared iam files

* fix errwrap calls in iam files

* fix import

* remove newlines, clear ID for removed state in iam binding
2018-03-27 16:41:44 -07:00
emily
e53b24ba13
Merge pull request #1264 from danawillow/is-680
Add gke node taints
2018-03-27 16:25:31 -07:00
Nick Jacques
c1d47a32ee Add DiffSuppress for Target HTTP(S) Proxies (#1263)
* Add DiffSuppress for http(s) proxies

* Use compareSelfLinkRelativePaths instead
2018-03-27 15:38:32 -07:00
Dana Hoffman
42cca119eb add gke taints 2018-03-27 14:55:42 -07:00
Nick Jacques
72efdb1d92 New resource/datasource: SSL Policy (#1247)
* Add SSL Policy to provider

* Add resource for SSL Policy

* Add SSL Policy data source

* Add tests for SSL Policy resource

* Add documentation for SSL Policy resource

* Add SSL Policy datasource docs

* Add test for SSL Policy datasource

* Update SSL Policy datasource docs

* Make full update for SSL Policy resource

* SSL Policy resource test multi-attrib update

* Clean up SSL Policy datasource

* Set-ify custom_features in SSL Policy resource

* Document description ForceNew rationale

* Remove refs to TLS_1_3

* Update docs: plural -> singular

* Remove extraneous attrs from datasource

* Fix update logic for custom_features and add enabled_features

* Update docs to include enabled_features

* Add test for updating to/from custom_features

* Add TLS 1.3 bug link

* Add import between multi-step test configs

* Move Profile and minTlsVersion back into sslPolicy struct
2018-03-26 16:53:35 -07:00
Dana Hoffman
9fd4d02b89
allow setting service account email for keys (#1256) 2018-03-26 15:44:34 -07:00
Andy Lawrence
5b6e7f29c0 google_project_organization_policy (#1226)
* support google_project_organization_policy

* add documentation for google_project_organization_policy

* remove "folder" references and cleanup docs

* fix tests

* un-parallelize tests

* add comment about non-parralel tests

* moving canonicalProjectId() to test
2018-03-26 12:45:32 -07:00
Irena Shashchuk
d17c5a2a88 rIGM rolling update 2018-03-23 16:51:30 -04:00
Dana Hoffman
685842410e
Add update support for pod security policy (#1195)
* move setid calls back

* Revert "move setid calls back"

This reverts commit 0c7b2dbf92aff33dac8c5beb95568c2bc86dd7de.

* add update support for pod security policy

* update test

* add comment about updates
2018-03-23 11:27:37 -07:00
Nathan McKinley
4b15990dc3
Investigate and fix flaky sql user test. (#1212) 2018-03-23 14:19:39 -04:00
Dana Hoffman
95f96674a8
add ability to delete the default node pool (#1245) 2018-03-22 17:22:44 -07:00
Dana Hoffman
141b965e83
protect against an instance getting deleted by an igm while the disk is being detached (#1241) 2018-03-22 16:22:59 -07:00
Dana Hoffman
790711c649
add support for security policies in backend services (#1243) 2018-03-22 09:53:24 -07:00
Dana Hoffman
fde96ca9d9
Add new google_compute_security_policy resource (#1242)
* revendor compute/v0.beta

* add new `google_compute_security_policy` resource

* docs updates for security policy

* Add link to official docs
2018-03-21 16:52:23 -07:00
Dana Hoffman
98baa31a05
Set wait_for_instances when importing IGMs, make defaults match (#1235) 2018-03-21 12:39:12 -07:00
Dana Hoffman
ddfb7ef2cf
fix panic when setting empty iap block (#1232) 2018-03-20 15:41:58 -07:00
Dana Hoffman
28efae534a
Add wait_for_instances field to IGM and self_link option to the IG data source (#1222)
* Add wait_for_instances field to IGM and self_link option to the IG data source

* don't be clever with errors
2018-03-20 14:20:43 -07:00
Shinichi TAMURA
fc6a821433 Suppress perpetual diff on logging sink filter with surrounding whitespaces (#1206) 2018-03-20 12:49:50 -04:00
Dana Hoffman
e9ab089260
set force_destroy on import (#1223) 2018-03-19 16:37:39 -07:00
Paddy Carver
53c905b99a Back out the Set changes from #1217.
PR #1217 mistakenly updated the Set logic when flattening backends,
which caused some cascading errors and wasn't strictly necessary to
resolve the issue at hand. This backs out those changes, and instead
makes the smallest possible change to resolve the initial error, by
separating the logic for flattening regional backends from the logic for
flattening global backends.
2018-03-19 12:08:58 -07:00
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
Darren Hague
5b0d8d43ff Allow specifying accelerators in cluster node_config (#1115) 2018-02-23 16:55:07 -08:00
Dana Hoffman
6d0b87ec1e
s/TestAccGoogle/TestAcc/ (#1121)
* s/TestAccGoogle/TestAcc/

* add back import

* reorder imports
2018-02-23 15:14:24 -08:00
Nathan McKinley
640e25931e
Move log statement for storage bucket (#1126) 2018-02-23 10:58:42 -08:00
Nathan McKinley
151e83aa26
Only check project if it's not present on the resource. (#1125) 2018-02-22 15:31:55 -08:00
Dana Hoffman
4154db93e9
add diffsuppress to allow lowercase ip protocols (#1118) 2018-02-22 09:27:43 -08:00
Dana Hoffman
9a4c92bb1b
add json omitted fields back when converting (#1098)
* add json omitted fields back when converting

* for testing: don't use json in convert

* try a combination of structs and mapstructure libraries

* Revert "try a combination of structs and mapstructure libraries"

This reverts commit eab11aa95d3abb74b240988e5c99d6e9525db96c.

* Revert "for testing: don't use json in convert"

This reverts commit 96af067b29dd147fcedb55995ebc8a17c6a9d1b2.
2018-02-22 09:27:02 -08:00
ishashchuk
ef3ea881b1 Datasource for retrieving GCS service account (#1110)
* Datasource for retrieving GCS service account

* Removing duplicated argument

* Gofmt post resolving conflicts

* Addressing review comment
2018-02-21 13:37:23 -08:00
Vincent Roseberry
304c0aa6cb
Move method out of resource file to prepare for autogen (#1102) 2018-02-20 12:40:02 -08:00
Vincent Roseberry
297b0a80e0
Refactor PubSub import test (#1106)
* Refactor pubsub subscription import test

* Refactor pubsub topic import test
2018-02-20 11:12:22 -08:00
Konstantinos Tsanaktsidis
411017c35f Fix overly restrictive validation for ServiceAccountLinkRegex (#1073) 2018-02-20 10:36:18 -08:00
Nathan McKinley
026e813287
Run gofmt. (#1095) 2018-02-15 19:26:36 -08:00
Vincent Roseberry
21564c36a1
Move method from resource to datasource file (#1093) 2018-02-15 15:40:40 -08:00
Dana Hoffman
7977d277ec
Add scaffolding to enable beta features in GKE resources (#1085)
* make api_versions more generic

* add api versions for gke
2018-02-15 18:37:36 -05:00
Vincent Roseberry
4b1fdee504
Changes to handle autogeneration. (#1087)
* Add Set method to TerraformResourceData and ResourceDataMock

* Add Id() and SetId() to ResourceDataMock and TerraformResourceData

* Keep only name when reading region or zone field to handle api that returns self_link
2018-02-15 15:32:31 -08:00
Julien Phalip
7477c7482c Let route resource accept "description" attribute (#1088) 2018-02-15 13:03:28 -08:00
Julien Phalip
c607b466f6 Fix VPN gateway data source schema for "network" attribute. (#1086) 2018-02-14 16:16:42 -08:00
Dana Hoffman
2e665f2f35
add support for updating alias ips in instances (#1084) 2018-02-14 15:48:47 -05:00
Nathan McKinley
f7851162a4
Don't set metadata_startup_script in some cases. (#1081) 2018-02-13 23:55:37 -08:00
Julien Phalip
1966a791a6 Add data source for forwarding rule (#1078) 2018-02-13 17:43:08 -08:00
Nathan McKinley
8354a43d1a
Add usage export bucket resource. (#1080) 2018-02-13 13:30:17 -08:00
Kit Ewbank
21e0075f6f Add 'google_folder_iam_binding' and 'google_folder_iam_member' resources (#1076) 2018-02-13 12:49:51 -08:00
Julien Phalip
509614e404 Improve error handling for data sources not found (#1077) 2018-02-13 11:19:59 -08:00
Julien Phalip
f6c5f01a95 Add VPN gateway data source (#1071) 2018-02-12 15:28:02 -08:00
Chase
e1323489ba Feature: select compute instance attached disk mode (#947) 2018-02-12 10:56:06 -08:00
Vincent Roseberry
5f32d7e87a
Fix TestAccContainerCluster_withIPAllocationPolicy test (#1065)
* Remove bad test in testAccContainerCluster_withIPAllocationPolicy

One step was expecting the test to fail if the subnetwork defines
secondary ip ranges that the cluster doesn't use. However, it is
perfectly fine to do so and we don't expect an error.

* Revert "Remove bad test in testAccContainerCluster_withIPAllocationPolicy"

This reverts commit af2f369907181a107cfc0ed9fa2ff0e288f02f66.

* Fail if use_ip_aliases is true and no range names is provided

* make fmt

* don't introduce new field for now. Wait until we want to support new feature in allocation policy
2018-02-09 13:55:38 -08:00
Vincent Roseberry
b789d7c2a0
Support multiple users with the same name for different host for 1st gen. (#1066)
* Support multiple users with the same name for different host for 1st gen.

* Fix typo and rename user
2018-02-09 13:43:49 -08:00
Dana Hoffman
9900e6a4c7
Add generated BackendBucket resource + transport.go (#1064)
* Add generated BackendBucket resource

* add ForceNew back to name

* Add log statements back
2018-02-08 17:58:20 -08:00
Vincent Roseberry
842256abc2
Return an error if name and name prefix are specified in node pool (#1062) 2018-02-08 13:35:35 -08:00
Vincent Roseberry
476fc5a945
Update master_auth password in cluster datasource test to meet the new minimal length requirement (#1063) 2018-02-08 10:16:51 -08:00
Vincent Roseberry
e8c5266a2f
Mark subnetwork field in container cluster as computed (#1061)
* Mark subnetwork field in container cluster as computed

* make fmt
2018-02-08 10:04:16 -08:00
Dana Hoffman
e48f247196
org policy test fixes (#1059) 2018-02-07 14:55:03 -08:00
Vaidas Jablonskis
1b042a3b18 Cloud SQL user password can be optional (#1056) 2018-02-07 11:59:23 -08:00
ishashchuk
7257b9aaa8 Storage Notification Resource (#1033)
* Storage Default Object ACL resource

* Fixed the doc

* Renamed the resource id. Log change

* Complying with go vet

* Changes for review

* link to default object acl docs in sidebar

* Support for GCS notifications

* docs for storage notification

* docs for storage notification

* Clarified the doc

* Doc modifications

* Addressing requested changes from review

* Addressing requested changes from review

* Using ImportStatePassthrough
2018-02-05 14:14:36 -08:00
Vincent Roseberry
388f9bcd79
Don't set MaxRate and MaxRateInstance (#1053)
* Don't set MaxRate and MaxRateInstance

* Fix if check
2018-02-05 12:58:11 -08:00
Vincent Roseberry
90b9fa1208
Remove master_auth from test that don't need it (#1049) 2018-02-05 11:15:03 -08:00
Emily Ye
41a0fddfbd remove multiple locks from cluster update and add lock helper 2018-02-05 09:45:53 -08:00
Vincent Roseberry
9d59f5f93a
Remove unnecessary Exists methods (#1032)
* Remove unnecessary
exists method

* make fmt

* Remove unused import
2018-02-02 13:04:22 -08:00
Dana Hoffman
cfac1dbc8b
deprecate compute_image.custom_timeout (#1038) 2018-02-02 10:56:18 -08:00
Vincent Roseberry
629c53be03
Make get(Region|Project|Zone) method testable (#1040) 2018-02-02 10:55:43 -08:00
Emily Ye
10ef26a905 actually fix container_network_policy diff suppress and add test 2018-02-01 10:25:12 -08:00
Emily Ye
5f3070e223 add diff suppress for empty network policy in container cluster 2018-01-31 14:36:03 -08:00
Vincent Roseberry
3a65e36cbc
Diff suppress unconventional public image family naming pattern (#1024)
* DiffSuppress for all public images family names

* Update documentation

* TF_ACC guard

* diskImageEquals should use ==
2018-01-31 09:33:26 -08:00
emily
d59f5fc3c1
Merge pull request #1028 from emilymye/capacity_scaler_1014
Force send numeric values if set for compute backend services
2018-01-30 17:13:36 -08:00
Emily Ye
24975fedd2 force send numeric values if set for compute backend services 2018-01-30 17:01:46 -08:00
Vincent Roseberry
559f28016f
Remove unnecessary StateFunc in compute_target_https_proxy (#1027)
* Remove unnecessary StateFunc in https proxy

* Support name only certificates

* Remove test for the removed validate func
2018-01-30 16:07:43 -08:00
emily
db3a88ebef
Merge pull request #1015 from jphalip/route-priority-optional
Make route priority optional, default to 1000
2018-01-30 15:20:03 -08:00
Dana Hoffman
3074db8084
keep description the same between updates 2018-01-30 14:41:20 -08:00
Jeff Johnson
d9a4be0c6c Remove Optional flag from Computed server_ca_cert resource (#1025)
Response to PR comment:
https://github.com/terraform-providers/terraform-provider-google/pull/1020#pullrequestreview-92660096
2018-01-30 14:37:30 -08:00
emily
f73db84c7e
Merge pull request #1019 from ewbankkit/issue-1018
Set 'project' attribute when importing 'google_logging_project_sink'
2018-01-30 13:32:59 -08:00
emily
7e91cbb05d
Merge pull request #1020 from johnsonj/master
Add support for Cloud SQL CA Cert (#635)
2018-01-30 13:19:37 -08:00
Vincent Roseberry
429c8e834c
Remove latest image from diskImageDiffSuppress (#1021) 2018-01-30 11:05:23 -08:00
Kit Ewbank
1f7e84c25e Call 'parseLoggingSinkId' to parse logging project sink ID. 2018-01-29 18:23:08 -05:00
Kit Ewbank
a51117ca97 Add back seperate logging project sink import test. 2018-01-29 18:22:15 -05:00
Jeff Johnson
6e101dd3b7 Add support for Cloud SQL CA Cert (#635)
Expose the 'ServerCaCert' object from the Cloud SQL Instance[1]

Related: #635 - Solves first point

[1] https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances#resource
2018-01-29 13:53:54 -08:00
Kit Ewbank
8748941116 Set 'project' attribute when importing 'google_logging_project_sink'. 2018-01-29 09:19:47 -05:00
Kit Ewbank
31bc09279d
Fix nil pointer dereference updating project labels. 2018-01-27 16:55:39 -05:00
Julien Phalip
261a43e633 Make route priority optional, default to 1000
Fixes #1009
2018-01-27 13:37:32 -08:00
ishashchuk
9f21b56fe5 Add google_storage_default_object_acl resource (#992)
* Storage Default Object ACL resource

* Fixed the doc

* Renamed the resource id. Log change

* Complying with go vet

* Changes for review

* link to default object acl docs in sidebar
2018-01-25 11:29:49 -08:00
Patrick Pelletier
eaac260f36 Add support for setting bucket's logging config (#946)
* Add support for setting bucket's logging config

* Add log_object_prefix and fix nil Logging condition
2018-01-25 11:02:08 -08:00
Nathan McKinley
9d3e64cdaf
Add cloud endpoints resource (#933)
OpenAPI & gRPC Endpoints on Compute Engine.

New Resource:
- Endpoints Service Create/Read/Delete
- Example terraform config
2018-01-24 13:03:57 -08:00
Simon Pizonka
fec2f0bc02 Add support for Google Cloud IoT Core registry (#970) 2018-01-24 13:03:09 -08:00
Dana Hoffman
c18ac00e8f
Add generic http client to Config struct (#994) 2018-01-24 13:00:53 -08:00
Kit Ewbank
b795a4563e Import google_compute_shared_vpc_host_project/google_compute_shared_vpc_service_project resources (#1004)
* Import google_compute_shared_vpc_host_project/google_compute_shared_vpc_service_project resources.

* Incorporate testing of resource import into main acceptance tests.
2018-01-24 12:54:42 -08:00
Dana Hoffman
3b753cefa2
Add update support for machine type, min cpu platform, and service accounts (#1005)
* Add update support for compute instance fields that require the machine to be stopped

* add warnings in docs about stopping the instance before updating

* add allow_stopping_for_update field
2018-01-24 12:50:39 -08:00
Lawrence Jones
9f42aeb652 PostgreSQL high availability (#1001)
* Update sqladmin api

Pull in updates to the generated sqladmin api and update callers for
the change in the StorageAutoResize setting

* Add support for availability_type setting

Allow specifying ZONAL or REGIONAL to allow for PostgreSQL HA
setup.

* vendor: update sqladmin/v1beta4

* Test setting AvailabilityType for PostgreSQL

Add tests that cover the creation of a Postgres database with
AvailabilityType set to REGIONAL, and correct some small issues that
were preventing compilation.

* Fix breaking change w/ disk_autoresize in cloudsql

95e5582766

The cloudsql admin client changed the way it handles StorageAutoResize
as a parameter, in order to be more explicit about when the server has
ommitted the field. This changed the type from being bool to *bool, and
we need to modify provider code so that we supply the right value to the
api client.
2018-01-24 09:23:48 -08:00
Dana Hoffman
33626a1e33
add metadata to gce cluster config in dataproc (#999) 2018-01-23 16:08:51 -08:00
Jacob Straszynski
939ba6d365 skip guest accelerators if count is 0. (#866)
* skip guest accelerators if count is 0.

Instances in instance groups in google will fail to provision, despite
requesting 0 GPUs. This came up for me when trying to provision
a similar instance group in all available regions, but only asking for
GPU's in those that support them by parameterizing the `count` and
setting it to 0.

This might be a violation of some terraform principles. For example,
testing locally with this change `terraform` did not recognize that
indeed my infra needed to be re-deployed (from it's pov, I assume it
believes this because inputs hadn't changed). Additionally, there may be
valid reasons for creating an instance template with 0 gpu's that can be
tuned upwards.

* Add guest accelerator skip test for instances.

* do not leave empty pointers to guest accelerators.

* attempt to clear guest accelerator diff

* conditionally customize diff for guest accels
2018-01-23 11:51:36 -08:00
Nathan McKinley
535fc64a14
condition.IsLive can come back nil - avoid crash if it does. (#997) 2018-01-22 14:14:02 -08:00
Nathan McKinley
0133845a19
Wrap HTTP errors so that concurrent-modification-detection works as designed. (#987) 2018-01-19 16:31:51 -08:00
Nathan McKinley
7b54aa8540
Read project name from API instead of inferring from provider in case of import. (#985) 2018-01-19 15:32:57 -08:00
Stefan Schmidt
bda219f276 Allow for legacy domain-scoped project IDs. (#960) 2018-01-19 15:11:30 -08:00
Vincent Roseberry
3e900a3e6b
Bump up defaults timeout for dataproc (#979) 2018-01-18 11:12:14 -08:00
Vincent Roseberry
5043f60939
Fix canonical image (#978) 2018-01-18 10:49:30 -08:00
Dana Hoffman
92b9984dae
fix gke tests (#977) 2018-01-18 09:51:55 -08:00
Nathan McKinley
d8aea17b19
New simple data sources for GCR Repo and Image. (#954)
New, very simple data sources for GCR Repo and Image, plus docs.
2018-01-17 18:47:25 -08:00
Vincent Roseberry
681cc72f38
Read compute instance boot disk initialization params from API (#948)
* read boot disk initialization param from API

* make fmt

* Mark the initialize_params list as computed to support boot source

* Ensure private family test follow naming pattern

* Improve docs
2018-01-17 13:23:24 -08:00
Vincent Roseberry
c9826b1452
Support subnetwork IP CIDR range expansion (#945)
* Vendor schema/helper/customdiff

* Support subnetwork IP CIDR range expansion

* Change wording
2018-01-17 12:58:37 -08:00
Vincent Roseberry
fc7c0ce74a
Add import support to google_dns_record_set (#895)
* Add import support to google_dns_record_set

* Add import test to NS record

* Minimize diff change

* Improve docs

* Make error message more helpful

* Add note about trailing dot at the end of the record name
2018-01-17 11:19:55 -08:00
Vincent Roseberry
d0f5fec463
Standardize resource name extraction from self_link/uri (#939)
* Standardize resource name extraction from self_link/uri

* remove rebase artifact

* style improvement

* Fix merge issue
2018-01-17 10:45:28 -08:00