cloudflare / cloudflare/tf-migrate
verify-drift fails to list resources in modules
- Dominant language
- Go
- Stars
- 33
- Forks
- 12
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 2
Description
### tf-migrate version
1.1.0
### Migration path
v4 to v5
### Affected resource type(s)
all
### Description
verify-drift appears to derive detected resources from module. instead of the actual Terraform resource type segment ( cloudflare_dns_record , cloudflare_ruleset ), which can mis-scope resource exemption loading/reporting.
### Input configuration
```hcl
Terraform will perform the following actions:
# module.dns.cloudflare_dns_record.CAA["example.com_@_issue_x"] will be updated in-place
~ resource "cloudflare_dns_record" "CAA" {
~ flags = "0" -> 0
}
# module.zone.cloudflare_ruleset.cache_settings["example.com"] will be updated in-place
~ resource "cloudflare_ruleset" "cache_settings" {
~ rules = [
~ {
~ action_parameters = {
~ cache_key = {
~ custom_key = {
~ query_string = {
+ exclude = { list = ["*"] }
}
}
}
}
}
]
}
Plan: 0 to add, 2 to change, 0 to destroy.
```
### Expected output
```hcl
Resources detected: dns_record, ruleset
```
### Actual output
```shell
Resources detected: dns, zone
```
### Steps to reproduce
Run `tf-migrate verify-drift --file plan.txt` on supplied plan.
### Additional context
_No response_
Contributor guide
Research direction
Start at the `tf-migrate verify-drift --file plan.txt` entry point and reproduce the issue with the supplied Terraform plan. Trace how module resource addresses are parsed; done means the command reports `Resources detected: dns_record, ruleset` instead of `dns, zone`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100