By Morgan Lucas (she/her)
Learning about it - The hard way.
The Default Terraform workspace with Azure still held the memory of some old resources, despite removing it from the new configuration, so I always had to change the workspace as a workaround.
I finally found the issue.
It was pulling old info from my State file for a resource that's no longer there. As I continually built and destroyed infrastructure, it didn't update.
If I don't consistently keep that resource (the network interface) there, it would keep looking for something that isn't there.
So I deleted it from tf.state to see what would happen.
Result:
The resources (A security group, to test) did push to prod.
Why does Terraform's tfstate not update for Azure?