Skip to content

Commit d3d2911

Browse files
author
Sohan
committed
add volume tag
1 parent 02e5f08 commit d3d2911

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ resource "aws_instance" "default" {
6565
module.labels.tags,
6666
{
6767
"Name" = format("%s%s%s", module.labels.id, var.delimiter, (count.index))
68-
}
68+
},
69+
var.volume_tags
6970
)
7071

7172
lifecycle {

variables.tf

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ variable "environment" {
1919
}
2020

2121
variable "label_order" {
22-
type = list
22+
type = list(any)
2323
default = []
2424
description = "Label order, e.g. `name`,`application`."
2525
}
2626

2727
variable "attributes" {
28-
type = list
28+
type = list(any)
2929
default = []
3030
description = "Additional attributes (e.g. `1`)."
3131
}
@@ -37,7 +37,7 @@ variable "delimiter" {
3737
}
3838

3939
variable "tags" {
40-
type = map
40+
type = map(any)
4141
default = {}
4242
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
4343
}
@@ -91,13 +91,13 @@ variable "associate_public_ip_address" {
9191
}
9292

9393
variable "ebs_block_device" {
94-
type = list
94+
type = list(any)
9595
default = []
9696
description = "Additional EBS block devices to attach to the instance."
9797
}
9898

9999
variable "ephemeral_block_device" {
100-
type = list
100+
type = list(any)
101101
default = []
102102
description = "Customize Ephemeral (also known as Instance Store) volumes on the instance."
103103
}
@@ -127,7 +127,7 @@ variable "tenancy" {
127127
}
128128

129129
variable "root_block_device" {
130-
type = list
130+
type = list(any)
131131
default = []
132132
description = "Customize details about the root block device of the instance. See Block Devices below for details."
133133
}
@@ -151,7 +151,7 @@ variable "ebs_iops" {
151151
}
152152

153153
variable "availability_zone" {
154-
type = list
154+
type = list(any)
155155
default = []
156156
description = "Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region."
157157
}
@@ -222,7 +222,7 @@ variable "ipv6_address_count" {
222222
}
223223

224224
variable "ipv6_addresses" {
225-
type = list
225+
type = list(any)
226226
default = []
227227
description = "List of IPv6 addresses from the range of the subnet to associate with the primary network interface."
228228
}
@@ -258,11 +258,17 @@ variable "cpu_credits" {
258258
}
259259

260260
variable "instance_tags" {
261-
type = map
261+
type = map(any)
262262
default = {}
263263
description = "Instance tags."
264264
}
265265

266+
variable "volume_tags" {
267+
type = map(any)
268+
default = {}
269+
description = "Volume tags."
270+
}
271+
266272
variable "dns_zone_id" {
267273
type = string
268274
default = ""

0 commit comments

Comments
 (0)