hashicorp / hashicorp/terraform
Code generation recommendation for drift remediation
- Dominant language
- Go
- Stars
- 49.7k
- Forks
- 10.6k
- Avg merge
- 21h 30m
- Merged PRs (30d)
- 100
Description
### Terraform Version
```shell
Terraform v1.4.4
on darwin_arm64
```
### Use Cases
Terraform cloud has a feature of drift remediation, where it shows the attributes of an IaC block which have changed due to drift. Then the user can accept the suggested code changes.
https://www.hashicorp.com/blog/terraform-cloud-adds-drift-detection-for-infrastructure-management
In native terraform, we have drift detection, but no feature to remediate the drift automatically. So to resolve the drift, we have to edit the IaC code manually.
### Attempted Solutions
NA as this is a new feature request
### Proposal
Is there any plan of bringing the drift remediation feature to native terraform?
For example, if i use `terraform plan --remediate-drift` then it make changes to the TF files to bring it in sync with the running infra. Then on `terraform apply`, i can apply those changes to resolve the drift.
### References
_No response_
Contributor guide
Research direction
No source files, tests, or entry points are identified in the issue. Start by reading the proposal and the linked Terraform Cloud drift-remediation reference, then investigate where Terraform represents plan changes and configuration generation; done would require an agreed design and implementation scope for safely producing configuration changes from drift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- terraform
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100