質問編集履歴

2

誤字

2022/02/26 04:31

投稿

coldplay
coldplay

スコア25

test CHANGED
File without changes
test CHANGED
@@ -90,4 +90,4 @@
90
90
  }
91
91
  ```
92
92
 
93
- terraformの設定で間違っている箇所があるのでしょうか
93
+ terraformの設定で間違っている箇所があるのでしょうか?

1

追記

2022/02/26 04:21

投稿

coldplay
coldplay

スコア25

test CHANGED
File without changes
test CHANGED
@@ -58,6 +58,36 @@
58
58
  registry_arn = aws_service_discovery_service.sd_api.arn
59
59
  }
60
60
  }
61
+
62
+ //フロントコンテナ定義
63
+
64
+ resource "aws_ecs_service" "front_container" {
65
+ name = "front_container"
66
+ cluster = aws_ecs_cluster.cluster.arn
67
+ task_definition = aws_ecs_task_definition.front_container.arn
68
+ desired_count = 1
69
+ launch_type = "FARGATE"
70
+ platform_version = "1.4.0"
71
+ health_check_grace_period_seconds = 60
72
+
73
+ network_configuration {
74
+ assign_public_ip = false
75
+ security_groups = [
76
+ module.front_sg.security_group_id,
77
+ ]
78
+
79
+ subnets = [
80
+ aws_subnet.private-1a.id,
81
+ aws_subnet.private-1c.id
82
+ ]
83
+ }
84
+
85
+ load_balancer {
86
+ target_group_arn = aws_lb_target_group.front_container.arn
87
+ container_name = "front_container"
88
+ container_port = 8080
89
+ }
90
+ }
61
91
  ```
62
92
 
63
93
  terraformの設定で間違っている箇所があるのでしょうか?