Data Source: scalr_policy_group

Retrieves the details of a policy group.

Example Usage

data "scalr_policy_group" "example1" {
  id         = "pgrp-xxxxxxxxxx"
  account_id = "acc-xxxxxxxxxx"

data "scalr_policy_group" "example2" {
  name       = "instance_types"
  account_id = "acc-xxxxxxxxxx"



  • account_id (String) The identifier of the Scalr account.
  • id (String) The identifier of a policy group.
  • name (String) The name of a policy group.


  • environments (List of String) A list of the environments the policy group is linked to.
  • error_message (String) An error details if Scalr failed to process the policy group.
  • opa_version (String) The version of the Open Policy Agent that the policy group is using.
  • policies (List of Object) A list of the OPA policies the policy group verifies each run. (see below for nested schema)
  • status (String) A system status of the policy group.
  • vcs_provider_id (String) The VCS provider identifier for the repository where the policy group resides. In the format vcs-<RANDOM STRING>.
  • vcs_repo (List of Object) Contains VCS-related meta-data for the policy group. (see below for nested schema)

Nested Schema for policies


  • enabled (Boolean) If set to false, the policy will not be verified on a run.
  • enforced_level (String) An enforcement level of a policy.
  • name (String) A name of a policy.

Nested Schema for vcs_repo


  • branch (String) A branch of a repository the policy group is associated with.
  • identifier (String) A reference to the VCS repository in the format :org/:repo, it stands for the organization and repository.
  • path (String) A subdirectory of a VCS repository where OPA policies are stored.