PaloAltoNetworks / terraform-google-vmseries-modules

Terraform Reusable Modules for VM-Series on Google Cloud Platform (GCP)
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/google
MIT License
16 stars 27 forks source link

[Bug Report] Autoscale module not exposing project_id #216

Closed horiagunica closed 1 year ago

horiagunica commented 1 year ago

Describe the bug

When trying to run the autoscale example :

│ Error: Missing required argument
│
│   with module.autoscale.google_project_iam_member.delicensing_cfn["roles/compute.viewer"],
│   on ../../modules/autoscale/main.tf line 311, in resource "google_project_iam_member" "delicensing_cfn":
│  311:   project  = data.google_project.this.project_id
│
│ The argument "project" is required, but no definition was found.
╵
╷
│ Error: Missing required argument
│
│   with module.autoscale.google_project_iam_member.delicensing_cfn["roles/secretmanager.secretAccessor"],
│   on ../../modules/autoscale/main.tf line 311, in resource "google_project_iam_member" "delicensing_cfn":
│  311:   project  = data.google_project.this.project_id
│
│ The argument "project" is required, but no definition was found.
╵
╷
│ Error: Missing required argument
│
│   with module.autoscale.google_project_iam_member.delicensing_cfn_invoker[0],
│   on ../../modules/autoscale/main.tf line 358, in resource "google_project_iam_member" "delicensing_cfn_invoker":
│  358:   project = data.google_project.this.project_id
│
│ The argument "project" is required, but no definition was found.

Module Version

1.2.2

Terraform version

Terraform v1.3.7

Expected behavior

No response

Current behavior

No response

Anything else to add?

Suggested fix - expose project_id of the datasource as a variable :

data "google_project" "this" {
  project_id = var.project_id
}
horiagunica commented 1 year ago

update config

horiagunica commented 1 year ago

issue still exists