terraform-provider-google/website/docs/d/google_storage_project_service_account.html.markdown
Riley Karson fbad37ebff
Fix storage notification tests (#1913)
* Update google_storage_project_service_account to mirror API.

* Fix storage notifications test, clarify docs.
2018-08-22 08:19:52 -07:00

1.6 KiB

layout page_title sidebar_current description
google Google: google_storage_project_service_account docs-google-datasource-storage-project-service-account Get the email address of the project's Google Cloud Storage service account

google_storage_project_service_account

Get the email address of a project's unique Google Cloud Storage service account.

Each Google Cloud project has a unique service account for use with Google Cloud Storage. Only this special service account can be used to set up google_storage_notification resources.

For more information see the API reference.

Example Usage

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     = ["serviceAccount:${data.google_storage_project_service_account.gcs_account.email_address}"]
}

Argument Reference

The following arguments are supported:

  • project - (Optional) The project the unique service account was created for. If it is not provided, the provider project is used.

  • user_project - (Optional) The project the lookup originates from. This field is used if you are making the request from a different account than the one you are finding the service account for.

Attributes Reference

The following attributes are exported:

  • email_address - The email address of the service account. This value is often used to refer to the service account in order to grant IAM permissions.