Skip to content

Commit

Permalink
Merge pull request #60 from goci-io/chore
Browse files Browse the repository at this point in the history
feat: allow to set automerge config for atlantis
  • Loading branch information
etwillbefine authored May 7, 2020
2 parents 0056e92 + 10a9a0c commit ddaa29d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ You either need to provide an already configured Github provider and inject it u

##### Example [Atlantis](https://www.runatlantis.io/guide/) configuration for the repo level config:
```hcl
atlantis_enable_automerge = true|false # defaults to true
atlantis_workspaces = [
{
name = "staging"
Expand Down
1 change: 1 addition & 0 deletions atlantis.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module "initial_atlantis_commit" {
target = "atlantis.yaml"
data = {
workspaces = local.atlantis_workspaces
auto_merge = var.atlantis_enable_automerge
projects = length(var.atlantis_projects) < 1 ? [local.atlantis_default_project] : var.atlantis_projects
}
}
Expand Down
1 change: 1 addition & 0 deletions templates/atlantis.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: 3
automerge: ${auto_merge}
projects:
%{ for workspace in workspaces ~}
%{ for project in projects ~}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ variable "atlantis_webhook_secret" {
description = "Webhook secret to use for atlantis. It must be the same secret for all repositories"
}

variable "atlantis_enable_automerge" {
type = bool
default = true
description = "Automatically merge branch one all plans all applied"
}

variable "atlantis_sync_changes" {
type = bool
default = true
Expand Down

0 comments on commit ddaa29d

Please sign in to comment.