Skip to content

Commit

Permalink
Merge pull request #234 from ministryofjustice/disable-api-stop
Browse files Browse the repository at this point in the history
adding disable api stop attribute
  • Loading branch information
haitchison authored Nov 6, 2023
2 parents 595874a + c98b3c2 commit d66293c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "aws_instance" "this" {
ami = data.aws_ami.this.id
associate_public_ip_address = false # create an EIP instead
disable_api_termination = var.instance.disable_api_termination
disable_api_stop = var.instance.disable_api_stop
ebs_optimized = data.aws_ec2_instance_type.this.ebs_optimized_support == "unsupported" ? false : true
iam_instance_profile = aws_iam_instance_profile.this.name
instance_type = var.instance.instance_type
Expand Down
1 change: 1 addition & 0 deletions test/unit-test/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ locals {

instance = {
disable_api_termination = false
disable_api_stop = false
instance_type = "t3.micro"
key_name = aws_key_pair.ec2-terratest-user.key_name
monitoring = false
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ variable "instance" {
type = object({
associate_public_ip_address = optional(bool, false)
disable_api_termination = bool
disable_api_stop = bool
instance_type = string
key_name = string
metadata_endpoint_enabled = optional(string, "enabled")
Expand Down

0 comments on commit d66293c

Please sign in to comment.