I am new to terraform and trying to configure the notificationHUB with terraform 0.14.5 and we are getting error as notificaitonid not found
Error:
"id":/subscriptions/XXXXXXXX/resourceGroups/XXXX/providers/Microsoft.Notificationhubs/namespaces/XXX/notificationhubs/xxxx"
when it was apply the latest provider it was showing as Microsoft.NotificationHubs
CodePudding user response:
The issue was caused due to Azure version, since it was an old version (2.44.0). The latest fix will be in the 3.18.0 version.
Solution:
- Update the azurem version under
provider.tf
from 2.44.0 to 3.18.0.
azurerm = { source = "hashicorp/azurerm" version = "=3.18.0" }
- Run “
terraform init -upgrade
”
Run terraform plan.
Run terraform apply.
Note: -var-file <.tfvar File>
is optional. this new version 3.18.0 azurerm
will take the providers/Microsoft.NotificationHubs
namespace automatically and id will reflect on statefile.