diff --git a/main.tf b/main.tf index 6870e0d7..cefb08ed 100644 --- a/main.tf +++ b/main.tf @@ -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" diff --git a/variables.tf b/variables.tf index 36cc79ee..a5a0f4b0 100644 --- a/variables.tf +++ b/variables.tf @@ -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?" @@ -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." }