Closed Tiboris closed 2 years ago
This could solve https://github.com/neoave/mrack/issues/173
Hi, it will be cleaner and probably more maintainable to do the tagging after official wait. I.e. introduce e.g. in base provider a post-provision action. Create a 'tagging' method in the aws provider and call this method in and override of the post-provision-action method.
Makes sense let me do it.
I found an alternative solution. You can set the tags in the moment of EC2 instance creation including the parameter TagSpecifications
in create_instances
See reference https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
I went with @dav-pascual solution for that. :)
Yes, that's simpler and better solution.
Move tagging into creation request itself
When the creation of the instance is too slow on the ec2 side we get a traceback that instance does not exist (yet) and we need would need to wait a bit in order to tag it. Move tagging into request itself and do it at instance creation
adding some trivial patches: