Undeclared input variable in root module AKS Principal ID data azuread

Hi - I am trying to retrieve AKS principal ID to pass it into ACR_PULL role but I am getting an error Undeclared input variable in root module

data “azuread_service_principal” “aks_principal” {

application_id = var.aks_service_principal_client_id

}
An input variable with the name “aks_service_principal_client_id” has not been declared. This variable can be declared with a variable “aks_service_principal_client_id” {} block.

Please advise if this variable has to be declated in terraform.tfvars file

Thank you so much

Please double-check the definition of the variable.
Usually a file variables.tf is used for that.