mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Add project variable for GCS service account datasource (#1677)
This commit is contained in:
parent
c7bd0cb0f8
commit
751a3d5c9e
@ -7,6 +7,14 @@ import (
|
|||||||
func dataSourceGoogleStorageProjectServiceAccount() *schema.Resource {
|
func dataSourceGoogleStorageProjectServiceAccount() *schema.Resource {
|
||||||
return &schema.Resource{
|
return &schema.Resource{
|
||||||
Read: dataSourceGoogleStorageProjectServiceAccountRead,
|
Read: dataSourceGoogleStorageProjectServiceAccountRead,
|
||||||
|
Schema: map[string]*schema.Schema{
|
||||||
|
"project": {
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
Optional: true,
|
||||||
|
ForceNew: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,6 +31,8 @@ func dataSourceGoogleStorageProjectServiceAccountRead(d *schema.ResourceData, me
|
|||||||
return handleNotFoundError(err, d, "GCS service account not found")
|
return handleNotFoundError(err, d, "GCS service account not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d.Set("project", project)
|
||||||
|
|
||||||
d.SetId(serviceAccount.EmailAddress)
|
d.SetId(serviceAccount.EmailAddress)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -27,7 +27,9 @@ resource "google_pubsub_topic_iam_binding" "binding" {
|
|||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
|
||||||
There are no arguments available for this data source.
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `project` - (Optional) The project in which the resource belongs. If it is not provided, the provider project is used.
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user