Skip to content

Commit 6cbd47d

Browse files
authored
feat: Remove not used parameter atlantis_allowed_repo_names (#221)
1 parent bc9c79b commit 6cbd47d

File tree

16 files changed

+24
-39
lines changed

16 files changed

+24
-39
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ module "atlantis" {
102102
103103
custom_environment_variables = [
104104
{
105-
"name" : "ATLANTIS_REPO_CONFIG_JSON",
106-
"value" : jsonencode(yamldecode(file("${path.module}/server-atlantis.yaml"))),
105+
name : "ATLANTIS_REPO_CONFIG_JSON",
106+
value : jsonencode(yamldecode(file("${path.module}/server-atlantis.yaml"))),
107107
},
108108
]
109109
@@ -297,7 +297,6 @@ allow_github_webhooks = true
297297
| <a name="input_allow_unauthenticated_access"></a> [allow\_unauthenticated\_access](#input\_allow\_unauthenticated\_access) | Whether to create ALB listener rule to allow unauthenticated access for certain CIDR blocks (eg. allow GitHub webhooks to bypass OIDC authentication) | `bool` | `false` | no |
298298
| <a name="input_allow_unauthenticated_access_priority"></a> [allow\_unauthenticated\_access\_priority](#input\_allow\_unauthenticated\_access\_priority) | ALB listener rule priority for allow unauthenticated access rule | `number` | `10` | no |
299299
| <a name="input_allow_unauthenticated_webhook_access_priority"></a> [allow\_unauthenticated\_webhook\_access\_priority](#input\_allow\_unauthenticated\_webhook\_access\_priority) | ALB listener rule priority for allow unauthenticated webhook access rule | `number` | `15` | no |
300-
| <a name="input_atlantis_allowed_repo_names"></a> [atlantis\_allowed\_repo\_names](#input\_atlantis\_allowed\_repo\_names) | Git repositories where webhook should be created | `list(string)` | `[]` | no |
301300
| <a name="input_atlantis_bitbucket_base_url"></a> [atlantis\_bitbucket\_base\_url](#input\_atlantis\_bitbucket\_base\_url) | Base URL of Bitbucket Server, use for Bitbucket on prem (Stash) | `string` | `""` | no |
302301
| <a name="input_atlantis_bitbucket_user"></a> [atlantis\_bitbucket\_user](#input\_atlantis\_bitbucket\_user) | Bitbucket username that is running the Atlantis command | `string` | `""` | no |
303302
| <a name="input_atlantis_bitbucket_user_token"></a> [atlantis\_bitbucket\_user\_token](#input\_atlantis\_bitbucket\_user\_token) | Bitbucket token of the user that is running the Atlantis command | `string` | `""` | no |
@@ -399,7 +398,7 @@ allow_github_webhooks = true
399398
| <a name="output_alb_https_listeners_id"></a> [alb\_https\_listeners\_id](#output\_alb\_https\_listeners\_id) | Ids of alb https listeners |
400399
| <a name="output_alb_security_group_id"></a> [alb\_security\_group\_id](#output\_alb\_security\_group\_id) | Security group of alb |
401400
| <a name="output_alb_zone_id"></a> [alb\_zone\_id](#output\_alb\_zone\_id) | Zone ID of alb |
402-
| <a name="output_atlantis_allowed_repo_names"></a> [atlantis\_allowed\_repo\_names](#output\_atlantis\_allowed\_repo\_names) | Git repositories where webhook should be created |
401+
| <a name="output_atlantis_repo_allowlist"></a> [atlantis\_repo\_allowlist](#output\_atlantis\_repo\_allowlist) | Git repositories where webhook should be created |
403402
| <a name="output_atlantis_url"></a> [atlantis\_url](#output\_atlantis\_url) | URL of Atlantis |
404403
| <a name="output_atlantis_url_events"></a> [atlantis\_url\_events](#output\_atlantis\_url\_events) | Webhook events URL of Atlantis |
405404
| <a name="output_ecs_cluster_arn"></a> [ecs\_cluster\_arn](#output\_ecs\_cluster\_arn) | ECS cluster ARN |

examples/github-complete/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ Go to https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/settin
6161
| Name | Description | Type | Default | Required |
6262
|------|-------------|------|---------|:--------:|
6363
| <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 |
64-
| <a name="input_allowed_repo_names"></a> [allowed\_repo\_names](#input\_allowed\_repo\_names) | Repositories that Atlantis will listen for events from and a webhook will be installed | `list(string)` | n/a | yes |
6564
| <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 |
6665
| <a name="input_github_owner"></a> [github\_owner](#input\_github\_owner) | Github owner | `string` | n/a | yes |
6766
| <a name="input_github_token"></a> [github\_token](#input\_github\_token) | Github token | `string` | n/a | yes |
@@ -71,7 +70,7 @@ Go to https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/settin
7170

7271
| Name | Description |
7372
|------|-------------|
74-
| <a name="output_atlantis_allowed_repo_names"></a> [atlantis\_allowed\_repo\_names](#output\_atlantis\_allowed\_repo\_names) | Git repositories where webhook should be created |
73+
| <a name="output_atlantis_repo_allowlist"></a> [atlantis\_repo\_allowlist](#output\_atlantis\_repo\_allowlist) | Git repositories where webhook should be created |
7574
| <a name="output_atlantis_url"></a> [atlantis\_url](#output\_atlantis\_url) | URL of Atlantis |
7675
| <a name="output_ecs_task_definition"></a> [ecs\_task\_definition](#output\_ecs\_task\_definition) | Task definition for ECS service (used for external triggers) |
7776
| <a name="output_github_webhook_secret"></a> [github\_webhook\_secret](#output\_github\_webhook\_secret) | Github webhook secret |

examples/github-complete/main.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ module "atlantis" {
7272
trusted_principals = ["ssm.amazonaws.com"]
7373

7474
# Atlantis
75-
atlantis_github_user = var.github_user
76-
atlantis_github_user_token = var.github_token
77-
atlantis_repo_allowlist = ["github.com/${var.github_owner}/*"]
78-
atlantis_allowed_repo_names = var.allowed_repo_names
75+
atlantis_github_user = var.github_user
76+
atlantis_github_user_token = var.github_token
77+
atlantis_repo_allowlist = ["github.com/${var.github_owner}/*"]
7978

8079
# ALB access
8180
alb_ingress_cidr_blocks = var.alb_ingress_cidr_blocks
@@ -102,7 +101,7 @@ module "github_repository_webhook" {
102101
github_owner = var.github_owner
103102
github_token = var.github_token
104103

105-
atlantis_allowed_repo_names = module.atlantis.atlantis_allowed_repo_names
104+
atlantis_repo_allowlist = module.atlantis.atlantis_repo_allowlist
106105

107106
webhook_url = module.atlantis.atlantis_url_events
108107
webhook_secret = module.atlantis.webhook_secret

examples/github-complete/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ output "atlantis_url" {
44
value = module.atlantis.atlantis_url
55
}
66

7-
output "atlantis_allowed_repo_names" {
7+
output "atlantis_repo_allowlist" {
88
description = "Git repositories where webhook should be created"
9-
value = module.atlantis.atlantis_allowed_repo_names
9+
value = module.atlantis.atlantis_repo_allowlist
1010
}
1111

1212
output "task_role_arn" {

examples/github-complete/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ variable "github_user" {
2222
description = "Github user for Atlantis to utilize when performing Github activities"
2323
type = string
2424
}
25-
26-
variable "allowed_repo_names" {
27-
description = "Repositories that Atlantis will listen for events from and a webhook will be installed"
28-
type = list(string)
29-
}

examples/github-repository-webhook/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module "github_repository_webhook" {
1818
#
1919
# This assumes that you are the owner of these repositories and they are available at:
2020
# https://github.com/mygithubusername/awesome-repo and https://github.com/mygithubusername/another-awesome-repo
21-
atlantis_allowed_repo_names = data.terraform_remote_state.atlantis.outputs.atlantis_allowed_repo_names
21+
atlantis_repo_allowlist = data.terraform_remote_state.atlantis.outputs.atlantis_repo_allowlist
2222

2323
webhook_url = element(data.terraform_remote_state.atlantis.outputs.github_webhook_urls, 0)
2424
webhook_secret = data.terraform_remote_state.atlantis.outputs.github_webhook_secret

examples/gitlab-repository-webhook/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module "gitlab_repository_webhook" {
1515
gitlab_base_url = var.gitlab_base_url
1616

1717
# Fetching these attributes from created already Atlantis Terraform state file
18-
atlantis_allowed_repo_names = data.terraform_remote_state.atlantis.outputs.atlantis_allowed_repo_names
19-
webhook_url = data.terraform_remote_state.atlantis.outputs.atlantis_url_events
20-
webhook_secret = data.terraform_remote_state.atlantis.outputs.webhook_secret
18+
atlantis_repo_allowlist = data.terraform_remote_state.atlantis.outputs.atlantis_repo_allowlist
19+
webhook_url = data.terraform_remote_state.atlantis.outputs.atlantis_url_events
20+
webhook_secret = data.terraform_remote_state.atlantis.outputs.webhook_secret
2121
}

modules/github-repository-webhook/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ No modules.
2828

2929
| Name | Description | Type | Default | Required |
3030
|------|-------------|------|---------|:--------:|
31-
| <a name="input_atlantis_allowed_repo_names"></a> [atlantis\_allowed\_repo\_names](#input\_atlantis\_allowed\_repo\_names) | List of names of repositories which belong to the owner specified in `github_owner` | `list(string)` | n/a | yes |
31+
| <a name="input_atlantis_repo_allowlist"></a> [atlantis\_repo\_allowlist](#input\_atlantis\_repo\_allowlist) | List of names of repositories which belong to the owner specified in `github_owner` | `list(string)` | n/a | yes |
3232
| <a name="input_create_github_repository_webhook"></a> [create\_github\_repository\_webhook](#input\_create\_github\_repository\_webhook) | Whether to create Github repository webhook for Atlantis | `bool` | `true` | no |
3333
| <a name="input_github_base_url"></a> [github\_base\_url](#input\_github\_base\_url) | Github base URL to use when creating webhook (when using GitHub Enterprise) | `string` | `null` | no |
3434
| <a name="input_github_owner"></a> [github\_owner](#input\_github\_owner) | Github owner to use when creating webhook | `string` | `""` | no |

modules/github-repository-webhook/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ provider "github" {
55
}
66

77
resource "github_repository_webhook" "this" {
8-
count = var.create_github_repository_webhook ? length(var.atlantis_allowed_repo_names) : 0
8+
count = var.create_github_repository_webhook ? length(var.atlantis_repo_allowlist) : 0
99

10-
repository = var.atlantis_allowed_repo_names[count.index]
10+
repository = var.atlantis_repo_allowlist[count.index]
1111

1212
configuration {
1313
url = var.webhook_url

modules/github-repository-webhook/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ variable "github_owner" {
2222
default = ""
2323
}
2424

25-
variable "atlantis_allowed_repo_names" {
25+
variable "atlantis_repo_allowlist" {
2626
description = "List of names of repositories which belong to the owner specified in `github_owner`"
2727
type = list(string)
2828
}

0 commit comments

Comments
 (0)