@Anish Vijay Apologies for the delay in response and all the inconvenience caused because of the issue.
Firstly as per your user case I would recommend you to follow this article since it will best fit your requirement.
Now in order to get the template first login to your Azure portal and search for Resource Groups in Search Bar which will list all the resource groups in selected subscription. Once you have it you can search for the Resource Group in which your Service Fabric Cluster is deployed:
If you are not sure about Resource Group in which cluster is deployed you can find the information in Service Fabric overview page and can directly search for the resource group as well in Search Bar:
Once inside the resource group click on deployment which will list all deployment in the resource group and then search for service fabric in Search Bar:
Click on the deployment you will get a page as below and now select the template. This is the template for Service Fabric and you can deploy or make changes accordingly:
You can use Azure CLI as well to download the template using below command. More info here
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
Export-AzResourceGroup -ResourceGroupName $resourceGroupName
To export one resource, pass that resource ID.
$resource = Get-AzResource `
-ResourceGroupName <resource-group-name> `
-ResourceName <resource-name> `
-ResourceType <resource-type>
Export-AzResourceGroup `
-ResourceGroupName <resource-group-name> `
-Resource $resource.ResourceId
Hope it helps!!!
Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics