Skip to content

Commit

Permalink
Merge pull request #28 from clouddrove/ec2-hibernation
Browse files Browse the repository at this point in the history
added hiberation tag
  • Loading branch information
Om Sharma authored Sep 16, 2022
2 parents 6b2f74a + 3ac90df commit c67bb8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions _example/basic_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ module "ec2" {
instance_type = "t2.nano"
monitoring = false
tenancy = "default"
hibernation = false

#Networking
vpc_security_group_ids_list = [module.ssh.security_group_ids, module.http-https.security_group_ids]
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "aws_instance" "default" {
source_dest_check = var.source_dest_check
ipv6_address_count = var.ipv6_address_count
ipv6_addresses = var.ipv6_addresses
hibernation = var.hibernation

dynamic "root_block_device" {
for_each = var.root_block_device
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,9 @@ variable "metadata_http_put_response_hop_limit" {
default = 2
description = "The desired HTTP PUT response hop limit (between 1 and 64) for instance metadata requests."
}

variable "hibernation" {
type = bool
default = false
description = "hibernate an instance, Amazon EC2 signals the operating system to perform hibernation."
}

0 comments on commit c67bb8d

Please sign in to comment.