I have following terraform code with a policy that is overly permissive for resources.. I want to check this using Checkov custom yaml policy but I don't find a way to validate the json policy document that is part of resources. Is there a way to do it ?
name = "test_policy"
path = "/"
description = "My test policy"
# Terraform's "jsonencode" function converts a
# Terraform expression result to valid JSON syntax.
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = [
"ec2:Describe*",
]
Effect = "Allow"
Resource = "*"
},
]
})
}```
Disregard this, i am able to find the policy. For anybody who stops by here looking for a solution..
Thank you.