Skip to main content
Version: Next

Wazuh on Aruba Cloud

Deploy Wazuh — an open-source SIEM, XDR, and CSPM platform — on Aruba Cloud using Terraform and cloud-init. This example provisions a single-node all-in-one deployment using the official Wazuh quick-install script.

Provider version: arubacloud/arubacloud ~> 1.0 | Terraform: ≥ 1.9


Introduction​

Wazuh is a unified security platform that combines a SIEM (Security Information and Event Management) system, XDR (Extended Detection and Response), and CSPM (Cloud Security Posture Management) into a single solution. The all-in-one deployment bundles:

  • Wazuh Indexer — OpenSearch-based log indexing and alerting engine
  • Wazuh Manager — Agent management, rule correlation, and threat detection
  • Wazuh Dashboard — Kibana-based web UI for alerts, compliance, and investigation

Resource requirements: Wazuh is resource-intensive. The minimum for a usable all-in-one deployment is 8 vCPU / 16 GB RAM and 200 GB disk. Do not attempt to deploy on a smaller VM — the OpenSearch indexer will OOM and fail.

Bootstrap time: The installer downloads and configures multiple components. Expect 20–30 minutes before the dashboard is accessible.


Architecture Overview​


Infrastructure Created​

ResourceName patternDescription
arubacloud_projectwazuh-prodProject container
arubacloud_vpcwazuh-prod-vpcVirtual Private Cloud
arubacloud_subnetwazuh-prod-subnetBasic subnet
arubacloud_securitygroupwazuh-prod-vm-sgSecurity group
arubacloud_securityrulewazuh-prod-vm-sshSSH ingress
arubacloud_securityrulewazuh-prod-vm-dashboardHTTPS dashboard TCP 443
arubacloud_securityrulewazuh-prod-vm-agent-eventsAgent events TCP 1514
arubacloud_securityrulewazuh-prod-vm-agent-enrollAgent enrollment TCP 1515
arubacloud_elasticipwazuh-prod-vm-eipVM public IP
arubacloud_blockstoragewazuh-prod-boot200 GB boot disk (Performance)
arubacloud_keypairwazuh-prod-keypairSSH public key
arubacloud_cloudserverwazuh-prod-vmCloudServer VM

Estimated Monthly Cost​

ResourceSpecEst. cost/mo
CloudServer VMCSO8A16 — 8 vCPU / 16 GB~€95
Boot disk200 GB Performance~€30
Elastic IP—~€3
Total~€128/mo

Requirements​

  • Terraform ≥ 1.9
  • ArubaCloud Terraform Provider ~> 1.0
  • An ArubaCloud account with OAuth2 API credentials
  • An SSH key pair

Variables​

Required​

VariableDescription
arubacloud_client_idArubaCloud OAuth2 client ID
arubacloud_client_secretArubaCloud OAuth2 client secret
ssh_public_keySSH public key content
admin_passwordWazuh dashboard admin password (min 8 chars, must include upper, lower, digit, special)

Optional​

VariableDefaultDescription
app_name"wazuh"Short name used in all resource names
environment"prod"Environment label
location"ITBG-Bergamo"ArubaCloud region
zone"ITBG-1"Availability zone
billing_period"Hour""Hour" or "Month"
vm_flavor"CSO8A16"CloudServer flavor (8 vCPU / 16 GB minimum)
vm_image"LU22-001"Boot disk image (Ubuntu 22.04 LTS)
vm_disk_size_gb200Boot disk size in GB (min 50 GB)
ssh_cidr"0.0.0.0/0"CIDR for SSH — restrict in production
admin_cidr"0.0.0.0/0"CIDR for HTTPS dashboard — always restrict
agent_cidr"0.0.0.0/0"CIDR for agent ports 1514/1515

Outputs​

OutputDescription
dashboard_urlWazuh dashboard HTTPS URL
vm_public_ipPublic IP address of the VM
ssh_commandSSH command to connect to the VM
agent_manager_ipManager IP to configure in agent ossec.conf

Deployment Instructions​

1. Clone and navigate​

git clone https://github.com/arubacloud/terraform-arubacloud-examples.git
cd terraform-arubacloud-examples/wazuh

2. Configure variables​

cp terraform.tfvars.example terraform.tfvars

Set credentials, a strong admin password, and restrict CIDRs:

admin_password = "Ch@ngeMe2024!"
admin_cidr = "203.0.113.42/32"
agent_cidr = "10.0.0.0/8"
ssh_cidr = "203.0.113.42/32"

3. Deploy​

terraform init
terraform plan
terraform apply

Terraform apply completes in ~2 minutes (VM provisioned). The Wazuh bootstrap continues in the background for 20–30 minutes. Monitor progress:

ssh ubuntu@$(terraform output -raw vm_public_ip)
sudo tail -f /var/log/wazuh-install.log

4. Access the dashboard​

terraform output dashboard_url

Log in with admin / admin_password. Accept the self-signed certificate warning (or install a trusted certificate later).

5. Install agents on monitored hosts​

On each host you want to monitor:

curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add -
echo "deb https://packages.wazuh.com/4.x/apt/ stable main" \
| tee /etc/apt/sources.list.d/wazuh.list
apt-get update && apt-get install -y wazuh-agent

# Configure the manager address
WAZUH_MANAGER="$(terraform output -raw agent_manager_ip)" \
systemctl start wazuh-agent
systemctl enable wazuh-agent

Security Recommendations​

  1. Always restrict admin_cidr to your management IP. The Wazuh dashboard contains full security event data for your infrastructure.

  2. Restrict agent_cidr to the CIDR of your monitored infrastructure, not 0.0.0.0/0. This prevents arbitrary agents from enrolling.

  3. Replace the self-signed certificate. The quick-install generates a self-signed cert. For production, use a proper certificate — either via an ACME CA such as Actalis ACME Certificates or Let's Encrypt (requires a domain) or your own CA.


Troubleshooting​

Dashboard not loading after 30 minutes​

ssh ubuntu@$(terraform output -raw vm_public_ip)
sudo tail -50 /var/log/wazuh-install.log
sudo systemctl status wazuh-indexer wazuh-manager wazuh-dashboard

The most common cause is insufficient RAM — verify the VM has at least 16 GB and that OpenSearch is not OOM-killed:

sudo journalctl -u wazuh-indexer -n 50
dmesg | grep -i "killed process"

Login fails after deploy​

The password change may have failed. Check the log:

sudo cat /var/log/wazuh-password-change.log

If needed, SSH into the VM and re-run the password tool manually:

sudo bash /root/wazuh-install-files/wazuh-passwords-tool.sh \
-u admin -p "YourNewPassword" -A
sudo systemctl restart wazuh-indexer wazuh-manager wazuh-dashboard

References​