The Azure Active Directory Data Sources and Resources have been split out into the new Provider - which means the name of the Data Sources and Resources has changed slightly.

The main difference in naming is that the azurerm_ prefix has been removed from the names of the Data Sources and Resources - the following table explains the new name for each of the Azure Active Directory resources:

Type

Old Name

New Name

Data Source

azurerm_azuread_application

azuread_application

Data Source

azurerm_azuread_service_principal

azuread_service_principal

Resource

azurerm_azuread_application

azuread_application

Resource

azurerm_azuread_service_principal

azuread_service_principal

Resource

azurerm_azuread_service_principal_password

azuread_service_principal_password

Once the Provider blocks have been updated, it should be possible to replace the azurerm_ prefix in your Terraform Configuration from each of the AzureAD resources (and any interpolations) so that the new resources in the AzureAD Provider are used instead.

As the Terraform Configuration has been updated - we can move each of the resources in the state using the terraform state mv command, for example:

$ terraform state mv azurerm_azuread_application.test azuread_application.test
Moved azurerm_azuread_application.test to azuread_application.test

This needs to be repeated for each of the Azure Active Directory resources which exist in the state.

Once this has been done, running terraform plan should show no changes:

$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
No changes. Infrastructure is up-to-date.
This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.