Skip to content

Commit

Permalink
Export email output in service_identity (#3924) (#7162)
Browse files Browse the repository at this point in the history
* expose email

* fix member

* fix member

* unnecessary google-beta

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Aug 31, 2020
1 parent acf78bf commit 68d9693
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changelog/3924.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
google_project_service_identity: add `email` output.
```
16 changes: 9 additions & 7 deletions website/docs/r/project_service_identity.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ To get more information about Service Identity, see:

## Example Usage - Service Identity Basic


```hcl
data "google_project" "project" {}
Expand All @@ -35,34 +34,37 @@ resource "google_project_service_identity" "hc_sa" {
}
resource "google_project_iam_member" "hc_sa_bq_jobuser" {
project = google_project_service_identity.hc_sa.project
role = "roles/bigquery.jobUser"
member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-healthcare.iam.gserviceaccount.com"
project = data.google_project.project.project_id
role = "roles/bigquery.jobUser"
member = "serviceAccount:${google_project_service_identity.hc_sa.email}"
}
```

## Argument Reference

The following arguments are supported:


* `service` -
(Required)
The service to generate identity for.


- - -

* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.

## Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

* `email` - The email address of the Google managed service account.

## Timeouts

This resource provides the following
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:

- `create` - Default is 20 minutes.
* `create` - Default is 20 minutes.

## User Project Overrides

Expand Down

0 comments on commit 68d9693

Please sign in to comment.