Skip to content

Commit

Permalink
add volume tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohan committed Aug 17, 2021
1 parent 02e5f08 commit d3d2911
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ resource "aws_instance" "default" {
module.labels.tags,
{
"Name" = format("%s%s%s", module.labels.id, var.delimiter, (count.index))
}
},
var.volume_tags
)

lifecycle {
Expand Down
24 changes: 15 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ variable "environment" {
}

variable "label_order" {
type = list
type = list(any)
default = []
description = "Label order, e.g. `name`,`application`."
}

variable "attributes" {
type = list
type = list(any)
default = []
description = "Additional attributes (e.g. `1`)."
}
Expand All @@ -37,7 +37,7 @@ variable "delimiter" {
}

variable "tags" {
type = map
type = map(any)
default = {}
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
}
Expand Down Expand Up @@ -91,13 +91,13 @@ variable "associate_public_ip_address" {
}

variable "ebs_block_device" {
type = list
type = list(any)
default = []
description = "Additional EBS block devices to attach to the instance."
}

variable "ephemeral_block_device" {
type = list
type = list(any)
default = []
description = "Customize Ephemeral (also known as Instance Store) volumes on the instance."
}
Expand Down Expand Up @@ -127,7 +127,7 @@ variable "tenancy" {
}

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

variable "availability_zone" {
type = list
type = list(any)
default = []
description = "Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region."
}
Expand Down Expand Up @@ -222,7 +222,7 @@ variable "ipv6_address_count" {
}

variable "ipv6_addresses" {
type = list
type = list(any)
default = []
description = "List of IPv6 addresses from the range of the subnet to associate with the primary network interface."
}
Expand Down Expand Up @@ -258,11 +258,17 @@ variable "cpu_credits" {
}

variable "instance_tags" {
type = map
type = map(any)
default = {}
description = "Instance tags."
}

variable "volume_tags" {
type = map(any)
default = {}
description = "Volume tags."
}

variable "dns_zone_id" {
type = string
default = ""
Expand Down

0 comments on commit d3d2911

Please sign in to comment.