From 9c73e27ee4b4f5d814ed641de1210188d9c9883b Mon Sep 17 00:00:00 2001 From: kruskal <99559985+kruskall@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:22:43 +0100 Subject: [PATCH] fix: update terraform team tag to profiling apm-server team is deprecated, use profiling --- testing/benchmarking/main.tf | 2 +- testing/smoketest/main.tf | 2 +- testing/tf-modules/tags/output.tf | 20 ++++++++++++++++++++ testing/tf-modules/tags/vars.tf | 10 ++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 testing/tf-modules/tags/output.tf create mode 100644 testing/tf-modules/tags/vars.tf 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" +}