From 968b48e1880515c9efd9ef38e61fa733658858b0 Mon Sep 17 00:00:00 2001 From: Omer Segev Date: Mon, 3 Jul 2023 08:19:26 +0300 Subject: [PATCH] Moved the tags to be a variable --- .gitignore | 3 ++- provider.tf | 5 +---- variables.tf | 6 ++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 956d823..d7cf0be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ terraform.tfstate* .terraform .terragrunt-cache -.terraform.lock.hcl \ No newline at end of file +.terraform.lock.hcl +.idea/ \ No newline at end of file diff --git a/provider.tf b/provider.tf index f713acf..ff8b86b 100644 --- a/provider.tf +++ b/provider.tf @@ -11,9 +11,6 @@ terraform { provider "aws" { region = var.region default_tags { - tags = { - Environment = var.environment - Owner = "Ops" - } + tags = var.resource_tags } } \ No newline at end of file diff --git a/variables.tf b/variables.tf index 99a1264..a23bb45 100644 --- a/variables.tf +++ b/variables.tf @@ -19,4 +19,10 @@ variable "emails" { variable "raise_amount_percent" { type = string description = "An Expression object used to specify the anomalies that you want to generate alerts for. The precentage service cost increase than the expected" +} + +variable "resource_tags" { + description = "Tags to set for all resources" + type = map(string) + default = {} } \ No newline at end of file