Skip to content

Commit

Permalink
pass registry name to tfe_init (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
anniehedgpeth authored Nov 17, 2023
1 parent 608fb19 commit 5f49a0a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion modules/tfe_init/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ locals {
proxy_port = var.proxy_port
no_proxy = var.extra_no_proxy != null ? join(",", var.extra_no_proxy) : null

registry_username = var.registry_username
registry = var.registry
registry_password = var.registry_password
registry_username = var.registry_username
})
}
2 changes: 1 addition & 1 deletion modules/tfe_init/templates/tfe.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ apt-get --assume-yes autoremove

echo "[$(date +"%FT%T")] [Terraform Enterprise] Installing TFE FDO" | tee -a $log_pathname
hostname > /var/log/tfe-fdo.log
docker login -u="${registry_username}" -p="${registry_password}" quay.io
docker login -u="${registry_username}" -p="${registry_password}" ${registry}

export HOST_IP=$(hostname -i)

Expand Down
10 changes: 8 additions & 2 deletions modules/tfe_init/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,20 @@ variable "proxy_port" {
description = "Port that the proxy server will use"
}

variable "registry_username" {
variable "registry" {
default = null
description = "The username for the docker registry from which to pull the terraform_enterprise container images."
type = string
description = "The docker registry from which to source the terraform_enterprise container images."
}

variable "registry_password" {
default = null
description = "The password for the docker registry from which to pull the terraform_enterprise container images."
type = string
}

variable "registry_username" {
default = null
description = "The username for the docker registry from which to pull the terraform_enterprise container images."
type = string
}

0 comments on commit 5f49a0a

Please sign in to comment.