You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform version: 0.11.14
Terragrunt version : 0.18.6
I try to create a module with provider and backend configuration for azure (to have a dry code). I give you my code to explain my context and the problem.
My project is ordered like that:
live
__project
____vnet
______terraform.tfvars
____terraform.tfvars
modules
__provider
____provider.tf
provider.tf:
provider "azurerm" {
location = "${var.azure_location}"
}
terraform {
# The configuration for this backend will be filled in by Terragrunt
backend "azurerm" {}
}
terragrunt = {
# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
# working directory, into a temporary folder, and execute your Terraform commands in that folder.
# Include all settings from the root terraform.tfvars file
include = {
path = "${find_in_parent_folders()}"
}
}
In terraform version: 0.11.14, it's works but i have a specific bug with Azurerm provider and the backend lock (it's fixed in version 0.12.0 -> hashicorp/terraform#17046).
So, i try the new stable terraform version 0.12, and now the problem is on terragrunt side. In the terragrunt documentation, it's said that we have to add a // in the module source directory, and we have a warning alert from terraform ->
"Terraform initialized in an empty directory" warning, but you can safely ignore it.)
But with the last terraform version, it's not a warning but an error. So the copy failed:
[terragrunt] 2019/05/27 11:03:34 Error with plan: [terragrunt] [/terraform/azure/live/XXXX] 2019/05/27 11:03:34 Initializing remote state for the azurerm backend
[terragrunt] [/terraform/azure/live/XXXX] 2019/05/27 11:03:34 Running command: terraform init -backend-config=storage_account_name=XXXXX -backend-config=container_name=XXXXX-state-container -backend-config=key=XXXX.terraform.tfstate -get=false -get-plugins=false -backend=false -from-module=file://terraform/azure/modules -no-color /terraform/azure/live/XXXX/.terragrunt-cache/sGJ15K7r-s1DuFOsQZYEdYvS-Ms/pW4UMbcl9y3ALw2i0wz42jRhujQ
Copying configuration from "file:/terraform/azure/modules"...
Error: Can't populate non-empty directory
The target directory
.terragrunt-cache/sGJ15K7r-s1DuFOsQZYEdYvS-Ms/pW4UMbcl9y3ALw2i0wz42jRhujQ is
not empty, so it cannot be initialized with the -from-module=... option.
Any ideas ? or change on terragrunt side ?
Many thanks,
The text was updated successfully, but these errors were encountered:
Yup we haven't upgraded to be Terraform 12 compatible yet. You can follow that thread for the progress. There is one open discussion that needs to be resolved before we can get started on it. Sorry that I don't have a better answer here...
Hello,
Terraform version: 0.11.14
Terragrunt version : 0.18.6
I try to create a module with provider and backend configuration for azure (to have a dry code). I give you my code to explain my context and the problem.
My project is ordered like that:
live
__project
____vnet
______terraform.tfvars
____terraform.tfvars
modules
__provider
____provider.tf
provider.tf:
terraform.tfvars in the project directory:
terraform.tfvars in the vnet directory:
In terraform version: 0.11.14, it's works but i have a specific bug with Azurerm provider and the backend lock (it's fixed in version 0.12.0 -> hashicorp/terraform#17046).
So, i try the new stable terraform version 0.12, and now the problem is on terragrunt side. In the terragrunt documentation, it's said that we have to add a // in the module source directory, and we have a warning alert from terraform ->
But with the last terraform version, it's not a warning but an error. So the copy failed:
Any ideas ? or change on terragrunt side ?
Many thanks,
The text was updated successfully, but these errors were encountered: