Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filter by name in datasource of project #237

Merged
merged 5 commits into from
Jan 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed bug where datasource project search by name was empty
  • Loading branch information
yannickstruyf3 committed Jan 22, 2021
commit 63ac2a2adc227bc1ef544610f37fef9d07a9a67a
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