1

For some Dependencies reason with Terraform (using azure cli internally). I'm trying to use multiple versions of azure cli in my machine. e.g, 2.30.0 ,2.22.0

Depends on the need we are planning to change the version whenever required. But I couldn't find a way to change the azure cli version.

I can find a way to install older version but that has to be done by uninstalling the newer version and installing the older version. But I don't want to uninstall it, I want to keep the version(s) and use the different version whenever needed.

Is this possible in azure-cli ?

Jayendran
  • 9,638
  • 8
  • 60
  • 103
  • 1
    Pretty sure that's not possible. I would use containers to solve this issue. – CSharpRocks May 30 '22 at 11:24
  • @CSharpRocks can you explain a bit around your solution to use containers to call different azure cli while the terraform files are in my local PC. How do we can achieve that ? – Jayendran Jun 23 '22 at 11:18
  • 1
    I would either copy the Terraform files into the container or map a volume to the local folder like this: docker run --rm -it -v d:\Terraform:/myTerraform busybox – CSharpRocks Jun 23 '22 at 12:55

1 Answers1

1
  • As far as I know and as per the Microsoft Documentation you can't use different versions of Azure CLI in same system at a time.
  • As you already know you need to uninstall the older and install the newer when needed.
  • As suggested by CSharpRocks you can use containers to use multiple versions at a time.
  • You can Raise a Feature request and support ticket for further usage.
SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15
  • thanks for the confirmation. I have submitted the issue as a [feature request](https://github.com/Azure/azure-cli/issues/22669) – Jayendran May 30 '22 at 14:36