Closed vandyliu closed 5 days ago
Customer wants to use isDevelopmentMode dynamically like so:
isDevelopmentMode
resource "astro_deployment" "team_1_dev_deployment" { # original_astro_runtime_version = "11.3.0" name = "team-1-dev-deployment3" description = "Team 1 Dev Deployment" type = "STANDARD" cloud_provider = "AWS" region = "us-east-1" contact_emails = [] default_task_pod_cpu = "0.25" default_task_pod_memory = "0.5Gi" executor = "CELERY" is_cicd_enforced = true is_dag_deploy_enabled = true is_development_mode = var.environment_name == "prd" ? true : false is_high_availability = false resource_quota_cpu = "10" resource_quota_memory = "20Gi" scheduler_size = "SMALL" workspace_id = astro_workspace.team_1_workspace.id environment_variables = [] worker_queues = [{ name = "default" is_default = true astro_machine = "A5" max_worker_count = 10 min_worker_count = 0 worker_concurrency = 1 }] scaling_spec = var.environment_name == "prd" ? null : { hibernation_spec = { schedules = [{ hibernate_at_cron = "1 * * * *" is_enabled = true wake_at_cron = "59 * * * *" }] } } } variable "environment_name" { type = string default = "prd" }
Our static validation does not allow this so I removed it.
Tested with isDevelopmentMode = [true, false] and scalingSpec = [null, ]
The only case that correctly fails is isDevelopmentMode=false and scalingSpec=
The other 3 cases correctly pass still
Note isDevelopment=true and scalingSpec=null is fine since users can update the scaling spec later
Description
Customer wants to use
isDevelopmentMode
dynamically like so:Our static validation does not allow this so I removed it.
🧪 Functional Testing
Tested with isDevelopmentMode = [true, false] and scalingSpec = [null,]
The only case that correctly fails is isDevelopmentMode=false and scalingSpec=
The other 3 cases correctly pass still
Note isDevelopment=true and scalingSpec=null is fine since users can update the scaling spec later