diff --git a/x-pack/filebeat/docker-compose.yml b/x-pack/filebeat/docker-compose.yml index d4733b8dd700..236a712ef07e 100644 --- a/x-pack/filebeat/docker-compose.yml +++ b/x-pack/filebeat/docker-compose.yml @@ -7,6 +7,7 @@ services: depends_on: elasticsearch: { condition: service_healthy } cometd: { condition: service_healthy } + localstack: { condition: service_healthy } elasticsearch: extends: @@ -26,13 +27,12 @@ services: - 8080:8080 localstack: - container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" image: localstack/localstack hostname: localhost ports: - "4566:4566" # LocalStack Gateway environment: - - SERVICES=sqs,sns,secretsmanager + - SERVICES=s3,sqs,sns,secretsmanager - DEBUG=1 - DOCKER_HOST=unix:///var/run/docker.sock - HOST_TMP_FOLDER=${TMPDIR} diff --git a/x-pack/filebeat/input/awss3/_meta/terraform/.gitignore b/x-pack/filebeat/input/awss3/_meta/terraform/.gitignore index 0825744a7760..1af7b09a151d 100644 --- a/x-pack/filebeat/input/awss3/_meta/terraform/.gitignore +++ b/x-pack/filebeat/input/awss3/_meta/terraform/.gitignore @@ -1,3 +1,3 @@ terraform/ -outputs.yml +outputs*.yml *.tfstate* diff --git a/x-pack/filebeat/input/awss3/_meta/terraform/localstack.tf b/x-pack/filebeat/input/awss3/_meta/terraform/localstack.tf new file mode 100644 index 000000000000..edef6fb67702 --- /dev/null +++ b/x-pack/filebeat/input/awss3/_meta/terraform/localstack.tf @@ -0,0 +1,90 @@ +provider "aws" { + alias = "localstack" + access_key = "bharat" + secret_key = "bharat" + region = "us-east-1" + s3_use_path_style = true + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true +// s3_force_path_style = true + + endpoints { + apigateway = "http://localhost:4566" + apigatewayv2 = "http://localhost:4566" + cloudformation = "http://localhost:4566" + cloudwatch = "http://localhost:4566" + dynamodb = "http://localhost:4566" + ec2 = "http://localhost:4566" + es = "http://localhost:4566" + elasticache = "http://localhost:4566" + firehose = "http://localhost:4566" + iam = "http://localhost:4566" + kinesis = "http://localhost:4566" + lambda = "http://localhost:4566" + rds = "http://localhost:4566" + redshift = "http://localhost:4566" + route53 = "http://localhost:4566" + s3 = "http://localhost:4566" + secretsmanager = "http://localhost:4566" + ses = "http://localhost:4566" + sns = "http://localhost:4566" + sqs = "http://localhost:4566" + ssm = "http://localhost:4566" + stepfunctions = "http://localhost:4566" + sts = "http://localhost:4566" + } +} + +resource "random_string" "random_localstack" { + length = 6 + special = false + upper = false +} + +resource "aws_s3_bucket" "filebeat-integtest-localstack" { + provider = aws.localstack + bucket = "filebeat-s3-integtest-localstack-${random_string.random_localstack.result}" + force_destroy = true +} + +resource "aws_sqs_queue" "filebeat-integtest-localstack" { + provider = aws.localstack + name = "filebeat-sqs-integtest-localstack-${random_string.random_localstack.result}" + policy = < - \ No newline at end of file + + bar + foo + Reminder + Don't forget me this weekend! + \ No newline at end of file