You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"harness_platform_policy""test" {
identifier=harness_platform_policy.test.identifiername=harness_platform_policy.test.namedescription=harness_platform_policy.test.descriptionrego=<<-REGO package pipeline # Deny pipelines that don't have an approval step # NOTE: Try removing the HarnessApproval step from your input to see the policy fail deny[msg] { # Find all stages that are Deployments ... input.pipeline.stages[i].stage.type == "Approval" # ... that are not in the set of stages with HarnessApproval steps not stages_with_approval[i] # Show a human-friendly error message msg := sprintf("Approval stage '%s' does not have a HarnessApproval step", [input.pipeline.stages[i].stage.name]) } # Find the set of stages that contain a HarnessApproval step stages_with_approval[i] { input.pipeline.stages[i].stage.spec.execution.steps[_].step.type == "HarnessApproval" }REGO
}
Expected Behavior
It would be great if we could do something like this? :
resource"harness_platform_policy""test" {
identifier=harness_platform_policy.test.identifiername=harness_platform_policy.test.namedescription=harness_platform_policy.test.descriptiongit_connector_ref=connector-ref
git_default_branch=main
git_path=policies
git_repo=harness-policies
rego=<<-REGO # Not sure what to do about this, the API docs specify that this field is requiredREGO
}
References
The new policy UI supports remote policy stores like this:
The text was updated successfully, but these errors were encountered:
Summary
There is Harness API support for git as a policy store but not in the Harness terraform provider.
Would it be possible to implement this in the Harness terraform provider?
Terraform Version
not applicable
Affected Resource(s)
Terraform Configuration Files
Documentation example
Expected Behavior
It would be great if we could do something like this? :
References
The new policy UI supports remote policy stores like this:
The text was updated successfully, but these errors were encountered: