@@ -38,6 +38,11 @@ func resourceProject() *schema.Resource {
38
38
},
39
39
},
40
40
},
41
+ "custom_properties" : {
42
+ Type : schema .TypeMap ,
43
+ Optional : true ,
44
+ Description : "The project custom properties which are added to all requests in this project" ,
45
+ },
41
46
"description" : {
42
47
Type : schema .TypeString ,
43
48
Optional : true ,
@@ -128,6 +133,7 @@ func resourceProjectCreate(d *schema.ResourceData, m interface{}) error {
128
133
129
134
administrators := expandUserList (d .Get ("administrators" ).(* schema.Set ).List ())
130
135
constraints := expandProjectConstraints (d .Get ("constraints" ).(* schema.Set ).List ())
136
+ customProperties := expandCustomProperties (d .Get ("custom_properties" ).(map [string ]interface {}))
131
137
description := d .Get ("description" ).(string )
132
138
machineNamingTemplate := d .Get ("machine_naming_template" ).(string )
133
139
members := expandUserList (d .Get ("members" ).(* schema.Set ).List ())
@@ -140,6 +146,7 @@ func resourceProjectCreate(d *schema.ResourceData, m interface{}) error {
140
146
createResp , err := apiClient .Project .CreateProject (project .NewCreateProjectParams ().WithBody (& models.ProjectSpecification {
141
147
Administrators : administrators ,
142
148
Constraints : constraints ,
149
+ CustomProperties : customProperties ,
143
150
Description : description ,
144
151
MachineNamingTemplate : machineNamingTemplate ,
145
152
Members : members ,
@@ -174,6 +181,7 @@ func resourceProjectRead(d *schema.ResourceData, m interface{}) error {
174
181
project := * ret .Payload
175
182
d .Set ("administrators" , flattenUserList (project .Administrators ))
176
183
d .Set ("constraints" , flattenProjectConstraints (project .Constraints ))
184
+ d .Set ("custom_properties" , project .CustomProperties )
177
185
d .Set ("description" , project .Description )
178
186
d .Set ("machine_naming_template" , project .MachineNamingTemplate )
179
187
d .Set ("members" , flattenUserList (project .Members ))
@@ -192,6 +200,7 @@ func resourceProjectUpdate(d *schema.ResourceData, m interface{}) error {
192
200
id := d .Id ()
193
201
administrators := expandUserList (d .Get ("administrators" ).(* schema.Set ).List ())
194
202
constraints := expandProjectConstraints (d .Get ("constraints" ).(* schema.Set ).List ())
203
+ customProperties := expandCustomProperties (d .Get ("custom_properties" ).(map [string ]interface {}))
195
204
description := d .Get ("description" ).(string )
196
205
machineNamingTemplate := d .Get ("machine_naming_template" ).(string )
197
206
members := expandUserList (d .Get ("members" ).(* schema.Set ).List ())
@@ -204,6 +213,7 @@ func resourceProjectUpdate(d *schema.ResourceData, m interface{}) error {
204
213
_ , err := apiClient .Project .UpdateProject (project .NewUpdateProjectParams ().WithID (id ).WithBody (& models.ProjectSpecification {
205
214
Administrators : administrators ,
206
215
Constraints : constraints ,
216
+ CustomProperties : customProperties ,
207
217
Description : description ,
208
218
MachineNamingTemplate : machineNamingTemplate ,
209
219
Members : members ,
0 commit comments