Skip to content

Commit 751a3d5

Browse files
bcadiotemilymye
authored andcommitted
Add project variable for GCS service account datasource (#1677)
1 parent c7bd0cb commit 751a3d5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

google/data_source_google_storage_project_service_account.go

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ import (
77
func dataSourceGoogleStorageProjectServiceAccount() *schema.Resource {
88
return &schema.Resource{
99
Read: dataSourceGoogleStorageProjectServiceAccountRead,
10+
Schema: map[string]*schema.Schema{
11+
"project": {
12+
Type: schema.TypeString,
13+
Computed: true,
14+
Optional: true,
15+
ForceNew: true,
16+
},
17+
},
1018
}
1119
}
1220

@@ -23,6 +31,8 @@ func dataSourceGoogleStorageProjectServiceAccountRead(d *schema.ResourceData, me
2331
return handleNotFoundError(err, d, "GCS service account not found")
2432
}
2533

34+
d.Set("project", project)
35+
2636
d.SetId(serviceAccount.EmailAddress)
2737

2838
return nil

website/docs/d/google_storage_project_service_account.html.markdown

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ resource "google_pubsub_topic_iam_binding" "binding" {
2727

2828
## Argument Reference
2929

30-
There are no arguments available for this data source.
30+
The following arguments are supported:
31+
32+
* `project` - (Optional) The project in which the resource belongs. If it is not provided, the provider project is used.
3133

3234
## Attributes Reference
3335

0 commit comments

Comments
 (0)