terraform-ibm-modules / terraform-ibm-base-ocp-vpc

Provisions a Red Hat OpenShift VPC cluster on IBM Cloud
Apache License 2.0
1 stars 7 forks source link

terraform-ibm-base-ocp-vpc docs is missing kubectl prereq #449

Closed ocofaigh closed 1 month ago

ocofaigh commented 4 months ago

https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc?tab=readme-ov-file#before-you-begin needs tobe updated to mention kubectl since its used by the confirm_network_healthy script

lionelmace commented 4 months ago

@ocofaigh I'm running the terraform script from terraform.io and kubectl cannot be installed, I believe.

lionelmace commented 4 months ago

Best would be to install kubectl in the script

provisioner "local-exec" {
    command = "curl -LO [https://storage.googleapis.com/kubernetes-release/release/$(curl -s [https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl"
  }

and move it in the path (/usr/bin) to be safe.

ocofaigh commented 4 months ago

I don't think its a good idea to install dependant binaries as part of the module execution to the runtime, especially since it would also require public access which some consumers may not have. I think documenting it as a required dependency is a fair ask.

ocofaigh commented 1 month ago

Doc updated in https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/pull/498