-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Problem
For example, segmentio has 2 sources and 2 account ids
known_aws_accounts/accounts.yaml
Lines 12 to 14 in 26925a7
| - name: 'SegmentIO' | |
| source: ['https://segment.com/docs/destinations/amazon-s3/', 'https://segment.com/docs/destinations/amazon-kinesis/'] | |
| accounts: ['107630771604', '595280932656'] |
I assume each account id comes from its respective source.
If that's the case, I'd have to figure out which source relates to my use-case, and then get the respective account id. This is a little tricky the way the yaml is structured.
Proposal
What do you folks think about this format instead?
- name: 'SegmentIO'
purpose:
s3:
source: 'https://segment.com/docs/destinations/amazon-s3/'
account: '107630771604'
kinesis:
source: 'https://segment.com/docs/destinations/amazon-kinesis/'
account: '595280932656'or even with a full map, no list. This has an additional benefit of having its vendor names alphabetized.
accounts:
segmentio:
name: 'SegmentIO'
purpose:
s3:
source: 'https://segment.com/docs/destinations/amazon-s3/'
account: '107630771604'
kinesis:
source: 'https://segment.com/docs/destinations/amazon-kinesis/'
account: '595280932656'Now I can do something like this
>>> external_accounts["segmentio"]["purpose"]["s3"]["account"]
'107630771604'Notes
- I noticed is that
sourceis sometimes a static URL and other times it's an array. The above proposal can fix this issue too.
known_aws_accounts/accounts.yaml
Lines 9 to 14 in 26925a7
- name: 'Cloudhealth' source: 'https://github.com/mozilla/security/blob/master/operations/cloudformation-templates/cloudhealth_iam_role.json' accounts: ['454464851268'] - name: 'SegmentIO' source: ['https://segment.com/docs/destinations/amazon-s3/', 'https://segment.com/docs/destinations/amazon-kinesis/'] accounts: ['107630771604', '595280932656'] - Sometimes a
sourceis missing
known_aws_accounts/accounts.yaml
Lines 228 to 230 in 26925a7
- name: 'Rockset' accounts: ['216690786812'] - name: 'CloudHiro' - Sometimes more than one account ID is in a vendor with ONLY a single source which is OK in the above proposal too
known_aws_accounts/accounts.yaml
Lines 172 to 174 in 26925a7
- name: 'Qualys Cloud View' source: 'https://qualysguard.qualys.com/qwebhelp/fo_portal/scans/ec2_connector.htm' accounts: ['080595016317', '205767712438'] - There are deprecations in titles
known_aws_accounts/accounts.yaml
Lines 326 to 328 in 26925a7
- name: '[Deprecated] AWS Log delivery Service' source: 'https://forums.aws.amazon.com/thread.jspa?messageID=629256' accounts: ['858827067514'] - These can instead be in the yaml. Preferably not a
deprecated: truebecause that name would be set in the "negative" instead of "positive"# simple enabled/disabled, if disabled, assume deprecated enabled: false # if it's current or not, if not, assume deprecated current: false # if this key is set, assume deprecated deprecated_date: 2025-12-31 # or maybe a last updated_date and then all deprecated accounts can be moved # to a separate file such as accounts_deprecated.yaml updated_date: 2024-12-31
- These can instead be in the yaml. Preferably not a