Skip to content

feat: complete VPC route tables (#293), advance CFN drift detection (#290) - #301

Merged
scttfrdmn merged 2 commits into
mainfrom
feat/issues-290-293
Jun 2, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
feat/issues-290-293

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Jun 2, 2026 •

Copy link
Copy Markdown
Owner

#293 — VPC route tables (COMPLETE → closes #293)

  • ReplaceRoute and ReplaceRouteTableAssociation (the latter returns a fresh newAssociationId, matching AWS).
  • DescribeRouteTables now honours vpc-id, association.subnet-id, and association.route-table-id filters (reusing extractEC2Filters), not just RouteTableId.
  • Default-VPC IGW route: ensureDefaultVPC previously claimed (in a comment) to add an IGW route but created no internet gateway and only the local route. It now creates+attaches a default IGW and adds 0.0.0.0/0 → igw-… to the main route table.

#290 — CloudFormation drift detection (PARTIAL → #290 stays open)

  • MODIFIED detection via a new cfnDriftComparators map. The comparator re-parses the stored template and resolves intrinsics/params at drift-check time, then compares against live plugin state. The S3 VersioningConfiguration comparator is implemented and tested end-to-end (deploy a versioned bucket, change it outside CloudFormation, drift reports MODIFIED with a PropertyDifferences entry).
  • DescribeStackResourceDrifts (optional status filter) and StartStackDriftDetection / DescribeStackDriftDetectionStatus (DETECTION_IN_PROGRESS → DETECTION_COMPLETE).
  • New types CFNPropertyDiff, CFNDriftDetectionStatus; CFNResourceDriftEntry gained PropertyDifferences; enum gained MODIFIED.

Why #290 stays open

Faithful property-level MODIFIED is bounded by what each plugin persists. Of the six drift-checkable types, only S3 versioning qualifies today (deploy path sets the property and it is independently readable). DynamoDB/SQS/SNS/Lambda/IAM remain existence-only (DELETED/IN_SYNC) — broadening requires a larger cross-plugin change to persist comparable properties. The cfnDriftComparators map makes adding types straightforward later. This PR advances #290 but does not fully satisfy its acceptance criteria, so it is left open (per the project's partial-ship release rule).

Notes

Closes #293

…290)

#290 — CloudFormation drift detection (PARTIAL, stays open):
- Add MODIFIED status via cfnDriftComparators map; S3 VersioningConfiguration
  comparator implemented end-to-end (re-parses template + resolves intrinsics).
  Other drift-checkable types remain existence-only (bounded by what plugins
  persist). New CFNPropertyDiff + PropertyDifferences on CFNResourceDriftEntry.
- Add DescribeStackResourceDrifts (with status filter), StartStackDriftDetection
  + DescribeStackDriftDetectionStatus (IN_PROGRESS -> COMPLETE), CFNDriftDetectionStatus.
- Broader property-level MODIFIED (DynamoDB/SQS/SNS/Lambda/IAM) deferred; #290 left open.

#293 — VPC route tables (COMPLETE):
- Add ReplaceRoute + ReplaceRouteTableAssociation (fresh newAssociationId).
- describeRouteTables honours vpc-id / association.subnet-id / association.route-table-id
  filters via extractEC2Filters.
- ensureDefaultVPC creates+attaches a default IGW and adds 0.0.0.0/0 -> igw route
  to the default VPC main route table.

Tests added; make test (race) + lint clean.

Closes #293
@scttfrdmn
scttfrdmn force-pushed the feat/issues-290-293 branch from 6495151 to 6800a5e Compare June 2, 2026 20:10
@scttfrdmn scttfrdmn changed the title feat: complete CloudFormation drift detection and VPC route tables (#290, #293) feat: complete VPC route tables (#293), advance CFN drift detection (#290) Jun 2, 2026
@codecov

codecov Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.57604% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
betty_cfn.go 69.38% 20 Missing and 10 partials ⚠️
ec2_plugin.go 80.67% 11 Missing and 12 partials ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit a3e749a into main Jun 2, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the feat/issues-290-293 branch June 2, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPC route table simulation

1 participant