Skip to content

feat: Remove not used parameter atlantis_allowed_repo_names #221

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 5 commits into from
Feb 8, 2022

Conversation

snovikov
Copy link
Contributor

@snovikov snovikov commented Sep 15, 2021

Description

One of the parameters is not used and could be removed.

Motivation and Context

  • Remove variable which is actually not used in the module
  • Remove variable which corresponds to obsolete atlantis configuration (see --repo-whitelist) in atlantis-docs

Breaking Changes

  • This will remove input variable of main module atlantis_allowed_repo_names
  • This will rename output of main module: atlantis_allowed_repo_names -> atlantis_repo_allowlist
  • This will rename input varialbe of sub-modules: atlantis_allowed_repo_names -> atlantis_repo_allowlist

How Has This Been Tested?

  • I have tested and validated these changes using one or more of the provided examples/* projects
  • terraform plan in examples/github-complete

@snovikov snovikov changed the title Remove not used parameter atlantis_allowed_repo_names fix: Remove not used parameter atlantis_allowed_repo_names Sep 15, 2021
atlantis_github_user = var.github_user
atlantis_github_user_token = var.github_token
atlantis_repo_allowlist = ["github.com/${var.github_owner}/*"]
atlantis_allowed_repo_names = var.allowed_repo_names
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable is also used in the webhook sub-module - we will need to somehow accommodate that as well with this change otherwise it breaks the webhooks. even though atlantis doesn't use this param anymore, we still need to repo names for the webhooks

 # module.github_repository_webhook.github_repository_webhook.this[0] must be replaced
-/+ resource "github_repository_webhook" "this" {
      + etag       = (known after apply)
      ~ id         = "xxxxxxxxx" -> (known after apply)
      ~ repository = "scritchity-scratch" -> "github.com/clowdhaus/*" # forces replacement
      ~ url        = "https://api.github.com/repos/clowdhaus/scritchity-scratch/hooks/xxxxxxxxx" -> (known after apply)
        # (2 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryantbiggs thanks for your comment, but I think you are missing, that instead of atlantis_allowed_repo_names is removed, it is renamed to atlantis_repo_allowlist for consistency naming in submodules as well.

Please check this commit 3849654

Now both module and submodules are using the same naming and also the same list of repositories.

Is there any reason, that those two repository lists (white-list for atlantis + webhooked repositories) should be separated?

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't completely remove this variable since we need it (or something similar) for creating the webhooks

@snovikov snovikov requested a review from bryantbiggs January 13, 2022 08:59
@snovikov
Copy link
Contributor Author

@bryantbiggs please read my comments. this parameter is not removed.

@snovikov
Copy link
Contributor Author

Rebased to v3.8.0.

@antonbabenko antonbabenko changed the title fix: Remove not used parameter atlantis_allowed_repo_names feat: Remove not used parameter atlantis_allowed_repo_names Feb 8, 2022
@antonbabenko antonbabenko merged commit 6cbd47d into terraform-aws-modules:master Feb 8, 2022
antonbabenko pushed a commit that referenced this pull request Feb 8, 2022
## [3.9.0](v3.8.0...v3.9.0) (2022-02-08)

### Features

* Remove not used parameter `atlantis_allowed_repo_names` ([#221](#221)) ([6cbd47d](6cbd47d))
@antonbabenko
Copy link
Member

This PR is included in version 3.9.0 🎉

@antonbabenko
Copy link
Member

LGTM. I made this release as a minor (not patch) since it will replace a value in the outputs.

@snovikov snovikov deleted the fix-outputs branch February 8, 2022 14:41
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
titanlien pushed a commit to Flaconi/terraform-aws-atlantis that referenced this pull request Jun 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants