Apply Requirements
Apply Requirements allows for the specification of when an Apply operation can be performed on a pull request that has not been merged.
Terrateam Configuration
Terrateam behavior can be configured via a config.yml
. This file is located in
a directory named .terrateam
at the root of your Terraform repository:
.terrateam/config.yml
.
See Configuration documentation for details.
Configuration
Top-level key: apply_requirements
See Configuration Reference documentation for details.
Key | Type | Description |
---|---|---|
checks | Checks | Configuration for the apply requirement checks. |
create_pending_apply_check | Boolean | Create status checks for pending applies. Default is true . |
Default configuration:
apply_requirements:
checks:
approved:
enabled: false
count: 1
merge_conflicts:
enabled: true
status_checks:
enabled: true
ignore_matching: []
create_pending_apply_check: true
The apply_requirements
configuration is only evaluated for pull requests that
are not merged.
Checks
Key | Type | Description |
---|---|---|
approved | Approved | Configuration for pull request approval. |
merge_conflicts | Merge Conflicts | Configuration for merge conflicts. |
status_checks | Status Checks | Configuration for status checks. |
Approved
Requires that the pull request has received a certain number of approvals.
Key | Type | Description |
---|---|---|
enabled | Boolean | If the check is enabled. Default is false . |
count | Integer | Number of approvals needed to pass. Default is 1 . |
Merge Conflicts
Requires that the pull request has no merge conflicts.
Key | Type | Description |
---|---|---|
enabled | Boolean | If the check is enabled. Default is true . |
Status Checks
Requires that all status checks associated with the pull request have passed.
Key | Type | Description |
---|---|---|
enabled | Boolean | If the check is enabled. Default is true . |
ignore_matching | List | List of regex to match against names of checks to ignore. |
Pending Apply Check
The create_pending_apply_check
configuration will create a GitHub status check on the pull request for each Dirspace that is marked as pending
. Each check is only marked as complete
when the Apply operation has executed for the Dirspace. This mode of operation is to prevent a pull request from being merged before all Apply operations have been executed.
If a Dirspace has Autoapply set to true
, a status check is not created for the Dirspace. Enabling Autoapply means that the Apply operation is performed after the pull request has been merged, so Terrateam does not want to prevent the pull request from being merged.