feat: add minimal set of aws-config-* functions (BMA-6)#353
Open
ai-cora wants to merge 1 commit into
Open
Conversation
Adds a new lib/aws-config-functions file with seven listing functions covering the top-level resource types in AWS Config: aws-config-recorders # configuration recorder definitions aws-config-recorder-status # whether recorders are currently recording aws-config-rules # Config rules + state + source aws-config-rule-compliance # compliance status for given rule(s) aws-config-delivery-channels # delivery channels aws-config-aggregators # configuration aggregators aws-config-conformance-packs # conformance packs Functions follow the existing bash-my-aws conventions: skim-stdin for piped input, __bma_read_filters for grep-style filtering on listing functions, columnise for output, USAGE/EXAMPLE comments above each function, JMESPath queries for shaping AWS CLI output. The cloudtrails / cloudtrail-status split is mirrored here as aws-config-recorders / aws-config-recorder-status because the two AWS API calls (describe-configuration-recorders and describe-configuration-recorder-status) return different shapes and composability via skim-stdin is the more BMA-idiomatic way to join them. Generated files (functions, aliases, docs/command-reference.md) are regenerated by scripts/build and committed alongside. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
lib/aws-config-functionswith seven listing functions covering the top-level resource types in AWS Config:aws-config-recordersaws-config-recorder-statusaws-config-rulesaws-config-rule-complianceaws-config-delivery-channelsaws-config-aggregatorsaws-config-conformance-packsFollows existing BMA conventions:
skim-stdinfor piped input,__bma_read_filtersfor grep-style filtering on listings,columnisefor output, USAGE/EXAMPLE comments, JMESPath queries.Design note
Scope agreed with @mbailey was six functions, but I split
aws-config-recorders/aws-config-recorder-statusmirroring the existingcloudtrails/cloudtrail-statuspattern. The two underlying AWS API calls (describe-configuration-recordersanddescribe-configuration-recorder-status) return genuinely different shapes, and composing them viaskim-stdin(aws-config-recorders | aws-config-recorder-status) is more BMA-idiomatic than a merged view. Happy to fold them back into one if preferred.Test plan
make buildregeneratesfunctions,aliases,bash_completion.sh,docs/command-reference.mdmake check-- passes after commitmake test-- 15 passed, 0 failedbash -n lib/aws-config-functions-- clean🤖 Generated with Claude Code