Instead of hardcoding the class for handling instances in autoscaling,
look up the class for the AWS::EC2::Instance resource type using the same
mechanism used for creating resources normally.
Change-Id: I37b9aff9a83b89cdc782467720970a04549d7b1e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
return self.UPDATE_REPLACE
def _make_instance(self, name):
+ Instance = resource.get_class('AWS::EC2::Instance')
conf = self.properties['LaunchConfigurationName']
instance_definition = self.stack.t['Resources'][conf]
- return instance.Instance(name, instance_definition, self.stack)
+ return Instance(name, instance_definition, self.stack)
def handle_delete(self):
if self.resource_id is not None: