Can we copy data from server/VM to local machine(created via tf), like reverse providers in terraform

I need to copy Kubernetes cert etc to local from (while on terrraform run) as a part of my automation work, else it is too much manual work to make thing work.

So like i do get AKS credentials
Download cluster credentials: (if i would run cmd on local machine)
az aks get-credentials --resource-group --name …
This will ideally download the kubernetes creds in my local machine(in .kube/conf) where i am executing this code.