Highlight an IaC resource, right-click, and select RegoEditor: Generate Config.
Select the IaC engine this template uses (e.g. terraform, cft, k8s, etc.). This generates a normalized JSON file including the highlighted resource and its parameters.
Right-click the normalized JSON file and select RegoEditor: Generate Rego. This creates a rule JSON and a Rego file.
Update relevant fields on the Rule JSON file according to your policy.
Update the Rego file to enforce your policy.
Right-click the Rego file and click on RegoEditor: Scan to test your policy.
This extension supports multiple configuration options. To view the settings, open the command palette (Ctrl + Shift + P for Windows or CMD + Shift + P on Mac OS) and search for RegoEditor: Configuration.
From the configuration menu you should be able to customize:
The counter suffixed to policies
The default cloud provider
Whether to show the helper text on newly created Rego files