diff --git a/testing/benchmarking/main.tf b/testing/benchmarking/main.tf index eb8a5dab..5f1e8bb0 100644 --- a/testing/benchmarking/main.tf +++ b/testing/benchmarking/main.tf @@ -47,7 +47,7 @@ provider "aws" { } module "tags" { - source = "github.com/elastic/apm-server//testing/infra/terraform/modules/tags?depth=1" + source = "../tf-modules/tags" project = "lambda-extension-benchmarks" build = var.github_workflow_id } diff --git a/testing/smoketest/main.tf b/testing/smoketest/main.tf index bac8653b..89595d23 100644 --- a/testing/smoketest/main.tf +++ b/testing/smoketest/main.tf @@ -6,7 +6,7 @@ provider "aws" { } module "tags" { - source = "github.com/elastic/apm-server//testing/infra/terraform/modules/tags?depth=1" + source = "../tf-modules/tags" project = local.user_name build = var.github_workflow_id } diff --git a/testing/tf-modules/tags/output.tf b/testing/tf-modules/tags/output.tf new file mode 100644 index 00000000..728d6671 --- /dev/null +++ b/testing/tf-modules/tags/output.tf @@ -0,0 +1,20 @@ +locals { + tags = { + "division" : "engineering" + "org" : "obs" + "team" : "profiling" + "project" : var.project + "build" : var.build + "ephemeral" : "true" + } +} + +output "tags" { + value = local.tags + description = "Tags for CSP resources" +} + +output "labels" { + value = local.tags + description = "Labels for CSP resources" +} diff --git a/testing/tf-modules/tags/vars.tf b/testing/tf-modules/tags/vars.tf new file mode 100644 index 00000000..fb84b7d5 --- /dev/null +++ b/testing/tf-modules/tags/vars.tf @@ -0,0 +1,10 @@ +variable "project" { + description = "The value to use for the project tag/label" + type = string +} + +variable "build" { + description = "The value to use for the build tag/label" + type = string + default = "unknown" +}