From d71d2cfbfa20cf55cf6f0ea01721a5e26a5dd204 Mon Sep 17 00:00:00 2001 From: "Nguyen, Tung" Date: Thu, 28 Oct 2021 13:15:08 +1100 Subject: [PATCH] type should be bool rather than string --- client/pipeline.go | 8 ++++---- codefresh/resource_pipeline.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/pipeline.go b/client/pipeline.go index f854d7a..c91ddbd 100644 --- a/client/pipeline.go +++ b/client/pipeline.go @@ -58,10 +58,10 @@ type Trigger struct { } type TriggerOptions struct { - NoCache string `json:"noCache,omitempty"` - NoCfCache string `json:"noCfCache,omitempty"` - ResetVolume string `json:"resetVolume,omitempty"` - EnableNotifications string `json:"enableNotifications,omitempty"` + NoCache bool `json:"noCache,omitempty"` + NoCfCache bool `json:"noCfCache,omitempty"` + ResetVolume bool `json:"resetVolume,omitempty"` + EnableNotifications bool `json:"enableNotifications,omitempty"` } type RuntimeEnvironment struct { diff --git a/codefresh/resource_pipeline.go b/codefresh/resource_pipeline.go index 4860aad..822e467 100644 --- a/codefresh/resource_pipeline.go +++ b/codefresh/resource_pipeline.go @@ -693,10 +693,10 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline { codefreshTrigger.SetVariables(variables) if _, ok := d.GetOk(fmt.Sprintf("spec.0.trigger.%v.options", idx)); ok { options := cfClient.TriggerOptions{ - NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(string), - NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(string), - ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(string), - EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(string), + NoCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cache", idx)).(bool), + NoCfCache: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.no_cf_cache", idx)).(bool), + ResetVolume: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.reset_volume", idx)).(bool), + EnableNotifications: d.Get(fmt.Sprintf("spec.0.trigger.%v.options.0.enable_notifications", idx)).(bool), } codefreshTrigger.Options = &options }