tfe_sentinel_policy

Sentinel Policy as Code is an embedded policy as code framework integrated with Terraform Enterprise.

Policies are configured on a per-organization level and are organized and grouped into policy sets, which define the workspaces on which policies are enforced during runs.

Example Usage

Basic usage:

resource "tfe_sentinel_policy" "test" {
  name         = "my-policy-name"
  description  = "This policy always passes"
  organization = "my-org-name"
  policy       = "main = rule { true }"
  enforce_mode = "hard-mandatory"
}

Argument Reference

The following arguments are supported:

Attributes Reference

Import

Sentinel policies can be imported; use <ORGANIZATION NAME>/<POLICY ID> as the import ID. For example:

terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR