Skip to content

Commit

Permalink
feat(misconf): export unresolvable field of IaC types to Rego
Browse files Browse the repository at this point in the history
Signed-off-by: nikpivkin <[email protected]>
  • Loading branch information
nikpivkin committed Oct 18, 2024
1 parent 35fd018 commit 6d02645
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/iac/rego/schemas/cloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -7884,6 +7884,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "boolean"
}
Expand Down Expand Up @@ -7916,6 +7919,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "string"
}
Expand Down Expand Up @@ -7948,6 +7954,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "integer"
}
Expand Down Expand Up @@ -7980,6 +7989,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "object"
}
Expand Down Expand Up @@ -8011,6 +8023,9 @@
},
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -8041,6 +8056,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "string"
}
Expand Down Expand Up @@ -8073,6 +8091,9 @@
"startline": {
"type": "integer"
},
"unresolvable": {
"type": "boolean"
},
"value": {
"type": "string"
}
Expand Down
1 change: 1 addition & 0 deletions pkg/iac/types/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (m *Metadata) ToRego() any {
"sourceprefix": m.Range().GetSourcePrefix(),
"managed": m.isManaged,
"explicit": m.isExplicit,
"unresolvable": m.isUnresolvable,
"fskey": CreateFSKey(m.Range().GetFS()),
"resource": m.Reference(),
}
Expand Down

0 comments on commit 6d02645

Please sign in to comment.