Skip to content

Commit d948b19

Browse files
authored
Merge pull request #70 from adam-janis/fix-project-data
fix: data resources
2 parents 35f72e6 + 87ee06e commit d948b19

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

gitlab/data_source_gitlab_project.go

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,71 @@ func dataSourceGitlabProject() *schema.Resource {
1717
Type: schema.TypeInt,
1818
Required: true,
1919
},
20+
"name": {
21+
Type: schema.TypeString,
22+
Optional: true,
23+
Computed: true,
24+
},
25+
"path": {
26+
Type: schema.TypeString,
27+
Optional: true,
28+
Computed: true,
29+
},
30+
"description": {
31+
Type: schema.TypeString,
32+
Optional: true,
33+
Computed: true,
34+
},
35+
"default_branch": {
36+
Type: schema.TypeString,
37+
Optional: true,
38+
Computed: true,
39+
},
40+
"issues_enabled": {
41+
Type: schema.TypeBool,
42+
Optional: true,
43+
Computed: true,
44+
},
45+
"merge_requests_enabled": {
46+
Type: schema.TypeBool,
47+
Optional: true,
48+
Computed: true,
49+
},
50+
"wiki_enabled": {
51+
Type: schema.TypeBool,
52+
Optional: true,
53+
Computed: true,
54+
},
55+
"snippets_enabled": {
56+
Type: schema.TypeBool,
57+
Optional: true,
58+
Computed: true,
59+
},
60+
"visibility_level": {
61+
Type: schema.TypeString,
62+
Optional: true,
63+
Computed: true,
64+
},
65+
"namespace_id": {
66+
Type: schema.TypeInt,
67+
Optional: true,
68+
Computed: true,
69+
},
70+
"ssh_url_to_repo": {
71+
Type: schema.TypeString,
72+
Optional: true,
73+
Computed: true,
74+
},
75+
"http_url_to_repo": {
76+
Type: schema.TypeString,
77+
Optional: true,
78+
Computed: true,
79+
},
80+
"web_url": {
81+
Type: schema.TypeString,
82+
Optional: true,
83+
Computed: true,
84+
},
2085
},
2186
}
2287
}

gitlab/data_source_gitlab_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func dataSourceGitlabUserRead(d *schema.ResourceData, meta interface{}) error {
6969
}
7070
d.SetId(fmt.Sprintf("%d", found.ID))
7171
d.Set("name", found.Name)
72-
d.Set("userName", found.Username)
72+
d.Set("username", found.Username)
7373
d.Set("email", found.Email)
7474
return nil
7575
}

0 commit comments

Comments
 (0)