Skip to main content

Pull request automation

Harness IaCM supports reviewing infrastructure changes via pull request automation. This functionality allows developers to see the changes, such as the plan details, as comments in the PR, so they can see what the resource changes will be before applying the plan. Additionally, Harness IaCM also supports Open Policy Agent (OPA) for more advanced policy enforcement.

Follow these steps to enable PR automation:

Create a pipeline similar to the way described in the provision workspace topic, and select "Pull Request" as the operation


Once the trigger is defined, create a PR in your git repository. You will see the trigger activation on the Trigger tab:

Resources

You will see the plan as a comment in the PR:

Resources

info

As a security measure, comments will not be populated if the repository is public. To override it, add the Environment Variable HARNESS_PASSWORD_API with the git repository token/secret set as the value.