Skip to content

Commit 49cdf6b

Browse files
committed
fix: 인스턴스에 user-data 추가
1 parent 09ce16e commit 49cdf6b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

terraform-db-migration/locals.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,9 @@ locals {
175175
key_name = "eatda-prod-jump-key"
176176
instance_type = "t3a.small"
177177
ami_id = "ami-012ea6058806ff688"
178+
user_data = <<-EOT
179+
#!/bin/bash
180+
echo ECS_CLUSTER=prod-cluster >> /etc/ecs/ecs.config
181+
EOT
178182
}
179183
}

terraform-db-migration/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ resource "aws_instance" "jump_host" {
170170

171171
vpc_security_group_ids = [module.migration_sg.security_group_ids["jump-host"]]
172172
associate_public_ip_address = true
173+
user_data = local.jump_host.user_data
173174

174175
tags = {
175176
Name = "eatda-jump-host-for-migration"

0 commit comments

Comments
 (0)