OLD - Building Custom Policies

📘

See Understanding Custom Policies for a conceptual explanation of Custom Policies in Bridgecrew Cloud.

Creating a Custom Policy

To build a Custom Policy:

  1. Under Policies, press New Policy.
1173

Policy Details, Name and Category

  1. Under Policy Details, enter the Policy Name and Guidelines and select a Category.
    The name and guidelines appear in Incidents based on this policy.
682

Severity Level

  1. Assign a Severity Level.
680

Associate with Benchmark (Optional)

  1. You also have the option of associating your custom Policy with one or more benchmark reports (see Compliance Reports). Choose the Benchmark and the section in which this Policy will appear within the report.
760

Resource Definition

  1. Under Resource Definition, select a Provider and Resource Type(s).
682

Define Policy Rule

  1. Under Definition, enter one or more row of Policy rules. Bridgecrew uses Terraform arguments to express configuration states. See further details and examples here.

📘

Note

You can also create multi-rule Policies. See details below.

507

Preview

  1. When you complete the rule, a preview appears.
1322

In the example shown below, the resource does not comply with the custom policy because its instance type is not micro.t3.

1325
  1. Press Save.

📘

Note

Your new Policy will be included in Bridgecrew Cloud's next scan.

Multi-Rule Policies

You can create Policies with multiple rules using the AND condition.
In the example shown below, the Policy would be use to ensure that a Resource can not be access via Internet or SSH.

1177

Editing a Custom Policy

Custom Policies can be viewed on the Policy Dashboard.
To edit a Custom Policy, hover over the date at the end of the Policy row and press Edit.

1280