@@ -19,31 +19,31 @@ resource "aws_iam_role_policy_attachment" "ecs_task_execution_role_attach" {
1919# ###############################################################################
2020
2121# Backend Prod
22- # module "python_backend_prod" {
23- # source = "./python_backend"
22+ module "python_backend_prod" {
23+ source = " ./python_backend"
2424
25- # env = "prod"
26- # vpc_id = data.aws_vpc.use2.id
27- # logs_group = aws_cloudwatch_log_group.ecslogs.name
28- # ecs_cluster_id = module.ecs.cluster_id
29- # task_execution_role = data.aws_iam_role.ecs_task_execution_role.arn
30- # image_tag = "latest"
31- # }
25+ env = " prod"
26+ vpc_id = data. aws_vpc . use2 . id
27+ logs_group = aws_cloudwatch_log_group. ecslogs . name
28+ ecs_cluster_id = module. ecs . cluster_id
29+ task_execution_role = data. aws_iam_role . ecs_task_execution_role . arn
30+ image_tag = " latest"
31+ }
3232
33- # resource "aws_lb_listener_rule" "python_backend_prod" {
34- # listener_arn = aws_lb_listener.default_https.arn
33+ resource "aws_lb_listener_rule" "python_backend_prod" {
34+ listener_arn = aws_lb_listener. default_https . arn
3535
36- # action {
37- # type = "forward"
38- # target_group_arn = module.python_backend_prod.lb_tg_arn
39- # }
36+ action {
37+ type = " forward"
38+ target_group_arn = module. python_backend_prod . lb_tg_arn
39+ }
4040
41- # condition {
42- # host_header {
43- # values = ["backend.operationcode.org", "api.operationcode.org"]
44- # }
45- # }
46- # }
41+ condition {
42+ host_header {
43+ values = [" backend.operationcode.org" , " api.operationcode.org" ]
44+ }
45+ }
46+ }
4747
4848# Backend Staging
4949# module "python_backend_staging" {
@@ -92,8 +92,6 @@ resource "aws_lb_listener_rule" "shutdown_sites_redirector" {
9292 values = [
9393 " resources.operationcode.org" ,
9494 " resources-staging.operationcode.org" ,
95- " api.operationcode.org" ,
96- " backend.operationcode.org" ,
9795 " api.staging.operationcode.org" ,
9896 ]
9997 }
0 commit comments