Skip to content

Commit

Permalink
fix(terraform): pass legacy_environment to fix secrets/parameter mi…
Browse files Browse the repository at this point in the history
…smatch (#217)
  • Loading branch information
JoshuaLicense authored Aug 5, 2024
1 parent af2cf06 commit 124e0fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions infra/terraform/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ module "service" {

environment = "dev"

legacy_environment = "DEV"

domain_name = "dev.olcs.dev-dvsacloud.uk"
assets_version = var.assets_version

Expand Down
2 changes: 2 additions & 0 deletions infra/terraform/environments/int/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ module "service" {

environment = "int"

legacy_environment = "QA"

domain_name = "qa.olcs.dev-dvsacloud.uk"
assets_version = var.assets_version

Expand Down
1 change: 1 addition & 0 deletions infra/terraform/modules/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
| <a name="input_batch"></a> [batch](#input\_batch) | Configuration for the batch process | <pre>object({<br> version = string<br> repository = string<br> subnet_ids = list(string)<br> task_iam_role_statements = list(object({<br> effect = string<br> actions = list(string)<br> resources = list(string)<br> }))<br> jobs = list(object({<br> name = string<br> commands = list(string)<br> cpu = optional(number, 1)<br> memory = optional(number, 2048)<br> timeout = optional(number, 300)<br> }))<br> })</pre> | n/a | yes |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | The domain name for the environment | `string` | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | The environment to deploy to | `string` | n/a | yes |
| <a name="input_legacy_environment"></a> [legacy\_environment](#input\_legacy\_environment) | The legacy environment to deploy use | `string` | n/a | yes |
| <a name="input_services"></a> [services](#input\_services) | The services to deploy | <pre>map(object({<br> version = string<br> repository = string<br> cpu = number<br> memory = number<br> task_iam_role_statements = list(object({<br> effect = string<br> actions = list(string)<br> resources = list(string)<br> }))<br> add_cdn_url_to_env = optional(bool, false)<br> lb_listener_arn = string<br> listener_rule_priority = optional(number, 10)<br> listener_rule_host_header = optional(string, "*")<br> security_group_ids = list(string)<br> subnet_ids = list(string)<br> vpc_id = optional(string, null)<br> }))</pre> | `{}` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC ID | `string` | n/a | yes |

Expand Down
2 changes: 1 addition & 1 deletion infra/terraform/modules/service/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module "ecs_service" {
[
{
name = "ENVIRONMENT_NAME"
value = var.environment
value = var.legacy_environment
},
{
name = "APP_VERSION"
Expand Down
5 changes: 5 additions & 0 deletions infra/terraform/modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ variable "environment" {
description = "The environment to deploy to"
}

variable "legacy_environment" {
type = string
description = "The legacy environment to deploy use"
}

variable "domain_name" {
type = string
description = "The domain name for the environment"
Expand Down

0 comments on commit 124e0fc

Please sign in to comment.