Policy-as-code, similar to Infrastructure-as-code, is the concept of using declarative code to replace actions that require using a user interface. By representing policies in code, proven software development best practices can be adopted, such as version control, collaboration, and automation.
Once the Policy-as-code (PaC) mode is enabled, the only way to change the policies in your account is by publishing a YAML configuration file (policies.yaml) with the defined policies.
On the Settings page, toggle on the Policy-as-code switch.
To change the policies in your account you will need to update the policies configuration YAML file (policies.yaml) and publish it:
Once a new policy configuration file is published, it will override the existing policies set up in your account.
You can export your policies configurations via the dashboard or write a new policies configuration YAML file from scratch:
Delete the rule or comment out (#) from the rules list property