Repository navigation
Releases
Releases · orchesterra/cloud-drift-report
v0.8.0
Added
- More idle-and-still-billing checks: an EBS volume attached to nothing (priced per GB-month for its type), a
load balancer with no registered targets (medium when it has listeners) or a Classic Load Balancer with no
instances, and EBS snapshots that look abandoned (older than 90 days, volume gone, no AMI uses them, not
from AWS Backup or Data Lifecycle Manager; medium). Snapshots are listed only when they look abandoned.
Volumes and load balancers younger than 7 days aren't judged. Prices are live per region. - Import blocks:
-o imports.tf(or-f imports) writes a Terraformimport {}block for every resource not
in IaC, grouped by region, ready forterraform plan -generate-config-out=generated.tf. Blocks whose import ID
isn't known are commented out with a note. JSON findings carryimport_id. IDs follow each resource's
Import section in the Terraform AWS provider docs: WAFv2ID/NAME/SCOPE, Application Auto Scaling
namespace/resource-id/dimension, ECS servicescluster/service, ARNs for Firehose, CloudTrail and Kinesis
Analytics,account:namefor budgets and S3 access points, names for ARN-listed types such as CloudFront
functions and Batch compute environments. - Application Auto Scaling targets are listed (Cloud Control can't list them without a namespace).
- Many state files in one run: a
--statesource or a file under an S3 prefix that can't be read or parsed no
longer stops the run; it is named in the incomplete-scan warning and the rest still count. The run stops only
when no--statecan be read at all. Empty state files are skipped, and a folder of.tfstatefiles (no
.tffiles) is read file by file. - State found from the Terraform code:
--state DIR(or no--statewhen run in a Terraform directory) reads
the backend from the code or.terraform/, then every workspace: an S3 backend's default key and
env:/<workspace>/keys, localterraform.tfstateandterraform.tfstate.d/, or the HCP Terraform /
Terraform Enterprise workspaces acloudblock orremotebackend names (by name, tags or prefix). No
terraform initis needed for these. Other backends still usestate pull.
v0.7.1
Fixed
- A region the account hasn't enabled (an opt-in region such as me-south-1) or a misspelt region now stops the
run at once with a clear message. It used to hang for minutes on each call.--all-regionsasks us-east-1
for the region list, so a disabled default region doesn't hang it either. - With
--no-cloudformationand no--state, the note says nothing counts as IaC (it said CloudFormation did).
v0.7.0
Added
- Incomplete-scan warning: when resource types can't be listed, CloudFormation stacks can't be listed or
read, the account can't be identified, or a stack's drift check fails, the report starts with a warning
that says what was missed and what that means (resources missing, or listed as not in IaC when they
are). The JSON has anincompletelist, and the same warning is printed at the end of the run. Exit
codes don't change. - Settings file:
.driftreport.ymlin the current directory (or--dir) sets flags, with top-level keys for
every mode and aterraform:,cloudformation:orunmanaged:section per mode. Command-line flags win,
relative paths are read from the file's folder, and a misspelt key is an error.--config FILEand
--no-config. PyYAML is now a dependency.
Fixed
- An
account_idin state no longer sets the resource's account: on member and sharing types such as
aws_guardduty_member,aws_ami_launch_permissionandaws_cloudformation_stack_set_instanceit names
the other account, so 0.6.2 could list them as not in IaC. - An access-denied Cloud Control listing is reported as "access denied"; it had said "the service returned an
error".
v0.6.2
Added
- Nearly unused NAT gateways: one that a route table points at but that moved under 1 GB in the last 14 days
(CloudWatchBytesOutToDestination+BytesInFromDestination, read withcloudwatch:GetMetricData) is
flagged with its monthly cost, at medium severity when it isn't in IaC. Gateways younger than 14 days are
skipped, and nothing is said when CloudWatch can't be read.
Changed
- Idle costs use live on-demand prices for the resource's region from the AWS Price List API
(pricing:GetProducts, included inReadOnlyAccess), e.g. about $41 a month for an idle NAT gateway in
ap-south-1 instead of a flat $32. If prices can't be read, us-east-1 list prices are used and the finding
says so. Monthly figures use 730 hours, so us-east-1 now shows $32.85 and $3.65 rather than $32 and $3.60. - The JSON's
idleentries have amonthly_usdnumber.
Fixed
- Not-in-IaC matching now checks the AWS account as well as the region. A state entry whose ARN (or
owner_id) names another account no longer marks a same-named resource in the scanned account as
in IaC, and--explainsays "recorded for account …". The same id in two accounts' state files is
no longer reported as a duplicate import. --versionand the HTML report footer show the installed version; they had said 0.5.0 since that release.
Full changelog: v0.6.1...v0.6.2
v0.6.1
Fixed
- An idle public NAT gateway's cost now includes the public IPv4 charge ($3.60/month per address), so a NAT gateway with one Elastic IP shows about $35.60/month instead of $32.
pip install -U cloud-drift-report
v0.6.0
Added
- Idle and still billing: the not-in-IaC scan flags NAT gateways that no route table sends traffic to (about $32/month idle) and Elastic IPs attached to nothing (about $3.60/month). Unmanaged ones are high severity with the cost in the explanation; ones in your Terraform are named in the coverage line and the JSON's
idlelist. - NAT gateways and Elastic IPs are now listed with the EC2 API instead of Cloud Control.
pip install -U cloud-drift-report
v0.5.0
Added
- Coverage percentage: the coverage line starts with "N% in IaC", and the JSON has
percent_in_iacand a per-type breakdown (by_type). --explain TEXT(not-in-IaC scan): for each listed resource whose ID, name or ARN contains TEXT, says what it matched in IaC, or why it didn't (no entry of that type, an entry for another region, the values it looked for).- Duplicate imports: a warning when one cloud resource is at two or more Terraform addresses, naming both, because two applies would fight over it.
--strictreports resources AWS created itself as low-severity findings, with the reason.
Changed
- AWS Organizations, Control Tower and StackSets defaults in member accounts are skipped as AWS-owned:
OrganizationAccountAccessRole,AWSControlTower*/aws-controltower-*,stacksets-exec-*andAWSCloudFormationStackSetExecutionRole.
cloud-drift-report unmanaged --region us-east-1 --state s3://acme-tf-state/prod/ --explain my-bucketInstall: pip install -U cloud-drift-report · GitHub Action: orchesterra/cloud-drift-report@v0
Full changes: v0.4.0...v0.5.0
v0.4.0
Added
--role-arn,--external-idand--role-session-nameforcloudformationandunmanaged: assume a role first and check another account with one set of credentials. Credentials renew during long scans, and a role that can't be assumed stops the run up front with a clear message. Ans3://state is read with your own credentials first (state usually lives in a central account), then as the role.
cloud-drift-report unmanaged --region us-east-1 \
--role-arn arn:aws:iam::222222222222:role/drift-report-readonly --external-id "$EXTERNAL_ID" \
--state s3://acme-tf-state/prod/Changed
- The README and package summary say "open-source Terraform drift detection".
- The Cursor plugin manifest lists the Cursor rule, so marketplaces show it next to the skill.
Install: pip install -U cloud-drift-report · GitHub Action: orchesterra/cloud-drift-report@v0
Full changes: v0.3.2...v0.4.0
v0.3.2
Fixed
tag:ignore rules now match load balancers, target groups and listeners in the not-in-IaC scan. AWS's Cloud Control API lists them without tags, so a rule such astag:elbv2.k8s.aws/cluster(the AWS Load Balancer Controller's tag) used to miss them. A listener also carries its load balancer's tags.- Load balancers and target groups are shown by name instead of the last part of their ARN.
The README has a new example for resources controllers create for you (Load Balancer Controller, Karpenter, Lambda log groups).
Install: pip install -U cloud-drift-report · GitHub Action: orchesterra/cloud-drift-report@v0
Full changes: v0.3.1...v0.3.2
v0.3.1
Added
- When a JSON report is written, the CLI prints a link to OrchesTerra's import page, where you can drop the file to view it.
--sharenow prints the same instructions instead of "coming soon". Nothing is uploaded.
Install: pip install -U cloud-drift-report · GitHub Action: orchesterra/cloud-drift-report@v0
Full changes: v0.3.0...v0.3.1