Skip to content

fix: Fix the GitHub Complete example #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}