Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

terraform download of foundations blueprint 'provider_meta.module_name' purpose/location?

Hi, 

Having gone through the process of using the 'Google Cloud Setup' in the Google Cloud Console, I downloaded the resulting terraform but am at a loss to where it refers to 'provider_meta' & 'module_name' in 'versions.tf'. The module name being referred to isn't part of the downloaded files and neither can I see it as part of the storage bucket that was set up when downloading the terraform code. So I'd like to know please what this code is doing, is it referring to a bespoke version of the providers and if so where is the module and why would this be necessary over just referring to the providers?

I've changed part of the 'module_name' variable below to remove the seemingly random string value and substituted it for '<stringvar>' as I don't know if it is sensitive information. This '<stringvar>' changes if I redownload the terraform so for some reason it seems something is done behind the scenes that relates to my specific input to the 'Google Cloud Setup' process.

This 'versions.tf' file...

 

terraform {
  required_version = ">= 1.3"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 5.22"
    }
    google-beta = {
      source  = "hashicorp/google-beta"
      version = ">= 5.22"
    }
  }
  provider_meta "google" {
    module_name = "blueprints/terraform/fs-exported-<stringvar>/v0.1.0"
  }
  provider_meta "google-beta" {
    module_name = "blueprints/terraform/fs-exported-<stringvar>/v0.1.0"
  }
}

 

 Thanks in advance for any assistance you can offer me as I'm new to GCP & Terraform.

 

 

0 1 803
1 REPLY 1