File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ locals {
8484 essential = true
8585 stopTimeout = lookup (def, " stop_timeout" , var. default_stop_timeout )
8686
87+ command = svc == " api-dev" ? [
88+ " java" ,
89+ " -Dspring.profiles.active=dev" ,
90+ " -jar" ,
91+ " /api.jar"
92+ ] : null
93+
8794 portMappings = [
8895 for idx , port in def . container_port : {
8996 name = " ${ svc } -${ port } -tcp"
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ resource "aws_ecs_service" "dev" {
2525 rollback = true
2626 }
2727
28+ lifecycle {
29+ ignore_changes = [task_definition ]
30+ }
31+
2832 tags = merge (var. tags , {
2933 Service = each.key
3034 })
31- }
35+ }
Original file line number Diff line number Diff line change @@ -16,4 +16,8 @@ output "ecs_api_service_name" {
1616
1717output "ecs_api_container_name" {
1818 value = module. ecs . container_names [" api-dev" ]
19- }
19+ }
20+
21+ output "ec2_private_ip" {
22+ value = module. ec2 . private_ip
23+ }
Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ locals {
7272 essential = true
7373 stopTimeout = lookup (def, " stop_timeout" , var. default_stop_timeout )
7474
75+ command = svc == " api-prod" ? [
76+ " java" ,
77+ " -Dspring.profiles.active=prod" ,
78+ " -jar" ,
79+ " /api.jar"
80+ ] : null
81+
7582 portMappings = [
7683 for idx , port in def . container_port : {
7784 name = " ${ svc } -${ port } -tcp"
You can’t perform that action at this time.
0 commit comments