From 92cedb331c44897165ca1a3bcfbc4635eb917872 Mon Sep 17 00:00:00 2001 From: prabirsekhri Date: Tue, 14 Feb 2023 22:02:21 +0000 Subject: [PATCH] adding variable for tags --- modules/s3-smb-share/main.tf | 6 ++---- modules/s3-smb-share/variables.tf | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/s3-smb-share/main.tf b/modules/s3-smb-share/main.tf index abd16fb..9088e0e 100644 --- a/modules/s3-smb-share/main.tf +++ b/modules/s3-smb-share/main.tf @@ -17,8 +17,6 @@ resource "aws_storagegateway_smb_file_share" "smbshare" { cache_stale_timeout_in_seconds = var.cache_timout } - tags = { - Environment = "dev" - Application = "serviceA" - } + tags = var.tags + } \ No newline at end of file diff --git a/modules/s3-smb-share/variables.tf b/modules/s3-smb-share/variables.tf index b94236a..db5b37d 100644 --- a/modules/s3-smb-share/variables.tf +++ b/modules/s3-smb-share/variables.tf @@ -45,3 +45,9 @@ variable "cache_timout" { description = "Cache stale timeout for automated cache refresh in seconds. Default is set to 1 hour (3600 seconds) can be changed to as low as 5 minutes (300 seconds)" default = "3600" } + +variable "tags" { + type = map(any) + description = "(Optional) Key-value map of resource tags." + default = {} +} \ No newline at end of file