Skip to content

Commit

Permalink
Merge pull request #240 from yannickstruyf3/bugfix/datasource-project…
Browse files Browse the repository at this point in the history
…-byname-empty

fixed bug where datasource project search by name was empty
  • Loading branch information
marinsalinas authored Jan 22, 2021
2 parents 5110187 + 63ac2a2 commit b8d56a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nutanix/data_source_nutanix_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

v3 "github.com/terraform-providers/terraform-provider-nutanix/client/v3"
"github.com/terraform-providers/terraform-provider-nutanix/utils"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down Expand Up @@ -369,7 +370,7 @@ func dataSourceNutanixProjectRead(d *schema.ResourceData, meta interface{}) erro
return fmt.Errorf("error setting `api_version` for Project(%s): %s", d.Id(), err)
}

d.SetId(id.(string))
d.SetId(utils.StringValue(project.Metadata.UUID))

return nil
}
Expand Down

0 comments on commit b8d56a6

Please sign in to comment.