Skip to content

Commit

Permalink
Use the ARN as identifier for all aws resources
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias committed Oct 30, 2023
1 parent 6434217 commit 3f6fbed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/aws/resoto_plugin_aws/resource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from concurrent.futures import Future
from datetime import datetime, timezone, timedelta
from functools import lru_cache
from typing import Any, Callable, ClassVar, Dict, Iterator, List, Optional, Type, TypeVar
from typing import Any, Callable, ClassVar, Dict, Iterator, List, Optional, Type, TypeVar, Tuple
from math import ceil

from attr import evolve
Expand Down Expand Up @@ -107,6 +107,11 @@ class AwsResource(BaseResource, ABC):
# The AWS specific identifier of the resource. Not available for all resources.
arn: Optional[str] = None

def _keys(self) -> Tuple[Any, ...]:
if self.arn is not None:
return tuple(list(super()._keys()) + [self.arn])
return super()._keys()

def update_resource_tag(self, client: AwsClient, key: str, value: str) -> bool:
return False

Expand Down

0 comments on commit 3f6fbed

Please sign in to comment.