From 8ee0eb09950f32dbb90d334701c2bc48b38fdcd2 Mon Sep 17 00:00:00 2001 From: etwillbefine Date: Tue, 15 Sep 2020 21:54:49 +0200 Subject: [PATCH] allow to set git username specifically required for bitbucket app passwords to work --- main.tf | 2 +- variables.tf | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 92fe5bc..a1e635a 100644 --- a/main.tf +++ b/main.tf @@ -29,7 +29,7 @@ module "atlantis_server" { vc_type = var.git_type organization = var.git_organization encrypted_token = var.git_token - encrypted_user = "goci-atlantis-bot" + encrypted_user = var.git_app_username encrypted_secret = random_password.secret.result server_role_trusted_arns = [format("arn:aws:iam::%s:role/%s", var.aws_identity_account_id, var.aws_trusted_role_name)] server_role_policy_statements = var.aws_server_role_policies diff --git a/variables.tf b/variables.tf index c8921a9..9c07eb9 100644 --- a/variables.tf +++ b/variables.tf @@ -77,6 +77,12 @@ variable "git_organization" { description = "Organization or Group to allow Webhooks from and create Resources in" } +variable "git_app_username" { + type = string + default = "goci-atlantis-bot" + description = "Git User/App Name used for Authentication. Required for BitBucket App Passwords" +} + variable "repositories" { type = list(object({ name = string, create = bool, private = bool, branch_protection = bool })) description = "List of Repositories and additional Repository Configuration"