Skip to content

Commit 5331282

Browse files
feat: disable_api_stop option (cloudposse#197)
* feat: disable_api_stop option * fix(docs): typo
1 parent a42a73e commit 5331282

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ Available targets:
230230
| <a name="input_delimiter"></a> [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
231231
| <a name="input_descriptor_formats"></a> [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.<br>Map of maps. Keys are names of descriptors. Values are maps of the form<br>`{<br> format = string<br> labels = list(string)<br>}`<br>(Type is `any` so the map values can later be enhanced to provide additional options.)<br>`format` is a Terraform format string to be passed to the `format()` function.<br>`labels` is a list of labels, in order, to pass to `format()` function.<br>Label values will be normalized before being passed to `format()` so they will be<br>identical to how they appear in `id`.<br>Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
232232
| <a name="input_disable_alarm_action"></a> [disable\_alarm\_action](#input\_disable\_alarm\_action) | Disable the creation of Alarm Action | `bool` | `false` | no |
233+
| <a name="input_disable_api_stop"></a> [disable\_api\_stop](#input\_disable\_api\_stop_) | Enable EC2 Instance Stop Protection | `bool` | `false` | no |
233234
| <a name="input_disable_api_termination"></a> [disable\_api\_termination](#input\_disable\_api\_termination) | Enable EC2 Instance Termination Protection | `bool` | `false` | no |
234235
| <a name="input_ebs_device_name"></a> [ebs\_device\_name](#input\_ebs\_device\_name) | Name of the EBS device to mount | `list(string)` | <pre>[<br> "/dev/xvdb",<br> "/dev/xvdc",<br> "/dev/xvdd",<br> "/dev/xvde",<br> "/dev/xvdf",<br> "/dev/xvdg",<br> "/dev/xvdh",<br> "/dev/xvdi",<br> "/dev/xvdj",<br> "/dev/xvdk",<br> "/dev/xvdl",<br> "/dev/xvdm",<br> "/dev/xvdn",<br> "/dev/xvdo",<br> "/dev/xvdp",<br> "/dev/xvdq",<br> "/dev/xvdr",<br> "/dev/xvds",<br> "/dev/xvdt",<br> "/dev/xvdu",<br> "/dev/xvdv",<br> "/dev/xvdw",<br> "/dev/xvdx",<br> "/dev/xvdy",<br> "/dev/xvdz"<br>]</pre> | no |
235236
| <a name="input_ebs_iops"></a> [ebs\_iops](#input\_ebs\_iops) | Amount of provisioned IOPS. This must be set with a volume\_type of `io1`, `io2` or `gp3` | `number` | `0` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ resource "aws_instance" "default" {
110110
availability_zone = local.availability_zone
111111
instance_type = var.instance_type
112112
ebs_optimized = var.ebs_optimized
113+
disable_api_stop = var.disable_api_stop
113114
disable_api_termination = var.disable_api_termination
114115
user_data = var.user_data
115116
user_data_base64 = var.user_data_base64

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ variable "ebs_optimized" {
129129
default = true
130130
}
131131

132+
variable "disable_api_stop" {
133+
type = bool
134+
description = "Enable EC2 Instance Stop Protection"
135+
default = false
136+
}
137+
132138
variable "disable_api_termination" {
133139
type = bool
134140
description = "Enable EC2 Instance Termination Protection"

0 commit comments

Comments
 (0)