terraform-google-modules/terraform-google-gcloud

bin_dir is an object

trajan0x opened this issue · 1 comments

TL;DR

I'm trying to pass bin_dir as an argument and it's being interpreted as a string rather than an object

Expected behavior

bin_dir is a string

Observed behavior

bin_dir is an object

Terraform Configuration

# used to download gcloud
module "gcloud" {
  source  = "terraform-google-modules/gcloud/google"
  version = "~> 3.0"

  platform = "linux"
  additional_components = ["beta"]

  # see: https://github.com/terraform-google-modules/terraform-google-gcloud/issues/94
  for_each = {
    timestamp = "${timestamp()}"
  }

  create_cmd_entrypoint  = "gcloud"
  create_cmd_body        = "version"
  destroy_cmd_entrypoint = "gcloud"
  destroy_cmd_body       = "version"
}


data "external" "bastion" {
  program = ["python3", "${path.module}/scripts/create_bastion_proxy.py"]
  query = {
    project  = var.project_id
    zone     = local.bastion_zone
    hostname = module.bastion.hostname
    bin_dir = tostring(module.gcloud.bin_dir)
  }

  depends_on = [module.bastion]
}

Terraform Version

1.3.7 (this is terraform cloud)

Additional information

while I don't think it's germane, the script being run is from here: jenkins-x/terraform-google-jx@647deca#diff-4852de6762e97bf63cf2e2b61d762eb3c100180d17783c2e6cdb5f7592013ebc

Oh, I think this is because of the meta argument I added (see: #94 (comment)).

Closing