Skip to content

Commit ee589aa

Browse files
authored
Merge pull request #2 from dodevops/feature/te/tags
feat: Adding variable to assign tags to resources
2 parents 22aed1c + ece0fa8 commit ee589aa

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,20 @@ The following input variables are optional (have default values):
7272

7373
### delete\_retention\_policy
7474

75-
Description: days until soft deleted resources are hard deleted
75+
Description: Days until soft deleted resources are hard deleted
7676

7777
Type: `number`
7878

7979
Default: `7`
8080

81+
### tags
82+
83+
Description: Map of tags for the resources
84+
85+
Type: `map(any)`
86+
87+
Default: `{}`
88+
8189
## Outputs
8290

8391
No outputs.

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ resource "azurerm_storage_account" "storage-account" {
88
enable_https_traffic_only = true
99
allow_blob_public_access = false
1010
min_tls_version = "TLS1_2"
11+
tags = var.tags
1112

1213
blob_properties {
1314
delete_retention_policy {

vars.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ variable "location" {
1313
description = "The azure location used for azure"
1414
}
1515

16+
variable "tags" {
17+
type = map(any)
18+
description = "Map of tags for the resources"
19+
default = {}
20+
}
21+
1622
variable "resource_group" {
1723
type = string
1824
description = "Name of the resource group to use"

0 commit comments

Comments
 (0)