Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tf/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ output "elasticsearch_password" {
description = "The Elasticsearch password"
sensitive = true
}

output "aws_region" {
value = var.aws_region
description = "The AWS region"
}
6 changes: 4 additions & 2 deletions tf/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ echo "-> Creating the underlying infrastructure..."
terraform init | tee tf.log
terraform apply -auto-approve | tee -a tf.log

AWS_REGION=$(terraform output -raw aws_region)

echo "-> Calling the lambda function..."
aws lambda invoke --region=eu-central-1 --function-name smoke-testing-test response.json
aws lambda invoke --region=eu-central-1 --function-name smoke-testing-test response.json
aws lambda invoke --region="${AWS_REGION}" --function-name smoke-testing-test response.json
aws lambda invoke --region="${AWS_REGION}" --function-name smoke-testing-test response.json

echo "-> Waiting for the agent documents to be indexed in Elasticsearch..."

Expand Down