Skip to content

Automerge

Automerge can be used to automatically merge the pull request after all directories have been successfully applied.

Configuration

Automerge is configured in the .terrateam/config.yml file under the automerge key. Here’s the default configuration:

automerge:
enabled: false
delete_branch: false

Enabled

The enabled key is used to specify whether automerge is enabled or not.

KeyTypeDescription
enabledBooleanSpecifies whether automerge is enabled. Default is false.

Delete branch

The delete_branch key is used to specify whether the source branch should be deleted after a successful apply and git merge.

KeyTypeDescription
delete_branchBooleanDelete the source branch after a successful apply and git merge. Default is false.

Examples

Enable automerge

automerge:
enabled: true

This configuration will enable automerge, automatically merging the pull request after all directories have been successfully applied.

Enable automerge and delete branch

automerge:
enabled: true
delete_branch: true

This configuration will enable automerge and delete the source branch after a successful apply and git merge.

Considerations

When enabling automerge, keep the following in mind:

  • Automerge will only trigger after all directories in the pull request have been successfully applied.
  • If any directory fails to apply, automerge will not be triggered.
  • Automerge will respect any branch protection rules configured in your repository. If a pull request cannot be merged due to branch protection rules, automerge will not force the merge.
  • If delete_branch is enabled, the source branch will only be deleted if the merge is successful.
We use cookies and similar technologies to provide certain features, enhance the user experience and deliver content that is relevant to your interests. Depending on their purpose, analysis and marketing cookies may be used in addition to technically necessary cookies. By clicking on "Agree and continue", you declare your consent to the use of the aforementioned cookies. Here you can make detailed settings or revoke your consent (in part if necessary) with effect for the future. For further information, please refer to our Privacy Policy .