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
9 changes: 9 additions & 0 deletions testing/benchmarking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ provider "ec" {}

provider "aws" {
region = var.aws_region
default_tags {
tags = module.tags.tags
}
}

module "tags" {
source = "github.com/elastic/apm-server//testing/infra/terraform/modules/tags?depth=1"
project = "lambda-extension-benchmarks"
}

module "ec_deployment" {
source = "github.com/elastic/apm-server/testing/infra/terraform/modules/ec_deployment"
Expand All @@ -49,6 +56,8 @@ module "ec_deployment" {
integrations_server = true
apm_server_expvar = false
apm_server_pprof = false

tags = module.tags.tags
}

module "lambda_deployment" {
Expand Down
12 changes: 10 additions & 2 deletions tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ provider "aws" {
region = var.aws_region
}

module "tags" {
source = "github.com/elastic/apm-server//testing/infra/terraform/modules/tags?depth=1"
project = var.user_name
}

module "ec_deployment" {
source = "github.com/elastic/apm-server//testing/infra/terraform/modules/ec_deployment?depth=1"
deployment_name_prefix = "apm-aws-lambda-smoke-testing"
Expand All @@ -11,6 +16,7 @@ module "ec_deployment" {
region = var.ess_region
deployment_template = var.ess_deployment_template
stack_version = var.ess_version
tags = module.tags.tags
}

module "lambda_function" {
Expand All @@ -35,9 +41,9 @@ module "lambda_function" {
ELASTIC_APM_SECRET_TOKEN = module.ec_deployment.apm_secret_token
}

tags = {
tags = merge(module.tags.tags, {
Name = "my-lambda"
}
})
}

module "lambda_layer_local" {
Expand All @@ -50,4 +56,6 @@ module "lambda_layer_local" {
compatible_runtimes = ["nodejs16.x"]

source_path = "../bin/"

tags = module.tags.tags
}
5 changes: 5 additions & 0 deletions tf/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ variable "aws_region" {
default = "eu-central-1"
}

variable "user_name" {
description = "Required username to use for prefixes"
type = string
}

variable "log_level" {
type = string
description = "lambda extension log level"
Expand Down