Skip to content

Commit a898983

Browse files
committed
fix: setup ssm agent.
1 parent 95c9109 commit a898983

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

terraform/ec2.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ resource "aws_instance" "bastion" {
2020
lifecycle {
2121
prevent_destroy = true
2222
}
23+
24+
user_data = <<-EOF
25+
#!/bin/bash
26+
yum update -y
27+
yum install -y amazon-ssm-agent
28+
systemctl enable amazon-ssm-agent
29+
systemctl start amazon-ssm-agent
30+
EOF
2331
}
2432

2533
resource "aws_security_group" "bastion_sg" {

0 commit comments

Comments
 (0)