Technical Preview
Pre-releaseI AM ($IAM) excited to announce the first technical preview pre-release of reconcile-tfstate! This tool helps you detect and manage discrepancies between your Terraform state file and your live AWS infrastructure. Our goal is to provide a robust solution for identifying drift and assisting with state reconciliation.
As a technical preview, this release is intended for early adopters to test and provide feedback. Expect ongoing development, potential breaking changes in future pre-releases, and an evolving feature set. Your input is crucial for shaping the future of this tool!
What's Included
This initial preview focuses on core functionality:
- Terraform State File Parsing: Reads and interprets Terraform state files (currently supporting Terraform state file version 4).
- AWS Resource Verification: Connects to your AWS account to verify the existence and details of resources declared in your state.
- S3 State Support:
- Download: Automatically downloads Terraform state files from S3 buckets.
- Upload Instructions: Provides clear AWS CLI commands to upload the modified state back to S3, ensuring versioning is maintained.
- Drift Detection: Identifies resources that are:
DANGEROUS: In state but not found in AWS (e.g., manually deleted).POTENTIAL_IMPORT: Found in AWS but with a different ID than in state, suggesting they exist but aren't correctly tracked.REGION_MISMATCH: Resources whose ARNs indicate they are in a different AWS region than the one being checked.
- Actionable Commands: Generates
terraform importorterraform state rmcommands where applicable, helping you resolve discrepancies. - Supported Resource Types: Initial support for verifying common AWS resources, including:
aws_s3_bucketaws_cloudwatch_log_groupaws_key_pairaws_security_groupaws_route53_zoneaws_lbaws_lb_listeneraws_lb_target_groupaws_lb_listener_rule- Ignores local/data resources like
aws_caller_identity,aws_iam_policy_document,archive_file,local_file, andrandom_password.
- Concurrency Control: Allows you to specify the number of concurrent AWS API calls for faster checks.
- Version Flag: Use
--vto display the tool's version.
Known Limitations & Areas for Improvement
- Limited Resource Type Coverage: The current version only supports a subset of AWS resource types. We plan to expand this significantly.
- Read-Only Verification: This tool performs read-only checks against AWS. It does not modify your AWS resources directly. Any suggested
terraformcommands must be executed manually. - Error Handling Refinements: Ongoing work to improve error messaging and robustness.
- Terraform State Version Support: Currently restricted to v4 state files.
We Need Your Feedback!
This is your chance to influence the development of reconcile-tfstate. Please report any issues, unexpected behaviors, or feature requests via the GitHub Issues page.
Thank you for being an early tester!