Since upgrade to Terraform 0.13.0 terraform is always downloading the latest azurerm provider in addition to the requested version.
Terraform v0.13.0
+ provider registry.terraform.io/-/azurerm v2.23.0
+ provider registry.terraform.io/hashicorp/azurerm v2.19.0
terraform {
backend "azurerm" {
resource_group_name = "terraform-rg"
storage_account_name = "satestterraform"
container_name = "tfstate"
key = "function_app"
}
}
provider "azurerm" {
version = "=2.19.0"
}
terraform init
Initializing the backend...
Successfully configured the backend "azurerm"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.
Terraform has been successfully initialized!
Should only download specified provider version hashicorp/azurerm v2.19.0
Downloaded the requested version and -/azurerm v2.23.0 (latest)
terraform initWorked without any issues using terraform 0.12.29
Hey @andrew-sumner!
I think doing state replace-provider should fix this issue! You can find more information about this command here: https://www.terraform.io/upgrade-guides/0-13.html
terraform state replace-provider 'registry.terraform.io/-/azurerm' 'registry.terraform.io/hashicorp/azurerm'
I can second @TomTucka 's suggestion, though it's worth noting that it's not going to cause any issues from terraform's perspective. This is a duplicate of #25771; you can see my explanation in this comment. Thanks!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hey @andrew-sumner!
I think doing
state replace-providershould fix this issue! You can find more information about this command here: https://www.terraform.io/upgrade-guides/0-13.htmlterraform state replace-provider 'registry.terraform.io/-/azurerm' 'registry.terraform.io/hashicorp/azurerm'