Skip to content

Commit c1a1729

Browse files
ishashchukdanawillow
authored andcommitted
Datasource for retrieving GCS service account (hashicorp#1110)
* Datasource for retrieving GCS service account * Removing duplicated argument * Gofmt post resolving conflicts * Addressing review comment
1 parent e083952 commit c1a1729

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: "google"
3+
page_title: "Google: google_storage_project_service_account"
4+
sidebar_current: "docs-google-datasource-storage-project-service-account"
5+
description: |-
6+
Get the email address of the project's Google Cloud Storage service account
7+
---
8+
9+
# google\_storage\_project\_service\_account
10+
11+
Use this data source to get the email address of the project's Google Cloud Storage service account.
12+
For more information see
13+
[API](https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount).
14+
15+
## Example Usage
16+
17+
```hcl
18+
data "google_storage_project_service_account" "gcs_account" {}
19+
20+
resource "google_pubsub_topic_iam_binding" "binding" {
21+
topic = "${google_pubsub_topic.topic.name}"
22+
role = "roles/pubsub.publisher"
23+
24+
members = ["${data.google_storage_project_service_account.gcs_account.id}"]
25+
}
26+
```
27+
28+
## Argument Reference
29+
30+
There are no arguments available for this data source.
31+
32+
## Attributes Reference
33+
34+
The following attributes are exported:
35+
36+
* `id` - The ID of the service account, which is its email address

google.erb

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
<li<%= sidebar_current("docs-google-datasource-signed_url") %>>
8686
<a href="/docs/providers/google/d/signed_url.html">google_storage_object_signed_url</a>
8787
</li>
88+
<li<%= sidebar_current("docs-google-datasource-storage-project-service-account") %>>
89+
<a href="/docs/providers/google/d/google_storage_project_service_account.html">google_storage_project_service_account</a>
90+
</li>
8891
</ul>
8992
</li>
9093

0 commit comments

Comments
 (0)