-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for id standardization
- Loading branch information
Showing
22 changed files
with
366 additions
and
334 deletions.
There are no files selected for viewing
20 changes: 0 additions & 20 deletions
20
cartography/data/jobs/cleanup/aws_import_volumes_cleanup.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Optional | ||
|
||
|
||
def build_arn( | ||
resource: str, | ||
account: str, | ||
typename: str, | ||
name: str, | ||
region: Optional[str] = None, | ||
partition: Optional[str] = None, | ||
) -> str: | ||
if not partition: | ||
# TODO: support partitions from others. Please file an issue on this if needed, would love to hear from you | ||
partition = 'aws' | ||
if not region: | ||
# Some resources are present in all regions, e.g. IAM policies | ||
region = "" | ||
return f"arn:{partition}:{resource}:{region}:{account}:{typename}/{name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.