diff --git a/README.md b/README.md
index 8db45fc..ae1f25c 100644
--- a/README.md
+++ b/README.md
@@ -227,13 +227,13 @@ Note: the default behavior of the module is to create an autoscaling group and l
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13.1 |
-| [aws](#requirement\_aws) | >= 4.14 |
+| [aws](#requirement\_aws) | >= 4.20 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 4.14 |
+| [aws](#provider\_aws) | >= 4.20 |
## Modules
@@ -275,6 +275,7 @@ No modules.
| [default\_version](#input\_default\_version) | Default Version of the launch template | `string` | `null` | no |
| [delete\_timeout](#input\_delete\_timeout) | Delete timeout to wait for destroying autoscaling group | `string` | `null` | no |
| [desired\_capacity](#input\_desired\_capacity) | The number of Amazon EC2 instances that should be running in the autoscaling group | `number` | `null` | no |
+| [disable\_api\_stop](#input\_disable\_api\_stop) | If true, enables EC2 instance stop protection | `bool` | `null` | no |
| [disable\_api\_termination](#input\_disable\_api\_termination) | If true, enables EC2 instance termination protection | `bool` | `null` | no |
| [ebs\_optimized](#input\_ebs\_optimized) | If true, the launched EC2 instance will be EBS-optimized | `bool` | `null` | no |
| [elastic\_gpu\_specifications](#input\_elastic\_gpu\_specifications) | The elastic GPU to attach to the instance | `map(string)` | `{}` | no |
diff --git a/examples/complete/README.md b/examples/complete/README.md
index 8d607c2..1216696 100644
--- a/examples/complete/README.md
+++ b/examples/complete/README.md
@@ -30,13 +30,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13.1 |
-| [aws](#requirement\_aws) | >= 4.14 |
+| [aws](#requirement\_aws) | >= 4.20 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 4.14 |
+| [aws](#provider\_aws) | >= 4.20 |
## Modules
diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf
index 9f2f075..66f916a 100644
--- a/examples/complete/versions.tf
+++ b/examples/complete/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 4.14"
+ version = ">= 4.20"
}
}
}
diff --git a/main.tf b/main.tf
index a4b5dc9..c2f9738 100644
--- a/main.tf
+++ b/main.tf
@@ -43,6 +43,7 @@ resource "aws_launch_template" "this" {
default_version = var.default_version
update_default_version = var.update_default_version
disable_api_termination = var.disable_api_termination
+ disable_api_stop = var.disable_api_stop
instance_initiated_shutdown_behavior = var.instance_initiated_shutdown_behavior
kernel_id = var.kernel_id
ram_disk_id = var.ram_disk_id
diff --git a/variables.tf b/variables.tf
index 7b04a87..659dab8 100644
--- a/variables.tf
+++ b/variables.tf
@@ -329,6 +329,12 @@ variable "disable_api_termination" {
default = null
}
+variable "disable_api_stop" {
+ description = "If true, enables EC2 instance stop protection"
+ type = bool
+ default = null
+}
+
variable "instance_initiated_shutdown_behavior" {
description = "Shutdown behavior for the instance. Can be `stop` or `terminate`. (Default: `stop`)"
type = string
diff --git a/versions.tf b/versions.tf
index 9f2f075..66f916a 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 4.14"
+ version = ">= 4.20"
}
}
}