feat(rules): add storage and node generation cost rules - #135
Conversation
Adds CLDBRN-AWS-S3-5 for buckets that declare no lifecycle configuration and no enabled Intelligent-Tiering configuration. Lifecycle-managed buckets stay with CLDBRN-AWS-S3-2 so the two storage-class rules never flag the same bucket. Closes #113
Adds CLDBRN-AWS-RDS-11 for DB instances on gp2 or magnetic storage, where gp3 costs less per GB and provisions IOPS independently. The RDS datasets now carry the storage type in both scan modes. Refs #121
roborev: Combined Review (
|
roborev review findings: - AwsStaticRdsInstance.storageType is optional again so the publicly exported type stays additive for consumers building their own fixtures. The loader still always sets it and the evaluator already handled a missing value. - Record why an Intelligent-Tiering configuration counts as adoption intent rather than proof of tiering in CLDBRN-AWS-S3-5, since AWS applies that configuration only to objects already in the Intelligent-Tiering storage class.
Both findings reviewed. One fixed, one accepted as accurate but resolved with documentation rather than a behavior change. Breaking public type change — fixed in b4187c4. Intelligent-Tiering signal — accurate, documented, behavior unchanged. You are right on the AWS semantics, and I confirmed it in the API reference for Keeping the skip anyway, deliberately:
What changed instead: the gap is now recorded in the
|
Summary
CLDBRN-AWS-S3-5recommends Intelligent-Tiering for buckets that declare no lifecycle configuration and no enabled Intelligent-Tiering configuration (Add S3 Intelligent-Tiering recommendation rule #113).CLDBRN-AWS-RDS-11flags DB instances ongp2or magnetic storage, where gp3 costs less per GB and provisions IOPS independently (Add RDS storage type and ElastiCache generation rules #121).CLDBRN-AWS-ELASTICACHE-3flags clusters on previous-generation cache node families (Add RDS storage type and ElastiCache generation rules #121).iacanddiscovery, none needs a new CloudWatch metric dataset, and two of the three extend datasets that already existed.storageTypein both scan modes, and a new staticaws-elasticache-clustersdataset normalizes node types from Terraform cache clusters and replication groups plus their CloudFormation equivalents.Two deliberate scoping decisions, both documented in
docs/reference/rule-ids.md:CLDBRN-AWS-RDS-11skips provisioned IOPS types (io1/io2). gp3 cannot always match their attainable IOPS, so the substitution is not universally cheaper. It also skips IaC resources that leave the storage type unresolved or unset, because the documented default differs between the Terraform provider and the RDS API.CLDBRN-AWS-S3-5only covers buckets with no lifecycle configuration at all. Lifecycle-managed buckets stay withCLDBRN-AWS-S3-2, so the two storage-class rules never flag the same bucket. Issue Add S3 Intelligent-Tiering recommendation rule #113 asked for that boundary to be settled during implementation.Diagram
flowchart LR subgraph iac["IaC sources"] TF["Terraform"] CFN["CloudFormation"] end subgraph sdk["@cloudburn/sdk datasets"] S3["aws-s3-bucket-analyses<br/>(unchanged)"] RDS["aws-rds-instances<br/>+ storageType"] EC["aws-elasticache-clusters<br/>(new static dataset)"] end subgraph rules["@cloudburn/rules"] R1["CLDBRN-AWS-S3-5<br/>Intelligent-Tiering"] R2["CLDBRN-AWS-RDS-11<br/>gp2 / magnetic storage"] R3["CLDBRN-AWS-ELASTICACHE-3<br/>previous-gen node type"] end AWS["Live AWS discovery"] TF --> S3 TF --> RDS TF --> EC CFN --> S3 CFN --> RDS CFN --> EC AWS --> S3 AWS --> RDS AWS --> EC S3 --> R1 RDS --> R2 EC --> R3Scope
cloudburn(cli)@cloudburn/sdk@cloudburn/rulesRelease Notes
.changeset/*.mdfile for published package changesVerification
pnpm lintpnpm typecheckpnpm testpnpm buildpnpm verifyAlso confirmed through the built CLI against a scratch directory holding both a
main.tfand atemplate.yaml: all three rules report the expected resource, path, line, and column for each source kind.Boundary Checks
@cloudburn/rulespnpm exec turbo boundariesreports no issues.Related Issues
Closes #113
Closes #121