Skip to content

Commit

Permalink
upgrading config variables schema to conform with the latest podman c…
Browse files Browse the repository at this point in the history
…hanges
  • Loading branch information
jkerry committed Feb 19, 2024
1 parent c2f8d87 commit f1ea87f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
40 changes: 23 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,30 +168,36 @@ module "tfe_init_fdo" {
registry_password = var.registry == "images.releases.hashicorp.com" ? var.hc_license : var.registry_password
registry_username = var.registry_username

docker_compose_yaml = module.docker_compose_config[0].docker_compose_yaml
container_runtime_engine = var.container_runtime_engine
tfe_image = var.tfe_image
podman_kube_yaml = module.runtime_container_engine_config[0].podman_kube_yaml
docker_compose_yaml = module.runtime_container_engine_config[0].docker_compose_yaml
}

# ------------------------------------------------------------------------------------
# Docker Compose File Config for TFE on instance(s) using Flexible Deployment Options
# ------------------------------------------------------------------------------------
module "docker_compose_config" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/docker_compose_config?ref=main"
module "runtime_container_engine_config" {
source = "git::https://github.com/hashicorp/terraform-random-tfe-utility//modules/runtime_container_engine_config?ref=main"
count = var.is_replicated_deployment ? 0 : 1

license_reporting_opt_out = var.license_reporting_opt_out
hostname = module.load_balancer.fqdn
capacity_concurrency = var.capacity_concurrency
capacity_cpu = var.capacity_cpu
capacity_memory = var.capacity_memory
disk_path = local.disk_mode ? var.disk_path : null
iact_subnets = join(",", var.iact_subnet_list)
iact_time_limit = var.iact_subnet_time_limit
operational_mode = local.active_active ? "active-active" : var.production_type
run_pipeline_image = var.run_pipeline_image
tfe_image = var.tfe_image
tfe_license = var.hc_license
tls_ciphers = var.tls_ciphers
tls_version = var.tls_version
license_reporting_opt_out = var.license_reporting_opt_out
hostname = module.load_balancer.fqdn
capacity_concurrency = var.capacity_concurrency
capacity_cpu = var.capacity_cpu
capacity_memory = var.capacity_memory
disk_path = local.disk_mode ? var.disk_path : null
iact_subnets = join(",", var.iact_subnet_list)
iact_time_limit = var.iact_subnet_time_limit
operational_mode = local.active_active ? "active-active" : var.production_type
run_pipeline_image = var.run_pipeline_image
tfe_image = var.tfe_image
tfe_license = var.hc_license
tls_ciphers = var.tls_ciphers
tls_version = var.tls_version
metrics_endpoint_enabled = var.metrics_endpoint_enabled
metrics_endpoint_port_http = var.metrics_endpoint_port_http
metrics_endpoint_port_https = var.metrics_endpoint_port_https

cert_file = "/etc/ssl/private/terraform-enterprise/cert.pem"
key_file = "/etc/ssl/private/terraform-enterprise/key.pem"
Expand Down
12 changes: 11 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ variable "friendly_name_prefix" {
description = "(Required) Name prefix used for resources"
}

variable "container_runtime_engine" {
default = "docker"
type = string
description = "The container runtime engine to run the FDO container on. Default is docker."
validation {
condition = contains(["docker", "podman"], var.container_runtime_engine)
error_message = "Supported values for container_runtime_enginer are docker and podman."
}
}

variable "distribution" {
type = string
description = "(Required) What is the OS distribution of the instance on which Terraoform Enterprise will be deployed?"
Expand Down Expand Up @@ -944,7 +954,7 @@ variable "iact_subnet_time_limit" {
}

variable "metrics_endpoint_enabled" {
default = null
default = false
type = bool
description = "(Optional) Metrics are used to understand the behavior of Terraform Enterprise and to troubleshoot and tune performance. Enable an endpoint to expose container metrics. Defaults to false."
}
Expand Down

0 comments on commit f1ea87f

Please sign in to comment.