"Run 'terraform get'" on all external modules
See original GitHub issuePrerequisites
- Ensure you have latest version of plugin installed
- Search for possible issue duplicates
Installation details
- IDE version (
Help->About->Copy to Clipboard
): RubyMine 2018.2.3 - intellij-hcl plugin version (
Settings->Plugins
): 0.6.12 - Terraform version (
terraform -v
): 0.11.8
Terraform Configuration Files
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "${var.customer}-${var.application}-${var.env}-vpc"
cidr = "${var.cidr}"
azs = ["${data.aws_availability_zones.available.names}"]
private_subnets = ["${var.private_subnets}"]
public_subnets = ["${var.public_subnets}"]
database_subnets = ["${var.database_subnets}"]
enable_nat_gateway = true
single_nat_gateway = true
tags = {
Terraform = true
Client = "${var.customer}"
Application = "${var.application}"
Environment = "${var.env}"
}
}
Exception
Expected Behavior
No terraform errors
Actual Behavior
Can't locate module locally: No .terraform found under project directory, please run `terraform get` in appropriate place more... (⌘F1)
Steps to Reproduce
rm -fr .terraform
terraform init
- open a .tf file that contains a “source” to a module that is loaded from an external source, such as the Terraform registry (see the VPC module) or Git(Hub)
terraform get
- goto 3.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:32 (8 by maintainers)
Top Results From Across the Web
Execute Terraform commands on multiple modules at once
Execute Terraform commands on multiple modules at once. Motivation. The run-all command. Passing outputs between modules. Dependencies between modules.
Read more >Module Sources | Terraform - HashiCorp Developer
Terraform installs modules from Git repositories by running git clone , and so it will respect any local Git configuration set on your...
Read more >Terraform: cannot locate module locally: unknown reason
Basically, all of my external modules that should be fetched by get are unknown regardless of whether I perform terraform get or not....
Read more >The Ultimate Guide on How to Write Terraform Modules - Part 1
Add a new variable named module_depends_on to the module's variables.tf file. The type of the variable is set to any to mimic the...
Read more >Invicton-Labs/shell-resource/external - Terraform Registry
This module allows generic shell commands to be run as a resource (will only re-run when an input variable changes). It supports both...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
upgraded to 0.6.14 but still have the error.
terrafrom code:
I ran into this on 0.7.7 & terraform 0.12 as well. Then noticed this in the logs
If I switch around my file paths so that my terraform files are under my project root, things seem to work.
Here’s the before/after filesystem tree to hopefully provide better context
Previous structure:
New structure: