Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin_dir is an object #141

Closed
trajan0x opened this issue Jan 11, 2023 · 1 comment
Closed

bin_dir is an object #141

trajan0x opened this issue Jan 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@trajan0x
Copy link

trajan0x commented Jan 11, 2023

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

@trajan0x trajan0x added the bug Something isn't working label Jan 11, 2023
@trajan0x
Copy link
Author

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

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant