GCP Quick Start Unsupported argument error on terraform plan command

Hello.

I’m following the GCP Quick Start guide and I have the following error when running terraform plan command:

Error: Unsupported argument
│ 
│   on main.tf line 50, in module "iglu_lb":
│   50:   name = "${var.prefix}-iglu-lb"
│ 
│ An argument named "name" is not expected here.
╵
│ Error: Unsupported argument
│ 
│   on main.tf line 52, in module "iglu_lb":
│   52:   instance_group_named_port_http = module.iglu_server.named_port_http
│ 
│ An argument named "instance_group_named_port_http" is not expected here.
╵
│ Error: Unsupported argument
│ 
│   on main.tf line 53, in module "iglu_lb":
│   53:   instance_group_url             = module.iglu_server.instance_group_url
│ 
│ An argument named "instance_group_url" is not expected here.
╵
│ Error: Unsupported argument
│ 
│   on main.tf line 54, in module "iglu_lb":
│   54:   health_check_self_link         = module.iglu_server.health_check_self_link
│ 
│ An argument named "health_check_self_link" is not expected here.
╵
│ Error: Unsupported argument
│ 
│   on main.tf line 56, in module "iglu_lb":
│   56:   ssl_certificate_enabled = var.ssl_information.enabled
│ 
│ An argument named "ssl_certificate_enabled" is not expected here.
╵
│ Error: Unsupported argument
│ 
│   on main.tf line 57, in module "iglu_lb":
│   57:   ssl_certificate_id      = var.ssl_information.certificate_id
│ 
│ An argument named "ssl_certificate_id" is not expected here.

what does it means? What I’m doing wrong or missing? I’m running terraform from a Debian 11 VM machine. The first command terraform init is successfully initiated. I’ve also update the terraform.tfvars file with (I hope!) the correct values.

Hi @simonbreton I imagine you are using a new provider version with a ton of breaking changes - any chance you can use the 3.x branch and see if that fixes things?

Hey @josh

What do you mean by provider? I’ve downloaded the GCP quick start from Github (last version 22.01). Looking inside the version.tf file I have this:

terraform {
  required_version = "~> 1"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 3.44.0"
    }
    random = {
      source  = "hashicorp/random"
      version = "~> 3.1.0"
    }
  }
}

What do I need to update exactly?

Hi @simonbreton

Just having a look into this problem at the moment - Can you try out using the versions.tf config below ?

Tested using - 
Terraform v1.1.9

terraform {
  required_version = "~> 1"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 3.90.1"
    }
    random = {
      source  = "hashicorp/random"
      version = "~> 3.1.0"
    }
  }
}
2 Likes

Working. Thanks a lot. Let’s see what next wall I’ll be hitting ;p

Great Stuff @simonbreton
Any further issues just let us know !:slight_smile: