Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Improving some TF loader warnings #170

Merged
merged 4 commits into from
Aug 10, 2021

Conversation

jason-fugue
Copy link
Contributor

This change improves two TF loader warnings:

  • The warnings we emit when remote submodules are missing. These currently look like:
WARNING Error loading submodule gcp-network: <nil>: Failed to read module directory; Module directory terraform-google-modules/network/google does not exist or cannot be read. 
WARNING Error loading submodule gcs_buckets: <nil>: Failed to read module directory; Module directory terraform-google-modules/cloud-storage/google does not exist or cannot be read.

After this PR, we'll collect the missing remote modules into a single warning that mentions terraform init:

# if the warning is for your current working directory
WARNING Could not load some remote submodules. Run 'terraform init' if you would like to include them in the evaluation: terraform-google-modules/network/google, terraform-google-modules/cloud-storage/google

# or if the warning is for any other directory, the name will be part of the message
WARNING Could not load some remote submodules that are used by 'google-terraform-example'. Run 'terraform init' if you would like to include them in the evaluation: terraform-google-modules/network/google, terraform-google-modules/cloud-storage/google 
  • Downgrading Skipping object key of unknown type from a warning to a debug message. There are cases where this indicates a deficiency in our loader, but it can also happen when things are working normally.

@jason-fugue jason-fugue merged commit ced6bc9 into master Aug 10, 2021
@jason-fugue jason-fugue deleted the jason-fugue/terraform-init-message branch August 18, 2021 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants