- Added system detection logic to handle different OS types (Linux, macOS, Windows). - Enhanced user creation logic to support non-root execution and proper ownership. - Updated directory creation to use dynamic home paths based on detected OS. - Improved Git configuration and metadata capture with error handling. - Modularized system package installation based on OS type. - Streamlined Node.js, Python, and Rust setup scripts with error handling. - Updated shell configuration to include dynamic aliases and environment info script. - Deprecated `devcontainer_image` variable in favor of `devcontainer_repo_url` for better repository management. - Adjusted Terraform workspace configuration to support new repository URL and caching options.
119 lines
3.8 KiB
HCL
119 lines
3.8 KiB
HCL
# =============================================================================
|
|
# Terraform Outputs
|
|
# Expose important values for reference and external use
|
|
# =============================================================================
|
|
|
|
# =============================================================================
|
|
# Workspace Information
|
|
# =============================================================================
|
|
|
|
output "workspace_id" {
|
|
description = "Unique identifier for the Coder workspace"
|
|
value = local.workspace_id
|
|
}
|
|
|
|
output "workspace_name" {
|
|
description = "Name of the Coder workspace"
|
|
value = data.coder_workspace.me.name
|
|
}
|
|
|
|
output "workspace_owner" {
|
|
description = "Owner of the Coder workspace"
|
|
value = data.coder_workspace_owner.me.name
|
|
}
|
|
|
|
output "container_name" {
|
|
description = "Name of the main development container"
|
|
value = local.container_name
|
|
}
|
|
|
|
# =============================================================================
|
|
# Git Configuration
|
|
# =============================================================================
|
|
|
|
output "git_author_name" {
|
|
description = "Git author name configured for the workspace"
|
|
value = local.git_author_name
|
|
}
|
|
|
|
output "git_author_email" {
|
|
description = "Git author email configured for the workspace"
|
|
value = local.git_author_email
|
|
sensitive = true
|
|
}
|
|
|
|
output "repository_url" {
|
|
description = "Repository URL that will be cloned"
|
|
value = local.repo_url
|
|
}
|
|
|
|
# =============================================================================
|
|
# Service Connection Information
|
|
# =============================================================================
|
|
|
|
output "postgres_connection_url" {
|
|
description = "PostgreSQL connection URL for applications"
|
|
value = data.coder_parameter.enable_services.value ? local.postgres_url : null
|
|
sensitive = true
|
|
}
|
|
|
|
output "redis_connection_url" {
|
|
description = "Redis connection URL for applications"
|
|
value = data.coder_parameter.enable_services.value ? local.redis_url : null
|
|
sensitive = true
|
|
}
|
|
|
|
output "qdrant_api_url" {
|
|
description = "Qdrant vector database API URL"
|
|
value = data.coder_parameter.enable_services.value ? local.qdrant_url : null
|
|
}
|
|
|
|
|
|
# =============================================================================
|
|
# Network Information
|
|
# =============================================================================
|
|
|
|
output "docker_network_name" {
|
|
description = "Name of the Docker network for service communication"
|
|
value = docker_network.workspace.name
|
|
}
|
|
|
|
output "workspace_volume_name" {
|
|
description = "Name of the persistent workspace volume"
|
|
value = docker_volume.workspaces.name
|
|
}
|
|
|
|
# =============================================================================
|
|
# Development Environment Information
|
|
# =============================================================================
|
|
|
|
output "development_tools" {
|
|
description = "Information about installed development tools"
|
|
value = {
|
|
node_version = var.node_version
|
|
python_version = var.python_version
|
|
container_image = docker_image.devcontainer.name
|
|
git_repo_url = var.devcontainer_repo_url
|
|
}
|
|
}
|
|
|
|
output "service_status" {
|
|
description = "Status of optional development services"
|
|
value = {
|
|
services_enabled = data.coder_parameter.enable_services.value
|
|
ai_tools_enabled = data.coder_parameter.enable_ai_tools.value
|
|
pgadmin_enabled = var.enable_pgadmin
|
|
jupyter_enabled = var.enable_jupyter
|
|
}
|
|
}
|
|
|
|
# =============================================================================
|
|
# Access Information
|
|
# =============================================================================
|
|
|
|
output "external_ports" {
|
|
description = "External ports exposed for services"
|
|
value = data.coder_parameter.enable_services.value ? {
|
|
pgadmin = var.enable_pgadmin ? var.pgadmin_port : null
|
|
} : {}
|
|
} |