terraform fixes
This commit is contained in:
@@ -6,96 +6,3 @@ resource "aws_efs_file_system" "solr_storage" {
|
||||
Name = "solr_storage_${var.stage}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_ecs_task_definition" "solr" {
|
||||
count = var.enable_solr ? 1 : 0
|
||||
family = "solr_${var.stage}"
|
||||
container_definitions = file("${var.stage}-solr-taskdef.json")
|
||||
memory = 4096
|
||||
cpu = 1024
|
||||
network_mode = "awsvpc"
|
||||
requires_compatibilities = ["FARGATE"]
|
||||
execution_role_arn = var.execution_role_arn
|
||||
task_role_arn = var.task_role_arn
|
||||
|
||||
volume {
|
||||
name = "solr-storage"
|
||||
|
||||
efs_volume_configuration {
|
||||
file_system_id = aws_efs_file_system.solr_storage[0].id
|
||||
root_directory = "/"
|
||||
/*
|
||||
authorization_config {
|
||||
access_point_id = aws_efs_access_point.test.id
|
||||
iam = "ENABLED"
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resource "aws_ecs_service" "solr" {
|
||||
count = var.enable_solr ? 1 : 0
|
||||
name = "solr_app_${var.stage}"
|
||||
cluster = var.ecs_cluster
|
||||
task_definition = aws_ecs_task_definition.solr[0].arn
|
||||
desired_count = 1
|
||||
deployment_controller {
|
||||
type = "ECS"
|
||||
}
|
||||
scheduling_strategy = "REPLICA"
|
||||
platform_version = "LATEST"
|
||||
|
||||
network_configuration {
|
||||
assign_public_ip = true
|
||||
security_groups = [ "sg-004e5855310c453a3", "sg-02d167406b1082698"]
|
||||
subnets = [ "subnet-5e675761", "subnet-8519fde2", "subnet-89bab8d4" ]
|
||||
}
|
||||
|
||||
service_registries {
|
||||
container_port = 0
|
||||
port = 0
|
||||
registry_arn = aws_service_discovery_service.solr[0].arn
|
||||
}
|
||||
|
||||
capacity_provider_strategy {
|
||||
base = 1
|
||||
capacity_provider = "FARGATE"
|
||||
weight = 5
|
||||
}
|
||||
|
||||
deployment_circuit_breaker {
|
||||
enable = false
|
||||
rollback = false
|
||||
}
|
||||
|
||||
wait_for_steady_state = true
|
||||
|
||||
|
||||
timeouts {}
|
||||
lifecycle {
|
||||
ignore_changes = [task_definition]
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_service_discovery_service" "solr" {
|
||||
count = var.enable_solr ? 1 : 0
|
||||
name = "solr-${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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
resource "aws_instance" "solr_ec2" {
|
||||
count = var.enable_solr ? 1 : 0
|
||||
ami = data.aws_ami.amazon_linux_2023.id
|
||||
ami = "ami-0fea1219385942eb5"
|
||||
instance_type = "m7g.large"
|
||||
key_name = "http-proxy"
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"ID":"4830e4fa-f9d2-ffee-699c-ac27584f73c7","Operation":"OperationTypeApply","Info":"","Who":"noti@pop-os","Version":"1.14.9","Created":"2026-04-27T04:23:51.199937321Z","Path":"terraform.tfstate.d/staging/terraform.tfstate"}
|
||||
Reference in New Issue
Block a user