Skip to content

Commit

Permalink
Add with support for EdgeAndNodeProvider blocks. #2772
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidaguerre committed Nov 22, 2022
1 parent f4d0e56 commit a3e461f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/steampipeconfig/parse/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func decodeEdgeAndNodeProvider(block *hcl.Block, parseCtx *ModParseContext) (mod
}

// handle invalid block types
res.addDiags(validateBlocks(remain.(*hclsyntax.Body), EdgeAndNodeProviderBlockSchema, resource))
res.addDiags(validateBlocks(remain.(*hclsyntax.Body), EdgeAndNodeProviderSchema, resource))

// decode the body into 'resource' to populate all properties that can be automatically decoded
diags = gohcl.DecodeBody(remain, parseCtx.EvalCtx, resource)
Expand Down
12 changes: 2 additions & 10 deletions pkg/steampipeconfig/parse/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,17 +308,9 @@ var EdgeAndNodeProviderSchema = &hcl.BodySchema{
Type: "category",
LabelNames: []string{"name"},
},
},
}

// EdgeAndNodeProviderBlockSchema is used to validate child blocks
var EdgeAndNodeProviderBlockSchema = &hcl.BodySchema{
Blocks: []hcl.BlockHeaderSchema{
{
Type: "param",
},
{
Type: "category",
Type: "with",
LabelNames: []string{"name"},
},
},
}
Expand Down

0 comments on commit a3e461f

Please sign in to comment.