Skip to content

Commit

Permalink
fix: Fix the GitHub complete example (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
skalinets committed May 9, 2022
1 parent a8328fc commit 47bd5d4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/github-complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Go to https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/settin
| <a name="input_alb_ingress_cidr_blocks"></a> [alb\_ingress\_cidr\_blocks](#input\_alb\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all ingress rules of the ALB - use your personal IP in the form of `x.x.x.x/32` for restricted testing | `list(string)` | n/a | yes |
| <a name="input_domain"></a> [domain](#input\_domain) | Route53 domain name to use for ACM certificate. Route53 zone for this domain should be created in advance | `string` | n/a | yes |
| <a name="input_github_owner"></a> [github\_owner](#input\_github\_owner) | Github owner | `string` | n/a | yes |
| <a name="input_github_repo_names"></a> [github\_repo\_names](#input\_github\_repo\_names) | List of Github repositories that should be monitored by Atlantis | `list(string)` | n/a | yes |
| <a name="input_github_token"></a> [github\_token](#input\_github\_token) | Github token | `string` | n/a | yes |
| <a name="input_github_user"></a> [github\_user](#input\_github\_user) | Github user for Atlantis to utilize when performing Github activities | `string` | n/a | yes |

Expand Down
4 changes: 2 additions & 2 deletions examples/github-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module "atlantis" {
# Atlantis
atlantis_github_user = var.github_user
atlantis_github_user_token = var.github_token
atlantis_repo_allowlist = ["github.com/${var.github_owner}/*"]
atlantis_repo_allowlist = [for repo in var.github_repo_names : "github.com/${var.github_owner}/${repo}"]

# ALB access
alb_ingress_cidr_blocks = var.alb_ingress_cidr_blocks
Expand All @@ -103,7 +103,7 @@ module "github_repository_webhook" {
github_owner = var.github_owner
github_token = var.github_token

atlantis_repo_allowlist = module.atlantis.atlantis_repo_allowlist
atlantis_repo_allowlist = var.github_repo_names

webhook_url = module.atlantis.atlantis_url_events
webhook_secret = module.atlantis.webhook_secret
Expand Down
1 change: 1 addition & 0 deletions examples/github-complete/terraform.tfvars.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ alb_ingress_cidr_blocks = ["x.x.x.x/32"]
github_owner = "myorg"
github_user = "atlantis"
github_token = "mygithubpersonalaccesstokenforatlantis"
github_repo_names = ["mycoolrepo1", "mycoolrepo2"]
6 changes: 6 additions & 0 deletions examples/github-complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ variable "github_user" {
description = "Github user for Atlantis to utilize when performing Github activities"
type = string
}

variable "github_repo_names" {
description = "List of Github repositories that should be monitored by Atlantis"
type = list(string)
}

0 comments on commit 47bd5d4

Please sign in to comment.