File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -833,6 +833,8 @@ func getVariable(tfVariable map[string]interface{}) Variable {
833833}
834834
835835func getSourceDefinition (tfSourceDef map [string ]interface {}) interface {} {
836+ const defaultFilterValue = ""
837+
836838 if val := tfSourceDef ["log_query_variable_source_definition" ].([]interface {}); len (val ) == 1 {
837839 logQuerySourceDef := val [0 ].(map [string ]interface {})
838840 return LogQueryVariableSourceDefinition {
@@ -842,9 +844,13 @@ func getSourceDefinition(tfSourceDef map[string]interface{}) interface{} {
842844 }
843845 } else if val := tfSourceDef ["metadata_variable_source_definition" ].([]interface {}); len (val ) == 1 {
844846 metadataSourceDef := val [0 ].(map [string ]interface {})
847+ filter , hasFilter := metadataSourceDef ["filter" ].(string )
848+ if ! hasFilter {
849+ filter = defaultFilterValue
850+ }
845851 return MetadataVariableSourceDefinition {
846852 VariableSourceType : "MetadataVariableSourceDefinition" ,
847- Filter : metadataSourceDef [ " filter" ].( string ) ,
853+ Filter : filter ,
848854 Key : metadataSourceDef ["key" ].(string ),
849855 }
850856 } else if val := tfSourceDef ["csv_variable_source_definition" ].([]interface {}); len (val ) == 1 {
You can’t perform that action at this time.
0 commit comments