VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Rename of module corrupts source references #337

Closed snstanton closed 3 years ago

snstanton commented 3 years ago

Prerequisites

Installation details

Terraform Configuration Files

./sub1/root.tf

terraform {}
module "foo" {
  source = "../sub2"
}

./sub2/main.tf

Expected Behavior

Use the "Rename" refactoring command to rename the dir "sub2" to "sub3". The directory should be renamed and the source reference should be updated to "../sub3"

Actual Behavior

The directory was renamed to sub3, but the source reference was updated to "..\/sub3"

Steps to Reproduce

The same thing happens if you select rename from the refactor menu while on the source string.

VladRassokhin commented 3 years ago

Fixed in 0.7.13