mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-03 08:42:39 +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 {
|
||||
return &schema.Resource{
|
||||
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")
|
||||
}
|
||||
|
||||
d.Set("project", project)
|
||||
|
||||
d.SetId(serviceAccount.EmailAddress)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -27,7 +27,9 @@ resource "google_pubsub_topic_iam_binding" "binding" {
|
|||
|
||||
## 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user