Skip to content

Commit

Permalink
add assign_public_ip and docker_container_entrypoint vars
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkotof committed Jan 13, 2022
1 parent 8448d1b commit 6e70211
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 6 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ module "service" {
cpu = var.cpu
memory = var.memory
volumes = local.volumes
assign_public_ip = var.assign_public_ip
subnets = var.private_subnets
security_groups = var.security_groups

Expand All @@ -127,10 +128,11 @@ module "service" {
autoscale_target_value_cpu = var.autoscale_target_value_cpu
autoscale_target_value_memory = var.autoscale_target_value_memory

docker_container_command = var.docker_container_command
docker_image_name = var.docker_image_name != "" ? var.docker_image_name : "${var.docker_registry}/${var.namespace}-${var.name}"
docker_image_tag = var.docker_image_tag
iam_role_policy_statement = var.iam_role_policy_statement
docker_container_entrypoint = var.docker_container_entrypoint
docker_container_command = var.docker_container_command
docker_image_name = var.docker_image_name != "" ? var.docker_image_name : "${var.docker_registry}/${var.namespace}-${var.name}"
docker_image_tag = var.docker_image_tag
iam_role_policy_statement = var.iam_role_policy_statement

app_secrets = var.app_secrets
global_secrets = var.global_secrets
Expand Down
15 changes: 14 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ variable "vpc_id" {
description = "AWS VPC ID"
}

variable "assign_public_ip" {
type = bool
description = "ECS service network configuration - assign public IP"
default = false
}

variable "alb_security_groups" {
type = list(any)
description = "Security groups to assign to ALB"
Expand All @@ -251,7 +257,8 @@ variable "alb_security_groups" {

variable "docker_registry" {
type = string
description = "ERC docker registry"
description = "ECR or any other docker registry"
default = "docker.io"
}

# It should include registry, e.g. hashicorp/terraform
Expand All @@ -273,6 +280,12 @@ variable "docker_container_port" {
default = 3000
}

variable "docker_container_entrypoint" {
type = list(string)
description = "Docker container entrypoint"
default = []
}

variable "docker_container_command" {
type = list(string)
description = "Docker container command"
Expand Down

0 comments on commit 6e70211

Please sign in to comment.