Merge pull request #11 from Kamahl19/data_bitbucketserver_user

Implement data source bitbucketserver_user
This commit is contained in:
Gavin Bunney
2020-07-17 21:54:00 -07:00
committed by GitHub
8 changed files with 102 additions and 3 deletions

View File

@@ -4,18 +4,20 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"io/ioutil"
"math/rand"
"net/url"
"time"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
)
type User struct {
Name string `json:"name,omitempty"`
EmailAddress string `json:"emailAddress,omitempty"`
DisplayName string `json:"displayName,omitempty"`
UserId int `json:"id,omitempty"`
}
type UserUpdate struct {
@@ -176,6 +178,7 @@ func resourceUserRead(d *schema.ResourceData, m interface{}) error {
d.Set("name", user.Name)
d.Set("email_address", user.EmailAddress)
d.Set("display_name", user.DisplayName)
d.Set("user_id", user.UserId)
}
return nil