Updating to the latest version of AzureRM and Terraform can bring new features, bug fixes and security improvements to your infrastructure. However, updating these tools can be a bit tricky, especially if you’re not familiar with the process. In this blog post, we will be discussing the step-by-step process for updating AzureRM and Terraform on Windows, Linux, and MacOS.
Updating AzureRM on Windows:
- Open the Windows PowerShell as an Administrator.
- Run the command:
Uninstall-Module -Name AzureRM -AllVersions -Force
to uninstall the current version of AzureRM. - Run the command:
Install-Module -Name AzureRM -AllowClobber
to install the latest version of AzureRM. - Verify the installation by running the command:
Get-Module -ListAvailable AzureRM
Updating AzureRM on Linux and MacOS:
- Open the terminal.
- Run the command:
sudo pip3 uninstall azurerm -y
to uninstall the current version of AzureRM. - Run the command:
sudo pip3 install azurerm
to install the latest version of AzureRM. - Verify the installation by running the command:
pip3 list --format=legacy | grep azurerm
Updating Terraform on Windows, Linux, and MacOS:
- Open the terminal.
- Run the command:
terraform -v
to check the current version of Terraform. - Download the latest version of Terraform from the official website.
- Replace the old binary with the new one.
- Verify the installation by running the command:
terraform -v
again
It’s important to note that updating AzureRM version may break your existing Terraform scripts, so it’s important to also test your scripts after updating and make any necessary changes.
Additionally, before updating, it’s always a good practice to review the changelog of the new version and check for any breaking changes that may affect your current implementation.
It’s also important to document the changes that were made during the update process so that you can refer back to them if needed in the future.
Also, keep track of the version of AzureRM and Terraform that you are using, so you know when an update is available and stay updated with the latest release to ensure you have the latest features and bug fixes.
In conclusion, updating AzureRM and Terraform can bring new features and security improvements to your infrastructure, but it’s important to follow the proper process and thoroughly test any changes made.