lots of nice tweaks

This commit is contained in:
Bryce Covert
2020-09-26 09:28:48 -07:00
parent 99d71ab8e5
commit 2c8213b18a
6 changed files with 296 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
variable "task_role_arn" {}
variable "execution_role_arn" {}
variable "ecs_cluster" {}
variable "service_registry" {}
variable "local_namespace" {}
variable "http_listener_sg" {
default = "sg-0024906e0e1f78048"
@@ -49,7 +49,7 @@ resource "aws_ecs_service" "integreat_app" {
service_registries {
container_port = 0
port = 0
registry_arn = "${var.service_registry}"
registry_arn = aws_service_discovery_service.service.arn
}
timeouts {}
@@ -216,3 +216,22 @@ resource "aws_acm_certificate" "cert" {
domain_name = "${var.domain}"
validation_method = "DNS"
}
resource "aws_service_discovery_service" "service" {
name = "integreat-app-${var.stage}"
dns_config {
namespace_id = var.local_namespace
dns_records {
ttl = 10
type = "A"
}
routing_policy = "MULTIVALUE"
}
health_check_custom_config {
failure_threshold = 1
}
}