mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Fix AWS AutoScaler tags support
This commit is contained in:
parent
051998800c
commit
8265ca9375
@ -112,10 +112,10 @@ class AWSDriver(CloudDriver):
|
|||||||
instance_id = instances["Instances"][0]["InstanceId"]
|
instance_id = instances["Instances"][0]["InstanceId"]
|
||||||
|
|
||||||
instance = boto3.resource("ec2", **self.creds()).Instance(instance_id)
|
instance = boto3.resource("ec2", **self.creds()).Instance(instance_id)
|
||||||
if self.tags:
|
if resource_conf.get("tags"):
|
||||||
instance.create_tags(
|
instance.create_tags(
|
||||||
Resources=[instance_id],
|
Resources=[instance_id],
|
||||||
Tags=[{"Key": key, "Value": val} for key, val in self.tags],
|
Tags=[{"Key": key, "Value": val} for key, val in parse_tags(resource_conf.get("tags"))],
|
||||||
)
|
)
|
||||||
# Wait until instance is in running state
|
# Wait until instance is in running state
|
||||||
instance.wait_until_running()
|
instance.wait_until_running()
|
||||||
|
Loading…
Reference in New Issue
Block a user