lots of nice tweaks
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user