Merge pull request #2019 from acsbendi/launch_index
Correctly returning ami launch index
This commit is contained in:
commit
09855801ba
3 changed files with 19 additions and 2 deletions
|
|
@ -388,6 +388,7 @@ class Instance(TaggedEC2Resource, BotoInstance):
|
|||
self.ebs_optimized = kwargs.get("ebs_optimized", False)
|
||||
self.source_dest_check = "true"
|
||||
self.launch_time = utc_date_and_time()
|
||||
self.ami_launch_index = kwargs.get("ami_launch_index", 0)
|
||||
self.disable_api_termination = kwargs.get("disable_api_termination", False)
|
||||
self._spot_fleet_id = kwargs.get("spot_fleet_id", None)
|
||||
associate_public_ip = kwargs.get("associate_public_ip", False)
|
||||
|
|
@ -719,6 +720,7 @@ class InstanceBackend(object):
|
|||
instance_tags = tags.get('instance', {})
|
||||
|
||||
for index in range(count):
|
||||
kwargs["ami_launch_index"] = index
|
||||
new_instance = Instance(
|
||||
self,
|
||||
image_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue