From c271e31745246c84668d570ac73012c7aec34b71 Mon Sep 17 00:00:00 2001 From: Christian Hellman Date: Sun, 12 Mar 2017 09:40:49 -0700 Subject: [PATCH] Fixed terraform deploy against moto fails (#857) --- moto/ec2/models.py | 1 + moto/ec2/responses/instances.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index c7467feee..6ed6e9af0 100755 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -369,6 +369,7 @@ class Instance(TaggedEC2Resource, BotoInstance): self.key_name = kwargs.get("key_name") self.source_dest_check = "true" self.launch_time = utc_date_and_time() + self.disable_api_termination = kwargs.get("disable_api_termination", False) associate_public_ip = kwargs.get("associate_public_ip", False) if in_ec2_classic: # If we are in EC2-Classic, autoassign a public IP diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py index 4da7b880f..368302235 100644 --- a/moto/ec2/responses/instances.py +++ b/moto/ec2/responses/instances.py @@ -297,7 +297,7 @@ EC2_RUN_INSTANCES = """