Skip to content

Rego is a required field even when importing policy from git #1247

@andygreenoughLBG

Description

@andygreenoughLBG

Affected Resource(s)

harness_platform_policyset

Terraform Configuration Files

resource "harness_platform_policy" "example" {
  name       = "Example Pollicy"
  identifier = "example_policy"
  org_id            = var.org_id
  project_id        = var.project_id
  git_connector_ref = var.git_connector_id
  git_path          = ".harness/example_policy.rego"
  git_repo          = var.harness_policy_repo
  git_branch        = "main"
  git_import        = true
}

Expected Behaviour

When using git import in platform_policy resource block you should not need to provide rego as an input.

Actual Behaviour

If you try and use the above block it should be expected to work as the rego is already written and based in git but as rego is not an included input this fails due to the provider insisting on rego as a required input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions