Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# AWS EC2 Instance Terraform module

## Grouper fork
Forked from
[terraform-aws-modules/terraform-aws-ec2-instance](https://github.com/Element3Health/terraform-aws-ec2-instance)

Only to add lifecycle hoook of create_before_destroy to the instance resource.


Terraform module which creates an EC2 instance on AWS.

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
Expand Down
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ resource "aws_instance" "this" {

tags = merge({ "Name" = var.name }, var.instance_tags, var.tags)
volume_tags = var.enable_volume_tags ? merge({ "Name" = var.name }, var.volume_tags) : null

lifecycle {
create_before_destroy = true
}
}

################################################################################
Expand Down
Loading