Skip to content

Commit 18437db

Browse files
authored
Move service config to separate file (#872)
1 parent 60934c7 commit 18437db

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

infra/{{app_name}}/app-config/env-config/outputs.tf

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,7 @@ output "domain_config" {
2121
}
2222

2323
output "service_config" {
24-
value = {
25-
service_name = "${var.app_name}-${var.environment}"
26-
region = var.default_region
27-
cpu = var.service_cpu
28-
memory = var.service_memory
29-
desired_instance_count = var.service_desired_instance_count
30-
enable_command_execution = var.enable_command_execution
31-
32-
extra_environment_variables = merge(
33-
local.default_extra_environment_variables,
34-
var.service_override_extra_environment_variables
35-
)
36-
37-
secrets = local.secrets
38-
39-
file_upload_jobs = {
40-
for job_name, job_config in local.file_upload_jobs :
41-
# For job configs that don't define a source_bucket, add the source_bucket config property
42-
job_name => merge({ source_bucket = local.bucket_name }, job_config)
43-
}
44-
45-
ephemeral_write_volumes = []
46-
}
24+
value = local.service_config
4725
}
4826

4927
output "identity_provider_config" {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
locals {
2+
service_config = {
3+
service_name = "${var.app_name}-${var.environment}"
4+
region = var.default_region
5+
cpu = var.service_cpu
6+
memory = var.service_memory
7+
desired_instance_count = var.service_desired_instance_count
8+
enable_command_execution = var.enable_command_execution
9+
10+
extra_environment_variables = merge(
11+
local.default_extra_environment_variables,
12+
var.service_override_extra_environment_variables
13+
)
14+
15+
secrets = local.secrets
16+
17+
file_upload_jobs = {
18+
for job_name, job_config in local.file_upload_jobs :
19+
# For job configs that don't define a source_bucket, add the source_bucket config property
20+
job_name => merge({ source_bucket = local.bucket_name }, job_config)
21+
}
22+
23+
ephemeral_write_volumes = []
24+
}
25+
}

0 commit comments

Comments
 (0)