This template fetches the current AWS Organizations root ID, filters for service control policies, and retrieves a specific organizational policy by ID.

Terraform Template

data "aws_organizational_policies" "test" {
}

data "aws_organizations_organization" "current" {
}

data "aws_organizations_policies_for_target" "current" {
  filter = "SERVICE_CONTROL_POLICY"
  target_id = "data.aws_organizations_organization.current.roots[0].id"
}