Resizing an existing AVD using Terraform

Hi, I’m new here so please be patient.

I would like advice from anyone who has successfully resized an existing Azure Virtual machine using Terraform.

So, for example, I have a number of computers in a host pool.
These computers are designated as Standard D2as v4.

I would like to resize one or more of them to, say, D4s_v3

I can do this via the console but obviously the next time Terraform checks on the estate, those changes would be undone.

Thanks in advance,