From e2a3d1e8646fd2eefd5c8f3037e6510969c640ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20J=C3=BAnior=20do=20Nascimento=20Lima?= Date: Mon, 29 Mar 2021 13:48:09 -0300 Subject: [PATCH] Adapt tags to receive map of tags --- main.tf | 32 ++++---------------------------- variables.tf | 25 ------------------------- 2 files changed, 4 insertions(+), 53 deletions(-) diff --git a/main.tf b/main.tf index 5df2d30..91abeb6 100644 --- a/main.tf +++ b/main.tf @@ -62,13 +62,7 @@ resource "aws_s3_bucket" "s3_default" { } } - tags = { - environment = var.environment - application = var.application - vs = var.vs - project = var.project - team = var.team - } + tags = var.tags } @@ -135,13 +129,7 @@ resource "aws_s3_bucket" "s3_website" { } } - tags = { - environment = var.environment - application = var.application - vs = var.vs - project = var.project - team = var.team - } + tags = var.tags } @@ -207,13 +195,7 @@ resource "aws_s3_bucket" "s3_logging" { target_prefix = var.target_prefix } - tags = { - environment = var.environment - application = var.application - vs = var.vs - project = var.project - team = var.team - } + tags = var.tags } @@ -283,13 +265,7 @@ resource "aws_s3_bucket" "s3_encryption" { } } - tags = { - environment = var.environment - application = var.application - vs = var.vs - project = var.project - team = var.team - } + tags = var.tags } diff --git a/variables.tf b/variables.tf index 5baf418..51a17f7 100644 --- a/variables.tf +++ b/variables.tf @@ -6,31 +6,6 @@ variable "name" { description = "Name (e.g. `app` or `cluster`)." } -variable "environment" { - type = string - description = "Environment name to be appended on resources" -} - -variable "application" { - type = string - description = "Application name to identify resources" -} - -variable "project" { - type = string - description = "Project name to identify resources" -} - -variable "team" { - type = string - description = "Team assigned to project" -} - -variable "vs" { - type = string - description = "Value Stream" -} - variable "label_order" { type = list default = []