diff --git a/Makefile b/Makefile
index affb4f3..a6832d9 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ TF_MODULES = $(sort $(dir $(wildcard $(CURRENT_DIR)modules/*/)))
# -------------------------------------------------------------------------------------------------
# Container versions
# -------------------------------------------------------------------------------------------------
-TF_VERSION = 1.3.9
+TF_VERSION = 1.5.7
TFDOCS_VERSION = 0.16.0-0.34
FL_VERSION = latest-0.8
JL_VERSION = 1.6.0-0.14
diff --git a/README.md b/README.md
index 41b7743..d70032e 100644
--- a/README.md
+++ b/README.md
@@ -48,14 +48,6 @@ Type: `string`
The following input variables are optional (have default values):
-### [tags](#input\_tags)
-
-Description: Tags applied to the resources
-
-Type: `list(string)`
-
-Default: `[]`
-
### [items](#input\_items)
Description: A list of dicts with secret information
@@ -68,11 +60,20 @@ list(object({
name = string
username = string
password = string
+ tags = optional(list(string), [])
}))
```
Default: `[]`
+### [tags\_all](#input\_tags\_all)
+
+Description: Tags applied to all the resources
+
+Type: `list(string)`
+
+Default: `[]`
+
diff --git a/main.tf b/main.tf
index c95324f..f088f10 100644
--- a/main.tf
+++ b/main.tf
@@ -9,5 +9,5 @@ resource "onepassword_item" "items" {
username = each.value.username
password = each.value.password
- tags = concat(var.tags, ["Managed by Terraform"])
+ tags = concat(var.tags_all, each.value.tags)
}
diff --git a/variables.tf b/variables.tf
index 10d4ecc..c3ba2e7 100644
--- a/variables.tf
+++ b/variables.tf
@@ -1,9 +1,3 @@
-variable "tags" {
- description = "Tags applied to the resources"
- type = list(string)
- default = []
-}
-
variable "vault_id" {
description = "id of the vault where the items are stored"
type = string
@@ -16,6 +10,13 @@ variable "items" {
name = string
username = string
password = string
+ tags = optional(list(string), [])
}))
default = []
}
+
+variable "tags_all" {
+ description = "Tags applied to all the resources"
+ type = list(string)
+ default = []
+}