Add script launch into the EC2 instance and update README master
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 26 Jan 2026 13:03:40 +0000 (10:03 -0300)
committerCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 26 Jan 2026 13:03:40 +0000 (10:03 -0300)
assessment/README.md
assessment/terraform/main.tf

index 3242c1dc845e9de99e6aa6a30b703d442a9d5516..2f6b87a8d47a855266c28cdebebd731463f011dd 100644 (file)
@@ -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
 ---
 
index 33092c5be35e9e2c6dc22c6c363069910f80eb8d..d7282f8edc5bcec5cde512f95e635ffcc054499a 100644 (file)
@@ -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"
   }