Commit Graph

1315 Commits

Author SHA1 Message Date
Dana Hoffman
cc8ea81117 Fix a few instances where we read the project from the provider config and not using the helper function (#469) 2017-09-26 17:01:52 -07:00
Vincent Roseberry
f1aa5c5732 Update CHANGELOG.md 2017-09-26 16:59:18 -07:00
Vincent Roseberry
ace5dffcc8 Remove project if it has been deleted from outside of Terraform (#466) 2017-09-26 16:55:32 -07:00
Dana Hoffman
b3eeab0200 Update CHANGELOG.md 2017-09-26 15:58:31 -07:00
Dana Hoffman
617ad7362b allow min node counts of 0 for node pool autoscaling (#468) 2017-09-26 15:57:51 -07:00
Vincent Roseberry
5874819e21 Remove beta code path in compute_global_address 2017-09-26 15:57:22 -07:00
Vincent Roseberry
d35b92086a global_address ipv6 uses v1 api
global_forwarding_rule ipv6 uses v1 api
Update documentation
2017-09-26 15:57:22 -07:00
Vincent Roseberry
27a99c7dab Don't crash if node config is nil in google_container_cluster (#467) 2017-09-26 15:32:12 -07:00
Joe Selman
38a961facc Update CHANGELOG.md 2017-09-26 15:28:00 -07:00
Joe Selman
8231d6a83a Add resource_logging_billing_account_sink resource (#457)
* Add resource_logging_billing_account_sink resource

* Fix bad style
2017-09-26 15:26:54 -07:00
Vincent Roseberry
f8936fb275 Update CHANGELOG.md 2017-09-26 14:54:26 -07:00
kf Fellows
30c8186a2e Update dataset_id value for google_bigquery_table resource in docs (#465) 2017-09-26 14:17:34 -07:00
Vincent Roseberry
7f6d72e613 Update CHANGELOG.md 2017-09-26 13:45:22 -07:00
Vincent Roseberry
5e44df5199 Pubsub subscription read state from API and import support (#456) 2017-09-26 13:44:13 -07:00
Vincent Roseberry
54ed2b868e Update CHANGELOG.md 2017-09-25 11:31:58 -07:00
Vincent Roseberry
20929eb468 Assign IAM policy to folder. (#447)
* Assign IAM policy to folder.
* Add documentation for google_folder_iam_policy
2017-09-25 11:30:45 -07:00
Paddy
df76cbc039 Update CHANGELOG.md 2017-09-25 10:31:35 -07:00
Paddy
c31bfdc4df Merge pull request #439 from terraform-providers/paddy_undeletable_bucket_acls
Deal with undeletable bucket ACLs in storage.
2017-09-25 10:29:15 -07:00
Paddy
4ef951c060 Update CHANGELOG.md 2017-09-25 09:18:29 -07:00
Paddy
5060f07926 Pull ProjectNumber off bucket, not getProject.
Use the project reported by the bucket, not the one Terraform is
configured to use.
2017-09-25 06:02:36 -07:00
Vincent Roseberry
5e27acff0c Update CHANGELOG.md 2017-09-22 12:44:04 -07:00
Vincent Roseberry
2e940178d8 Fix example in google_project. Name field is required. (#450) 2017-09-22 12:42:36 -07:00
Manoj Srivastava
c1d0e716d9 Folder support: Assign/Reassign a google project to a folder. (#438)
+ Make the org_id optional when creating a project. Closes #131
+ Mark org_id as computed to allow for GCP automatically assigning the org.
+ Add an acceptance test for project creation without an organization.
+ Skip TestAccGoogleProject_createWithoutOrg if GOOGLE_ORG is set.
+ Add a folder_id to the google_project resource, optionally
  specifying the ID of the GCP folder in which the GCP project should
  live.
+ Document how one can provision a project into a folder, and added a
  sample configuration to create a project into an existing folder.
* Skip test without org if service account is used
* Support folders/* or id only for the folder id field
2017-09-22 13:03:08 -05:00
Marcus Barczak
f3ecd1ea1c note ipv4 addresses can't be disabled on 2nd gen (#446)
Adds a note that IPv4 addresses can't be disabled on 2nd generation cloudsql instances to save end user confusion.
2017-09-22 12:12:28 -05:00
Vincent Roseberry
a575c6e824 Update service account docs to mark policy field as deprecated. (#437)
Also, update example to stop using the deprecated field.
2017-09-18 08:24:08 -07:00
Paddy
a6df85d809 Merge pull request #440 from terraform-providers/paddy_fix_object_acl_predefined
Fix failing test on storage_object_acl.
2017-09-16 16:23:17 -07:00
Paddy
6b1b727449 Fix failing test on storage_object_acl.
The `predefined_acl` test for `storage_object_acl` was failing. This is
because we removed the state-setting portion of the `predefined_acl`
field from `storage_bucket_acl`, and due to what I can only assume is a
copy/paste error, `storage_object_acl` was calling the Read function of
`storage_bucket_acl` instead of its own when using `predefined_acl`.

Updating to use `storage_object_acl`'s Read function makes the tests
pass.
2017-09-15 13:08:37 -07:00
Paddy
b343829d22 Stop fighting with the test framework.
Project number is now set through an environment variable instead of
being inferred at runtime using the API.
2017-09-15 12:53:44 -07:00
Paddy
755edf6d79 Fix make test.
Because we were instantiating a client outside of resource.TestCase, it
was being instantiated even for unit tests, which have no credentials,
causing the unit tests to fail. Sadly, this is the only way I could
figure out how to get a client inside resource.TestCase, which is very
sad making, but works.
2017-09-15 12:28:29 -07:00
Paddy
72114636da Deal with undeleatable bucket ACLs in storage.
When GCS buckets are created, they're created with a set of default
ACLs:

* `OWNER:project-owners-{project_number}`
* `OWNER:project-editors-{project_number}`
* `READER:project-viewers-{project_number}`

Normally, this would be fine, or a minor inconvenience. Terraform could
either delete them itself, or the first apply of a user would overwrite
them.

However, trying to remove the `OWNER:project-owners-{project_number}`
ACL yields an API error that the bucket owner must maintain OWNER access
to the bucket. This breaks things like `terraform destroy`, but also
means any config without that line in it will fail to apply, not just
overwrite the value.

To make matters worse, trying to *add* the
`OWNER:project-owners-{project_number}` ACL to any bucket that already
has it _also_ yields the same error about not being able to remove it.

To get around this, the storage_bucket_acl resource has been updated to
largely ignore _just this_ ACL. It will not try to add it if it already
exists, will not try to remove it at all. This does mean that Terraform
is incapable of removing this ACL from a bucket, but I'm not sure it's
possible to do that with the API, anyways.

Tests were also updated to keep the default ACLs as part of the config,
and to change the email addresses to addresses we actually own. I tried
changing to non-existant hashicorp.com email addresses, but was
rejected; only email addresses that are backed by actual Google accounts
can be used, sadly.
2017-09-15 12:03:03 -07:00
Vincent Roseberry
8f6af73181 Update CHANGELOG.md 2017-09-15 08:37:32 -07:00
Christopher Stelma
43e749c213 Add versioning for google storage buckets (#381) 2017-09-15 08:36:01 -07:00
Joe Selman
b1879b2459 Update CHANGELOG.md 2017-09-14 19:15:52 -07:00
Joe Selman
3d5eccc1c6 Add stackdriver project sink support (#432)
* Vendor cloud logging api

* Add logging sink support

* Remove typo

* Set Filter simpler

* Rename typ, typName to resourceType, resourceId

* Handle notFoundError

* Use # instead of // for hcl comments

* Cleanup test code

* Change testAccCheckLoggingProjectSink to take a provided api object

* Fix whitespace change after merge conflict
2017-09-14 19:15:14 -07:00
Vincent Roseberry
b694d5a325 Update CHANGELOG.md 2017-09-14 11:20:55 -07:00
Vincent Roseberry
167abea500 Create, update, move and delete a GCP folders. (#416)
* Initialize resourcemanager v2beta1 client
* Create new google_folder resource supporting create, move, update and delete operations.
* Add documentation for folders
2017-09-14 11:19:58 -07:00
Vincent Roseberry
3859f643f1 Renaming cluster import test to match other acceptance tests naming scheme (#434) 2017-09-14 11:02:00 -07:00
Joe Selman
5e3c31918f Update CHANGELOG.md 2017-09-14 10:42:30 -07:00
Raúl Naveiras
eee011fc99 Add support for setting labels to google_project (#383) 2017-09-14 10:39:21 -07:00
Dana Hoffman
5f86f52d1f Add DiffSuppressFunc to GKE cluster networks (#419)
* fix gke network test
* use a state func to store the resource name
2017-09-14 09:36:29 -07:00
Joe Selman
68303edb42 Fix error message not getting expanded properly. (#430) 2017-09-14 09:30:06 -07:00
Vincent Roseberry
3027822917 Instance group manager cleanup (#409) 2017-09-13 17:06:07 -07:00
Vincent Roseberry
137485ae4f computeBetaOperationWaitTime doesn't use the timeoutMin properly (#425) 2017-09-13 16:29:50 -07:00
Vincent Roseberry
870f456ef9 Save name-only instead of link path in pubsub_topic (#424) 2017-09-13 16:29:26 -07:00
Joe Selman
a9a2428a60 Update CHANGELOG.md 2017-09-13 16:19:56 -07:00
Joe Selman
41248230ef Expose instance_id as a computed field on compute_instance (#427) 2017-09-13 16:18:08 -07:00
Vincent Roseberry
f83618624c Save region name-only instead of the self-link in compute_address (#422) 2017-09-13 09:51:32 -07:00
Dana Hoffman
7a7926a7ca Update CHANGELOG.md 2017-09-13 10:37:09 +08:00
Dana Hoffman
2d733a1600 Add new google_compute_shared_vpc resource (#396)
* Revendor compute apis

* Add new resource for shared VPC host

* add test for disabled

* add docs for shared vpc host resource

* make project required

* Add new resource google_compute_shared_vpc

* Remove google_compute_shared_vpc_host

* Add docs for shared vpc resource

* Remove docs for shared vpc host resource

* fix typos in shared vpc docs

* move helper fn to utils.go
2017-09-13 10:36:07 +08:00
Joe Selman
204201a5be Refactor tests to defer to common method when looking up project (#410) 2017-09-12 13:28:31 -07:00