Human-readable guide for building config/splunk_config.yml on AWS Linux with Splunk Platform Automator (SPA).
For interactive agent assistance in Cursor, use the project skill at skills/spa/spa-create-config (Cursor discovers it via .cursor/skills/ symlink; invoke with /spa-create-config). See Agent Skills for other tools.
- Copy examples/aws_lab_baseline.yml or start from examples/splunk_config_terraform_aws.yml.
- Add topology from an SVA-aligned example (e.g. examples/4idxc2site_sh.yml for multisite IDXC + SH).
- Set
terraform.aws.ssh_usernameto match your AMI (ec2-userfor Amazon Linux / RHEL;ubuntufor Ubuntu). - Set global
os:block per OS — include polkit (policykit-1on Ubuntu). See OS and SSH matrix below. - Validate before provision:
./bin/validate_splunk_config.sh config/splunk_config.yml- Provision and deploy:
ap ansible/provision_terraform_aws.yml -e auto_approve=true
ap ansible/deploy_site.ymldeploy_site.yml runs preflight_deploy.yml first. It probes each host for python3, flushes stale Ansible fact cache when the cached interpreter no longer matches (for example after switching OS/AMI while reusing hostnames like cm and idx1), and verifies Ansible connectivity before the main deploy. Terraform provisioning also flushes cache for affected hosts when inventory is regenerated.
To skip preflight: ap ansible/deploy_site.yml --skip-tags preflight. To disable cache flush on provision: -e spa_flush_fact_cache_on_provision=false.
- About Splunk Validated Architectures
- Topology selection guidance
- Designing a scalable architecture (Lantern)
- configuration_description.yml — all config keys
| Intent | Typical sizing | Notes |
|---|---|---|
| Config / infra test | t3.medium, 50 GB |
Minimal hosts; lab role co-location OK |
| Feature / app lab | Larger SH if needed | ITSI: Java 21 max on search tier |
| Production-like | Document overrides | SVA-aligned separation; multisite |
Always set terraform.aws.ssh_username explicitly.
Recommended (latest in region): Amazon Linux 2023, RHEL 10, or Ubuntu 24.04 LTS. Discover AMIs with splunk_config_aws.py — example IDs expire.
| OS | ssh_username |
Global os.packages (required) |
|---|---|---|
| Amazon Linux 2023 | ec2-user |
acl, polkit; disable_selinux: true |
| RHEL 10 | ec2-user |
acl, polkit; disable_selinux: true |
| Ubuntu 24.04 | ubuntu |
acl, policykit-1; disable_apparmor: true |
SPA checks for policykit (pkaction) by default. Ubuntu images often lack it — without policykit-1, deploy fails on forwarders and other hosts with:
Policykit (polkit) is not installed. Install the policykit package or set splunk_use_policykit to false.
ITSI: java-21-openjdk (AL/RHEL) or openjdk-21-jdk (Ubuntu) on search hosts — not Java 22+.
Discover AMI and SSH hints:
python3 bin/splunk_config_aws.py --region eu-central-1 --latest-ami --os all --json
python3 bin/splunk_config_aws.py --region eu-central-1 --describe-ami --ami-id ami-xxx --jsonSVAs favor separated management tiers. Lab configs often co-locate roles on fewer hosts.
| Pattern | Example | SVA note |
|---|---|---|
| CM only | config/splunk_config.yml |
OK for IDXC config tests |
| CM + MC + DS + deployer | tests/configs/2site-idxc_shc_mc_ds_sh_hf_uf.yml |
Closer to production |
| All-in-one | examples/single_node.yml |
S1 only |
Hard rules: cluster_manager needs idxcluster:; deployer needs shcluster:; license_manager needs splunk_license_file.
Place license files on the Ansible controller in ../Software (SPA splunk_software_dir). Reference basename only in config:
splunk_defaults:
splunk_license_file: Splunk_Enterprise.licFor ITSI, use both enterprise and ITSI licenses when available:
splunk_defaults:
splunk_license_file:
- Splunk_Enterprise.lic
- Splunk_ITSI.licDiscover and propose licenses from Software:
python3 bin/splunk_config_licenses.py --json
python3 bin/splunk_config_licenses.py --config config/splunk_config.yml --jsonLab configs: add licenses when files exist (avoids trial limits). ITSI in splunk_app_deployment requires license_manager role and Splunk_ITSI.lic when deploying ITSI.
See App Deployment. Set SPLUNKBASE_USERNAME and SPLUNKBASE_PASSWORD on the controller (never paste values into chat or echo them in the terminal).
ITSI example: examples/single_node_itsi.yml.
| Check | Command |
|---|---|
| Schema + inventory + playbooks | ./bin/validate_splunk_config.sh config/splunk_config.yml |
| + Software license scan (optional) | ./bin/validate_splunk_config.sh --check-licenses config/splunk_config.yml |
| + AWS API (optional) | ./bin/validate_splunk_config.sh --splunk-config-aws config/splunk_config.yml |
| Schema unit tests | ./tests/run_schema_tests.sh -q |
Playbook syntax-check requires Ansible collections (requirements.yml and ansible.windows). Install with:
ansible-galaxy collection install -r requirements.yml
ansible-galaxy collection install ansible.windows- Ansible-Terraform AWS Integration
- App Deployment Guide
- Agent skill: skills/spa/spa-create-config/SKILL.md (Cursor:
/spa-create-configvia.cursor/skills/symlink)
ap ansible/destroy_terraform_aws.yml -e auto_approve=true