Open ninjaSec7 opened 2 years ago
I'm not a rep from fugue but I was able to access resource changes by first importing data.fugue
and then I was able to use fugue.plan.resource_changes
to access the changes. Here's a snippet of a rule which returns a set with all resource changes that have the delete action
resource_changes_with_delete_action = delete_resource_changes {
resource_changes = fugue.plan.resource_changes
delete_resource_changes = { resource_change | resource_change := resource_changes[_]; "delete" in resource_change.change.actions }
}
@Muhammada3178 it gave me the error with unexpected ident token: expected \n or ; or }
Describe the bug In some of the resources during the plan some input values we get (known after apply) value , In all those cases we fail some of the checks and in those cases we wanted to grab those details from resource_changes section in the plan output how that can be achieved ?
I was trying to take the after_unknown values from terraform json plan but was not able to get those resource I was trying below commands
Sometimes in our
tfplan.json
we have some values in after_unknown which falls under resource_changes key, as a result sometimes regula gives false positive results as well.So I need a way or workaround that we can look into resource_changes of tfplan.json so that we can grab after_unknown values as well and write custom policy too.
One of such policy I was trying to modify is below but it always pass no matter what the tfplan looks like kindly help 🙇