Skip to main content

Create Policy

Overview

With StackGuardian, compliance for your workflows and Infrastructure as Code (IaC) is straightforward and flexible. Create custom policies tailored to your needs.

Creating and Implementing Policies

Step 1: Create Your First Policy

  1. Go to the Policy Sets tab, located under Develop tab.
  2. Click Create Policy +.
  3. Create your Policy by informing:
    • Policy Name
      • Policy ID: Auto-generated from the Policy Name. You can customize it using only letters, numbers, underscores (_), or dashes (-). This cannot be changed after creation.
    • Description
    • Tags

Step 2: Structuring Your Policy Rules

After selecting your policy:

  1. Visit the Rules section.
  2. Add a new rule with the following steps:
    • Name the rule with a valid slug and choose Marketplace Policy Template.
    • Find /stackguardian/aws-best-practices-all in the Policy Template field and select the latest version.
    • Set Action on pass to PASS and Action on fail to WARN.
    • Save your configuration.

Defining Actions and Approval Process

Specify what Actions to take based on policy evaluation:

  • Pass: The policy is compliant.
  • Warn: There may be issues with the policy.
  • Fail: The policy is non-compliant.
  • Approval Required: Manual approval is necessary.

For policies requiring Approval, define the approval process:

  • Choose the number of approvers from a pre-defined list, ranging from one to all.

Step 3: Policy Deployment

To apply your policy:

  1. Return to the Meta tab.
  2. In the Scope section, select the Workflow or Workflow Group to associate with this policy.

Keep track of active policies in the Overview section of your Workflow.

Fig: Create & Enforce New Policy (aws-best-practices)

info

Now you're all set to launch your workflow with robust policy enforcement.