Unresolvable symlinks lead to issues with Terraform Cloud
dkleuser opened this issue · 0 comments
We want to use the module to create reserved IP addresses on GCP and we're using Terraform Cloud as backend and to execute the runs.
But during the plan
stage, Terraform Cloud exits with an error showing this message:
failed pulling filesystem: ssh: failed parsing message: failed scanning message: expected integer�
According to this help page, this error message appears when there are symbolic links that cannot be resolved.
I ran find . -type l ! -exec test -e {} \; -print
to find unresolvable symlinks in this repository and found the following:
./test/fixtures/dns_forward_example/terraform.tfvars
./test/fixtures/ip_address_only/terraform.tfvars
./test/fixtures/dns_forward_and_reverse/terraform.tfvars
./test/fixtures/ip_address_with_specific_ip/terraform.tfvars
I'm not sure if these are only created during CI runs or if they are left-overs, but their absence breaks the VCS driven workflow on Terraform Cloud as is does not support excluding/ignoring files.
When running terraform plan
locally and adding those files to a .terraformignore
file, the plan command exits successfully. But as mentioned above, this does not work with the runs on Terraform Cloud.
Example config:
locals {
default_prefix = "some-prefix"
}
module "reserved-external-static-ips" {
source = "terraform-google-modules/address/google"
version = "2.1.0"
project_id = "some-project"
region = "europe-west3"
global = true
address_type = "EXTERNAL"
addresses = [
"",
"",
"",
]
names = [
"${local.default_prefix}-k8s-https-lb-dev",
"${local.default_prefix}-k8s-https-lb-stg",
"${local.default_prefix}-k8s-https-lb-prd",
]
}