Skip to content

Commit

Permalink
use 'wget cwagent' command in ec2 terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
jj22ee committed Mar 16, 2024
1 parent 7c49826 commit a826bd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion terraform/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ resource "null_resource" "remote_service_setup" {
"echo $agent_config > amazon-cloudwatch-agent.json",

# Get and run CW agent rpm
"${var.get_cw_agent_rpm_command}",
"${var.get_cw_agent_rpm_command}",
"sudo rpm -U ./cw-agent.rpm",
"sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:./amazon-cloudwatch-agent.json",

Expand Down
4 changes: 2 additions & 2 deletions terraform/python/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "null_resource" "main_service_setup" {
"echo $agent_config > amazon-cloudwatch-agent.json",

# Get and run CW agent rpm
"wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.us-east-1.amazonaws.com/amazon_linux/amd64/1.300033.0b462/amazon-cloudwatch-agent.rpm",
"${var.get_cw_agent_rpm_command}",
"sudo rpm -U ./cw-agent.rpm",
"sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:./amazon-cloudwatch-agent.json",

Expand Down Expand Up @@ -191,7 +191,7 @@ resource "null_resource" "remote_service_setup" {
"echo $agent_config > amazon-cloudwatch-agent.json",

# Get and run CW agent rpm
"wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.us-east-1.amazonaws.com/amazon_linux/amd64/1.300033.0b462/amazon-cloudwatch-agent.rpm",
"${var.get_cw_agent_rpm_command}",
"sudo rpm -U ./cw-agent.rpm",
"sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:./amazon-cloudwatch-agent.json",

Expand Down

0 comments on commit a826bd5

Please sign in to comment.