Skip to content

Commit

Permalink
Datasource for retrieving GCS service account (hashicorp#1110)
Browse files Browse the repository at this point in the history
* Datasource for retrieving GCS service account

* Removing duplicated argument

* Gofmt post resolving conflicts

* Addressing review comment
  • Loading branch information
ishashchuk authored and danawillow committed Feb 21, 2018
1 parent e083952 commit c1a1729
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/d/google_storage_project_service_account.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: "google"
page_title: "Google: google_storage_project_service_account"
sidebar_current: "docs-google-datasource-storage-project-service-account"
description: |-
Get the email address of the project's Google Cloud Storage service account
---

# google\_storage\_project\_service\_account

Use this data source to get the email address of the project's Google Cloud Storage service account.
For more information see
[API](https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount).

## Example Usage

```hcl
data "google_storage_project_service_account" "gcs_account" {}
resource "google_pubsub_topic_iam_binding" "binding" {
topic = "${google_pubsub_topic.topic.name}"
role = "roles/pubsub.publisher"
members = ["${data.google_storage_project_service_account.gcs_account.id}"]
}
```

## Argument Reference

There are no arguments available for this data source.

## Attributes Reference

The following attributes are exported:

* `id` - The ID of the service account, which is its email address
3 changes: 3 additions & 0 deletions google.erb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<li<%= sidebar_current("docs-google-datasource-signed_url") %>>
<a href="/docs/providers/google/d/signed_url.html">google_storage_object_signed_url</a>
</li>
<li<%= sidebar_current("docs-google-datasource-storage-project-service-account") %>>
<a href="/docs/providers/google/d/google_storage_project_service_account.html">google_storage_project_service_account</a>
</li>
</ul>
</li>

Expand Down

0 comments on commit c1a1729

Please sign in to comment.