terraform-aws-modules / terraform-aws-atlantis

Terraform module to deploy Atlantis on AWS Fargate 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/atlantis/aws
Apache License 2.0
520 stars 351 forks source link

atlantis_repo_allowlist format for Atlantis and the github_repository_webhooks #384

Closed d33psky closed 9 months ago

d33psky commented 9 months ago

Description

In https://github.com/terraform-aws-modules/terraform-aws-atlantis/blob/master/examples/github-complete/main.tf in module "atlantis" the ATLANTIS_REPO_ALLOWLIST environment variable is created from value = join(",", var.atlantis_repo_allowlist) with variable atlantis_repo_allowlist in https://github.com/terraform-aws-modules/terraform-aws-atlantis/blob/master/examples/github-complete/terraform.tfvars.sample#L7 being my-repo (which can be anything).

The main example on https://github.com/terraform-aws-modules/terraform-aws-atlantis states value = "github.com/terraform-aws-modules/*" which agrees with Atlantis documentation at https://github.com/runatlantis/atlantis/blob/main/runatlantis.io/docs/server-configuration.md#--repo-allowlist stating we need github.com/MyOrg/RepoName style syntax.

But in https://github.com/terraform-aws-modules/terraform-aws-atlantis/blob/master/examples/github-complete/main.tf module "github_repository_webhooks" the same var.atlantis_repo_allowlist is used. However in this location it must be of the form RepoName, and not github.com/MyOrg/RepoName.

Reproduction Code [Required]

Follow the https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/github-complete example code.

Expected behavior

Both the ATLANTIS_REPO_ALLOWLIST environment variable for Atlantis gets filled with syntax it requires as well as the github_repository_webhooks with (the different) syntax that it requires.

Actual behavior

When using the github.com/MyOrg/RepoName style syntax in atlantis_repo_allowlist the webhook part throws errors like Error: POST https://api.github.com/repos/Org/github.com/Org/RepoName/hooks: 404 Not Found [] Note the double github.com and Org in that URL.

bryantbiggs commented 9 months ago

I'm not sure what is being pointed out here - please provide a reproduction if there is an error, but for now this appears working as intended

github-actions[bot] commented 8 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.