fixinventory icon indicating copy to clipboard operation
fixinventory copied to clipboard

[aws] Add methods to handle missing ARNs/IDs

Open anjafr opened this issue 3 years ago • 3 comments

Description

Introduces

  • a method on AwsResource to construct the ARN of a resource instance.
  • a static method on AwsResource to extract the ID from a given ARN

To-Dos

  • [x] Add test coverage for new or updated functionality
  • [x] Lint and test with tox
  • [ ] Document new or updated functionality (someengineering/resoto.com#XXXX)

Code of Conduct

By submitting this pull request, I agree to follow the code of conduct.

anjafr avatar Sep 15 '22 12:09 anjafr

I wonder if it would be possible to create the arn for any AWS resource?

Technically: ... maybe - but practically it would require an enormous amount of contextual information that I don't think is feasible to gather here

anjafr avatar Sep 16 '22 08:09 anjafr

I wonder if it would be possible to create the arn for any AWS resource?

Technically: ... maybe - but practically it would require an enormous amount of contextual information that I don't think is feasible to gather here

@aquamatthias Did you have a chance to mull this over?

anjafr avatar Sep 21 '22 08:09 anjafr

So the TL;DR of our discussion: it is impossible to generate the ARN based on the information we already have. We need to handle this case manually in every service that does not report the ARN.

aquamatthias avatar Sep 21 '22 18:09 aquamatthias