File tree 5 files changed +10
-9
lines changed
5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ type RuntimeEnvironment struct {
55
55
DindStorage string `json:"dindStorage,omitempty"`
56
56
}
57
57
58
- func (t * Trigger ) SetVariables (variables map [string ]string ) {
58
+ func (t * Trigger ) SetVariables (variables map [string ]interface {} ) {
59
59
for key , value := range variables {
60
- t .Variables = append (t .Variables , Variable {Key : key , Value : value })
60
+ t .Variables = append (t .Variables , Variable {Key : key , Value : value .( string ) })
61
61
}
62
62
}
63
63
@@ -80,9 +80,9 @@ type Pipeline struct {
80
80
Version string `json:"version,omitempty"`
81
81
}
82
82
83
- func (p * Pipeline ) SetVariables (variables map [string ]string ) {
83
+ func (p * Pipeline ) SetVariables (variables map [string ]interface {} ) {
84
84
for key , value := range variables {
85
- p .Spec .Variables = append (p .Spec .Variables , Variable {Key : key , Value : value })
85
+ p .Spec .Variables = append (p .Spec .Variables , Variable {Key : key , Value : value .( string ) })
86
86
}
87
87
}
88
88
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ func (project *Project) GetID() string {
19
19
}
20
20
21
21
// SetVariables project variables
22
- func (project * Project ) SetVariables (variables map [string ]string ) {
22
+ func (project * Project ) SetVariables (variables map [string ]interface {} ) {
23
23
for key , value := range variables {
24
- project .Variables = append (project .Variables , Variable {Key : key , Value : value })
24
+ project .Variables = append (project .Variables , Variable {Key : key , Value : value .( string ) })
25
25
}
26
26
}
27
27
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
406
406
}
407
407
}
408
408
409
- variables := d .Get ("spec.0.variables" ).(map [string ]string )
409
+ variables := d .Get ("spec.0.variables" ).(map [string ]interface {} )
410
410
pipeline .SetVariables (variables )
411
411
412
412
triggers := d .Get ("spec.0.trigger" ).([]interface {})
@@ -425,7 +425,7 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
425
425
Context : d .Get (fmt .Sprintf ("spec.0.trigger.%v.context" , idx )).(string ),
426
426
Events : convertStringArr (events ),
427
427
}
428
- variables := d .Get (fmt .Sprintf ("spec.0.trigger.%v.variables" , idx )).(map [string ]string )
428
+ variables := d .Get (fmt .Sprintf ("spec.0.trigger.%v.variables" , idx )).(map [string ]interface {} )
429
429
codefreshTrigger .SetVariables (variables )
430
430
431
431
pipeline .Spec .Triggers = append (pipeline .Spec .Triggers , codefreshTrigger )
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ func mapResourceToProject(d *schema.ResourceData) *cfClient.Project {
125
125
ProjectName : d .Get ("name" ).(string ),
126
126
Tags : convertStringArr (tags ),
127
127
}
128
- variables := d .Get ("variables" ).(map [string ]string )
128
+ variables := d .Get ("variables" ).(map [string ]interface {} )
129
129
project .SetVariables (variables )
130
130
return project
131
131
}
Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8j
339
339
github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0 =
340
340
github.com/hashicorp/terraform-plugin-sdk v1.7.0 /go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY =
341
341
github.com/hashicorp/terraform-plugin-sdk v1.13.0 h1:8v2/ZNiI12OHxEn8pzJ3noCHyRc0biKbKj+iFv5ZWKw =
342
+ github.com/hashicorp/terraform-plugin-sdk v1.13.1 h1:kWq+V+4BMFKtzIuO8wb/k4SRGB/VVF8g468VSFmAnKM =
342
343
github.com/hashicorp/terraform-plugin-test v1.2.0 h1:AWFdqyfnOj04sxTdaAF57QqvW7XXrT8PseUHkbKsE8I =
343
344
github.com/hashicorp/terraform-plugin-test v1.2.0 /go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs =
344
345
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg =
You can’t perform that action at this time.
0 commit comments