Skip to content

Commit

Permalink
[aws][fix] Fetch public ECR repositories are global (#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias committed Jan 10, 2024
1 parent 35fc7f6 commit 4725be5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugins/aws/resoto_plugin_aws/collector.py
Expand Up @@ -62,6 +62,7 @@
global_resources: List[Type[AwsResource]] = (
cloudfront.resources
+ dynamodb.global_resources
+ ecr.global_resources
+ iam.resources
+ route53.resources
+ s3.resources
Expand Down
7 changes: 5 additions & 2 deletions plugins/aws/resoto_plugin_aws/resource/ecr.py
Expand Up @@ -85,8 +85,10 @@ def collect(visibility: str, spec: AwsApiSpec) -> None:
raise

# collect private and public repositories
collect("private", cls.api_spec)
collect("public", cls.public_spec)
if builder.region.name == "global":
collect("public", cls.public_spec)
else:
collect("private", cls.api_spec)

@classmethod
def called_collect_apis(cls) -> List[AwsApiSpec]:
Expand Down Expand Up @@ -123,3 +125,4 @@ def called_collect_apis(cls) -> List[AwsApiSpec]:


resources: List[Type[AwsResource]] = [AwsEcrRepository]
global_resources: List[Type[AwsResource]] = [AwsEcrRepository]

0 comments on commit 4725be5

Please sign in to comment.