From: Cássio Gabriel Date: Mon, 26 Jan 2026 13:03:40 +0000 (-0300) Subject: Add script launch into the EC2 instance and update README X-Git-Url: http://ec2-54-166-230-229.compute-1.amazonaws.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63433d5e9ada4b79134cf41b161d7298a269a3db;p=cloud-security-assessment.git Add script launch into the EC2 instance and update README --- diff --git a/assessment/README.md b/assessment/README.md index 3242c1d..2f6b87a 100644 --- a/assessment/README.md +++ b/assessment/README.md @@ -37,6 +37,7 @@ $ cd assessment/terraform $ terraform init $ terraform apply ``` +>The EC2 instance uses Terraform `user_data` to automatically execute `setup.sh` at first boot, installing Docker and deploying the Wazuh stack without manual intervention. >Initial startup of the Wazuh environment may take ~1 minute or more due to indexer initialization --- diff --git a/assessment/terraform/main.tf b/assessment/terraform/main.tf index 33092c5..d7282f8 100644 --- a/assessment/terraform/main.tf +++ b/assessment/terraform/main.tf @@ -169,6 +169,9 @@ resource "aws_instance" "wazuh" { associate_public_ip_address = false + # Lauching script.sh into the instance + user_data = file("${path.module}/../scripts/setup.sh") + tags = { Name = "wazuh-ec2" }