Azure VM Recreate Every Apply

Hi there, newish to Terraform.

I’m creating a new VM via Terraform. When I rerun the plan/apply it wants to destroy and create the resource due to the private_ip_addresses variable changing. I’m assigning a static private ip via the nic resource creation.

I’ve added it to ignore_changes but it doesn’t seem to work.

Hi @karm,

we had a similar problem and also suspected the IPs. It turned out to be a bug in Terraform pertaining to the “custom_data” field. See this post.

Best regards,
SBiesinger