How to Fix terraform version in Base Image

How can we set a fixed Terraform version so that it is already available in the base image and does not need to be downloaded repeatedly?

@robingoyal

Could you please share the lab link or the KKE level and task name? I’ll check it.

hi @raymond.baoly

We want to restrict Terraform downloads within our project’s Docker image. Currently, Terraform downloads the required providers every time a pipeline is triggered, which causes unnecessary overhead and external internet dependency.

Our goal is to package the required Terraform binary and provider plugins inside the Docker image so that Terraform always uses the pre-downloaded versions locally, without reaching out to the internet.

Please advise on the best way to configure this setup so that pipelines consistently use the locally available Terraform components.

I don’t have any lab link , it’s in my current project.

Hi @robingoyal

Please try to refer this way https://stackoverflow.com/questions/50944395/use-pre-installed-terraform-plugins-instead-of-downloading-them-with-terraform-i