From 8f0f8d225d204735499ae07807f00928dd5ecebf Mon Sep 17 00:00:00 2001 From: Victor Hadianto Date: Tue, 6 Aug 2024 23:33:49 +1000 Subject: [PATCH] Added type string to PipelineParam. --- modconfig/flowpipe_pipeline.go | 1 + parse/pipeline_decode.go | 1 + 2 files changed, 2 insertions(+) diff --git a/modconfig/flowpipe_pipeline.go b/modconfig/flowpipe_pipeline.go index e095fc13..eeda78a8 100644 --- a/modconfig/flowpipe_pipeline.go +++ b/modconfig/flowpipe_pipeline.go @@ -543,6 +543,7 @@ type PipelineParam struct { Optional bool `json:"optional,omitempty"` Default cty.Value `json:"-"` Type cty.Type `json:"-"` + TypeString string `json:"type"` } func (p *PipelineParam) Equals(other *PipelineParam) bool { diff --git a/parse/pipeline_decode.go b/parse/pipeline_decode.go index 323edacc..ae8d8dbc 100644 --- a/parse/pipeline_decode.go +++ b/parse/pipeline_decode.go @@ -207,6 +207,7 @@ func decodePipelineParam(block *hcl.Block, parseCtx *ModParseContext) (*modconfi o.Description = ctyVal.AsString() } + o.TypeString = hclhelpers.CtyTypeToHclType(o.Type) return o, diags }