[aws] Add methods to handle missing ARNs/IDs
Description
Introduces
- a method on
AwsResourceto construct the ARN of a resource instance. - a static method on
AwsResourceto 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.
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
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?
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.