Attaching tags to an internet gateway fails
Created by: arnaudsjs
Problem:
Attaching tags to an InternetGateway right after its creation fails from time to time with the following error:
Traceback:
Traceback (most recent call last):
File "/home/workspace/modules_aws_master/env/lib64/python3.6/site-packages/inmanta/agent/handler.py", line 881, in execute
self.create_resource(ctx, desired)
File "/tmp/tmpsvsj4gth/libs/aws/plugins/__init__.py", line 1592, in create_resource
igw.create_tags(Tags=[{"Key": "Name", "Value": resource.name}])
File "/home/workspace/modules_aws_master/env/lib64/python3.6/site-packages/boto3/resources/factory.py", line 520, in do_action
response = action(self, *args, **kwargs)
File "/home/workspace/modules_aws_master/env/lib64/python3.6/site-packages/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(*args, **params)
File "/home/workspace/modules_aws_master/env/lib64/python3.6/site-packages/botocore/client.py", line 337, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/workspace/modules_aws_master/env/lib64/python3.6/site-packages/botocore/client.py", line 656, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidInternetGatewayID.NotFound) when calling the CreateTags operation: The internetGateway ID 'igw-0c5b5b5dc229ca2e4' does not exist