Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ github/
*.ovpn

*.zip

**/account-map
6 changes: 6 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## `argocd-github-repo` Component PR [#17](https://github.com/cloudposse-terraform-components/aws-argocd-github-repo/pull/17)

Corrected the spelling of "succeded" to "succeeded" in the `on-deploy-succeded` notification. As a result, both components (`argocd-github-repo` and `eks/argocd`) need to be updated to make this change.

See the [PR for eks/argocd](https://github.com/cloudposse-terraform-components/aws-eks-argocd/pull/16)

## Components PR [#851](https://github.com/cloudposse/terraform-aws-components/pull/851)

This is a bug fix and feature enhancement update. There are few actions necessary to upgrade.
Expand Down
7 changes: 4 additions & 3 deletions src/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/context.tf
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ variable "descriptor_formats" {
Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
Expand Down
1 change: 1 addition & 0 deletions src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ resource "github_branch_protection" "default" {
dismiss_stale_reviews = true
restrict_dismissals = true
require_code_owner_reviews = true
pull_request_bypassers = var.bypass_pull_request_actors
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/provider-github.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
locals {
github_token = local.enabled ? coalesce(var.github_token_override, data.aws_ssm_parameter.github_api_key[0].value) : ""
github_token = local.enabled ? (
var.use_local_github_credentials ? null : coalesce(var.github_token_override, data.aws_ssm_parameter.github_api_key[0].value)
) : ""
}

data "aws_ssm_parameter" "github_api_key" {
count = local.enabled ? 1 : 0
count = local.enabled && !var.use_local_github_credentials ? 1 : 0
name = var.ssm_github_api_key
with_decryption = true
}
Expand Down
16 changes: 14 additions & 2 deletions src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ variable "github_notifications" {
default = [
"notifications.argoproj.io/subscribe.on-deploy-started.app-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-started.argocd-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-succeded.app-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-succeded.argocd-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-succeeded.app-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-succeeded.argocd-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-failed.app-repo-github-commit-status: \"\"",
"notifications.argoproj.io/subscribe.on-deploy-failed.argocd-repo-github-commit-status: \"\"",
]
Expand All @@ -197,3 +197,15 @@ variable "web_commit_signoff_required" {
description = "Require contributors to sign off on web-based commits"
default = false
}

variable "bypass_pull_request_actors" {
type = list(string)
description = "List of GitHub usernames and team slugs that can bypass pull request requirements"
default = []
}

variable "use_local_github_credentials" {
type = bool
description = "Use local GitHub credentials from environment variables instead of SSM"
default = false
}
4 changes: 0 additions & 4 deletions src/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@ terraform {
source = "hashicorp/tls"
version = ">= 3.0"
}
random = {
source = "hashicorp/random"
version = ">= 2.3"
}
}
}