Skip to content

Commit

Permalink
Fill in variables + a few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbower committed Aug 10, 2020
1 parent 3596a82 commit 2b1abf8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ecs_api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ data "template_file" "api_service_container_definitions" {

vars = {
api_image_uri = "${aws_ecr_repository.api.repository_url}:${var.api_container_tag}"
api_image_uri = "${var.api_container_repo_url != "" ? var.api_container_repo_url : aws_ecr_repository.api.repository_url}:${var.api_container_tag}"
config_var_prefix = local.config_var_prefix
migrations_image_uri = "${aws_ecr_repository.migrations.repository_url}:${var.api_container_tag}"
migrations_image_uri = "${var.migrations_container_repo_url != "" ? var.migrations_container_repo_url : aws_ecr_repository.migrations.repository_url}:${var.api_container_tag}"
listening_port = var.api_listening_port
logs_service_name = aws_cloudwatch_log_group.api.name
log_group_region = var.aws_region
Expand Down
3 changes: 2 additions & 1 deletion ecs_push.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ data "template_file" "push_service_container_definitions" {

vars = {
config_var_prefix = local.config_var_prefix
image_uri = "${aws_ecr_repository.push.repository_url}:${var.push_container_tag}"

image_uri = "${var.push_container_repo_url != "" ? var.push_container_repo_url : aws_ecr_repository.push.repository_url}:${var.push_container_tag}"
listening_port = var.push_listening_port
logs_service_name = aws_cloudwatch_log_group.push.name
log_group_region = var.aws_region
Expand Down
22 changes: 22 additions & 0 deletions env-vars/deployables.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

authorizer_lambda_s3_bucket = ""
authorizer_lambda_s3_key = ""
callback_lambda_s3_bucket = ""
callback_lambda_s3_key = ""
cso_lambda_s3_bucket = ""
cso_lambda_s3_key = ""
exposures_lambda_s3_bucket = ""
exposures_lambda_s3_key = ""
settings_lambda_s3_bucket = ""
settings_lambda_s3_key = ""
stats_lambda_s3_bucket = ""
stats_lambda_s3_key = ""
token_lambda_s3_bucket = ""
token_lambda_s3_key = ""

push_container_repo_url = ""
api_container_repo_url = ""
migrations_container_repo_url = ""

push_container_tag = "latest"
api_container_tag = "latest"
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,30 @@ variable "stats_lambda_s3_bucket" {
default = ""
}

variable "api_container_repo_url" {
description = "ECR repo to be deployed into ECS for the API container"
type = string
default = ""
}

variable "migrations_container_repo_url" {
description = "ECR repo to be deployed into ECS for the Migration container"
type = string
default = ""
}

variable "api_container_tag" {
description = "ECR tag to be deployed into ECS for the API & Migration containers"
type = string
default = "latest"
}

variable "push_container_repo_url" {
description = "ECR repo to be deployed into ECS for the Push API container"
type = string
default = ""
}

variable "push_container_tag" {
description = "ECR tag to be deployed into ECS for the Push API container"
type = string
Expand Down

0 comments on commit 2b1abf8

Please sign in to comment.