VladRassokhin / intellij-hcl

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

Downloaded modules should be treated as External Libraries #282

Open eriksw opened 4 years ago

eriksw commented 4 years ago

Prerequisites

Installation details

Terraform Configuration Files

module "managed-instance-group" {
  source  = "GoogleCloudPlatform/managed-instance-group/google"
  version = "1.1.15"
}

Exception

N/A

Expected Behavior

What should have happened?

After downloading the module (running terraform get), the source code of the module should have been treated as an External Library: • The IDE should not treat the contents of .terraform/ as project files. • The IDE should not include it when searching with a scope of Project. • The IDE should protect it from unintentional modification. • Each external module source × version should appear in the "External LIbraries" in the side drawer. etc... • Modules with a relative source within the project sources should not appear as External Libraries, but the copy/links to them created in .terraform/ by terraform get should still be excluded from the Project scope.

Actual Behavior

What actually happened?

Terraform module files downloaded by running terraform get are treated as project files.

Steps to Reproduce

  1. Instantiate a module from an external source, such as above.
  2. Run terraform init (or terraform get) to download the module.
  3. Observe that the downloaded files in the .terraform/ directory are treated as project files.