Closed DenisBY closed 1 year ago
By any chance, did you use the -show-analysis
flag to see what prevented tfautomv from identifying the missing moves?
Thanks for pointing me out. It seems it's mostly because of tags. I refactored code "a little bit".
│ module.ec2-rabbitmq-cluster.aws_lb_listener.rabbitmq_alb
│ ╷
│ │ Mismatch: aws_lb_listener.rabbitmq_alb
│ │ ╷
│ │ │ + tags_all.maintainer = "da"
│ │ │ - tags_all.maintainer = <nil>
│ │ │ + tags_all.owner = "da"
│ │ │ - tags_all.owner = <nil>
│ │ │ + tags_all.env = "acc"
│ │ │ - tags_all.env = <nil>
│ │ │ + tags_all.project = "da"
│ │ │ - tags_all.project = <nil>
│ │ ╵
│ ╵
│
│ module.ec2-rabbitmq-cluster.aws_lb_target_group.rabbitmq_alb
│ ╷
│ │ Mismatch: aws_lb_target_group.rabbitmq_alb
│ │ ╷
│ │ │ + tags_all.owner = "da"
│ │ │ - tags_all.owner = <nil>
│ │ │ + tags_all.project = "da"
│ │ │ - tags_all.project = <nil>
│ │ │ + tags_all.maintainer = "da"
│ │ │ - tags_all.maintainer = <nil>
│ │ │ + connection_termination = false
│ │ │ - connection_termination = <nil>
│ │ │ + tags_all.env = "acc"
│ │ │ - tags_all.env = <nil>
│ │ ╵
│ ╵
I moved my state to the module. After executing
tfautomv
I got:And
moves.tf
contained this:however, I have more moved resources.
I had to manually add the rest, i.e.:
etc. 12 more moved resources.