Fields marked as Required must be set. Optional fields have sensible defaults shown below.
digger.yml file at the root level of your repo.
digger-filename input at GitHub Action level.
Complete Configuration Example
Complete Configuration Example
Top-level Configuration
Allows collecting anonymised usage and debugging data.
Automatically merge pull requests when all checks pass.
The merge strategy to use while automerging. Possible values:
squash, merge (for merge commits), and rebase. Currently only GitHub supported.Enable PR-level locking to prevent concurrent operations on the same project.
Enables Digger to delete previous comments to reduce noise in the PR.
Enable traversal of nested directories to discover projects.
Allow Digger to run on draft pull requests.
Automatically run apply after a pull request is merged.
Respect project layers when determining execution order. See layering for details.
Disable the
digger apply comment prompt after successful plan.Disable the status check that verifies apply was executed.
Allow bot comments from these GitHub user IDs. Example:
trusted_appIDs: [41898282] for GitHub Actions.How to render plan output in comments. Options:
basic, detailed.Mention projects that have drifted from the target state in PR comments.
Include Terraform outputs in the PR comment after apply.
List of projects to manage. See Project Configuration.
Generate projects from a directory structure. See GenerateProjects Configuration.
Workflows and configurations to run on events. See Workflow Configuration.
Reporting Configuration
Reporting Configuration
Configure reporting options using the
reporting key.Enable AI-generated summaries of plan output. See AI Summaries.
Enable posting plan/apply results as PR comments.
Dependency Configuration
Dependency Configuration
Configure dependency handling using the
dependency_configuration key.Dependency execution mode:
hard- Execute dependency projects even if they weren’t changedsoft- Skip dependency projects if they weren’t changed
Project Configuration
Define individual projects using theprojects array.
Name of the project. Must be unique across all projects.
Directory containing the Terraform/OpenTofu/Terragrunt code, relative to the repository root.
The target branch to match this project on. Defaults to the repository’s default branch when not set.
An alternative name for the project, useful for referencing in commands.
List of requirements that must be met before apply can run. Options:
approved, mergeable, undiverged. See apply requirements for details.Terraform workspace to use for this project.
Whether to use Terragrunt for this project.
Whether to use OpenTofu instead of Terraform.
Whether to use Pulumi for this project.
The Pulumi stack to use when
pulumi: true.Name of the workflow to use for this project.
Name of the GitHub Actions workflow file for this project.
Enable drift detection for this project. See Drift Detection.
Layer number for controlling execution order when
respect_layers is enabled. Lower layers execute first.List of directory glob patterns to include as dependencies, e.g.,
["../modules/**"]. See Include / Exclude Patterns.List of directory glob patterns to exclude, e.g.,
[".terraform/**"]. See Include / Exclude Patterns.List of project names that must complete before this project. Does not force terraform run, but affects the order of commands for projects modified in the current PR.
AWS Role Configuration
AWS Role Configuration
Configure AWS role assumption using the
aws_role_to_assume key.AWS region used when performing STS web identity calls.
ARN of the IAM role to assume for state backend operations. If only
state is set, it will also be used for commands.ARN of the IAM role to assume for Terraform commands (plan/apply). If only
command is set, it will also be used for state.AWS Cognito OIDC Configuration
AWS Cognito OIDC Configuration
Configure AWS Cognito OIDC authentication using the
aws_cognito_oidc key.The AWS account ID where the Cognito Identity Pool is located.
The AWS region for the Cognito Identity Pool.
The Cognito Identity Pool ID for federated authentication.
Session duration in seconds for the assumed role credentials.
GenerateProjects Configuration
Automatically generate projects from directory structure using thegenerate_projects key.
Glob pattern to include directories for project generation.
Glob pattern to exclude directories from project generation.
Whether to use Terragrunt for generated projects.
List of blocks for more granular project generation. See Block Configuration.
Terragrunt-specific parsing configuration. See Terragrunt Parsing for all options.
Default AWS role configuration for all generated projects. See AWS Role Configuration.
Default AWS Cognito OIDC configuration for all generated projects. See AWS Cognito OIDC Configuration.
Block Configuration
Block Configuration
Blocks allow you to define multiple project generation rules with different settings.
Name of the block for identification.
Glob pattern to include directories. Only for Terraform and OpenTofu.
Glob pattern to exclude directories. Only for Terraform and OpenTofu.
List of directory glob patterns to include as dependencies for generated projects.
List of directory glob patterns to exclude from generated projects.
Workflow to use for projects in this block.
Name of the GitHub Actions workflow file for projects in this block.
Terraform workspace to use for projects in this block.
Whether to use Terragrunt for projects in this block.
Root directory for Terragrunt projects. Only for Terragrunt.
Whether to use OpenTofu for projects in this block.
Terragrunt-specific parsing configuration for this block. See Terragrunt Parsing.
AWS role configuration for projects in this block.
AWS Cognito OIDC configuration for projects in this block.
Workflow Configuration
Define custom workflows using theworkflows map. Each workflow can have its own environment variables, plan/apply stages, and event configurations.
Environment variables to set per stage. See EnvVars Configuration.
Plan stage configuration. See Stage Configuration.
Apply stage configuration. See Stage Configuration.
Describes how to react to CI events. See WorkflowConfiguration.
EnvVars Configuration
EnvVars Configuration
Configure environment variables for different stages using the Each environment variable object has:
env_vars key.Environment variables to set for terraform init stage. Useful for setting different credentials for remote backend.
Environment variables to set for other terraform commands. Useful for setting different credentials for managed infrastructure.
Name of the environment variable to set.
Direct value for the environment variable. Takes preference over
value_from if both are set.Name of another environment variable to get the value from. Useful for secrets—set a secret from a secret manager (e.g., GitHub secrets) as an environment variable, then remap it to another variable.
Stage Configuration (plan/apply)
Stage Configuration (plan/apply)
Configure plan and apply stages.
Regular expression to filter which files trigger this stage.
List of steps to run during this stage. See Step Configuration.
Step Configuration
Step Configuration
Steps can be terraform commands or custom shell commands.Terraform commands (With extra arguments:Custom shell commands:
init, plan, apply):Terraform init step. Can be a string
init or an object with extra_args.Terraform plan step. Can be a string
plan or an object with extra_args.Terraform apply step. Can be a string
apply or an object with extra_args.Shell command to run.
Shell to use for the run command (e.g.,
bash, zsh).Extra arguments to pass to terraform init/plan/apply.
WorkflowConfiguration
WorkflowConfiguration
Configure how the workflow responds to CI events.
Commands to run when a pull request is created or updated. Options:
digger plan, digger apply, digger lock, digger unlock.Commands to run when a pull request is closed.
Commands to run when a pull request is converted to draft.
Commands to run when a commit is pushed to the default branch.
Allow this workflow to skip mergeability checks and run digger commands.
Default Workflow
A default workflow is created automatically if you don’t specify any workflows in the configuration:Workflow Configuration Explanation
Workflow configuration describes how to react to CI events. It has 4 sections:- on_pull_request_pushed - describes what to do when a pull request is created or updated
- on_pull_request_closed - describes what to do when a pull request is closed
- on_pull_request_to_draft - describes what to do when a pull request is converted to draft
- on_commit_to_default - describes what to do when a pull request is merged into the default branch
Projects
A project in Digger corresponds to a directory containing Terraform code. Projects are treated as standalone independent entities with their own locks. Digger will not prevent you from running plan and apply in different projects simultaneously. You can run plan / apply in a specified project by using the-p option in a GitHub PR comment:

