@Shilpi Verma , thank you for the question. The steps to achieve the end goal (Azure Managed Grafana with Terraform) is provided in Grafana's documentation as available below: Creating and managing dashboards using Terraform and GitHub Actions
A little variation is there for Azure Managed Grafana in terms of API Keys/Service account required for authentication. For that, please refer the docs below:
Generate and manage Grafana API keys in Azure Managed Grafana
You might also want to use the Service Account based authentication from Terraform which is recommended by Grafana. Azure Managed Grafana doc is here for it - How to use service accounts in Azure Managed Grafana
For details about the Service Account in Grafana, please see official doc here - Grafana: Service accounts
Hope this helps.