Skip to content

Instantly share code, notes, and snippets.

@nobuhikosekiya
Last active October 7, 2025 04:15
Show Gist options
  • Select an option

  • Save nobuhikosekiya/073c6d7fb71eb9b6e2e47d1e86f89c17 to your computer and use it in GitHub Desktop.

Select an option

Save nobuhikosekiya/073c6d7fb71eb9b6e2e47d1e86f89c17 to your computer and use it in GitHub Desktop.
My Elasticsearch IaC examples

All scripts intend to send data to Elasticsearch (creating Elasticsearch is not part of the script)

Terraform scripts

architecture Github repo Test Status
CloudTrail -> S3 -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-cloudtrail-s3-elasticagent
S3 Acesss logs -> S3 -> SQS -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-s3accesslog-s3-sqs-elasticagent
WAF logs -> S3 -> SQS -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-waf-s3-sqs-elasticagent
Security Hub logs -> (RestAPI) -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-securityhub-elasticagent
GuardDuty logs -> S3 -> SQS -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-guardduty-s3-sqs-elasticagent
S3 bucket -> Elastic Serverless Forwarder https://github.com/nobuhikosekiya/tf-esf
Lambda logs -> Cloudwatch -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-lambda-cloudwatch-elasticagent
Lambda logs -> Cloudwatch -> Kinesis Firehose -> S3 -> SQS -> Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-lambda-cloudwatch-s3-sqs-elasticagent Unit Tests
NGINX and standalone Elastic agent on EC2 https://github.com/nobuhikosekiya/tf-ec2-elasticagent-nginx
ES Rally running on EC2 https://github.com/nobuhikosekiya/tf-rally-ec2
Cross Cluster Search example on Elastic Cloud https://github.com/nobuhikosekiya/tf-ccs-001
S3 -> Lambda -> Firehose -> Elastic Cloud https://github.com/nobuhikosekiya/tf-s3-lambda-firehose-es

Docker compose scripts

architecture Github repo
remote syslog -> Logstash https://github.com/nobuhikosekiya/logstash-syslogserver
Syslog as File -> Logstash https://github.com/nobuhikosekiya/logstash-syslog
Otel collector -> s3 & Elastic https://github.com/nobuhikosekiya/dc-otel-collector-s3-elastic
Monitoring of filebeat -> logstash -> elastic flow https://github.com/nobuhikosekiya/dc-filebeat-logstash-monitoring-v8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment