Skip to content

Commit c67bb8d

Browse files
author
Om Sharma
authored
Merge pull request #28 from clouddrove/ec2-hibernation
added hiberation tag
2 parents 6b2f74a + 3ac90df commit c67bb8d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

_example/basic_example/example.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ module "ec2" {
145145
instance_type = "t2.nano"
146146
monitoring = false
147147
tenancy = "default"
148+
hibernation = false
148149

149150
#Networking
150151
vpc_security_group_ids_list = [module.ssh.security_group_ids, module.http-https.security_group_ids]

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ resource "aws_instance" "default" {
6565
source_dest_check = var.source_dest_check
6666
ipv6_address_count = var.ipv6_address_count
6767
ipv6_addresses = var.ipv6_addresses
68+
hibernation = var.hibernation
6869

6970
dynamic "root_block_device" {
7071
for_each = var.root_block_device

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,9 @@ variable "metadata_http_put_response_hop_limit" {
334334
default = 2
335335
description = "The desired HTTP PUT response hop limit (between 1 and 64) for instance metadata requests."
336336
}
337+
338+
variable "hibernation" {
339+
type = bool
340+
default = false
341+
description = "hibernate an instance, Amazon EC2 signals the operating system to perform hibernation."
342+
}

0 commit comments

Comments
 (0)