What is the behaviour Terraform Plan?

Viewed 24

Learning Terraform, and in one of the tutorials for terraform with azure a requirement was to log in with the az client. Now my understanding is that this was to create a Service Princlple.

I was trying this with Github actions and my assumption was that the properties obtained for the Service Principle. When I tried running terraform plan everything worked out fine.

However, when I tried to do terraform apply it failed until I explicitly did an az login step in the github workflow job.

What am I missing here? Does terraform plan only compare the new configuration file against the state file, not the actual account? Or does it verify the state against the resource-group/subscription in Azure?

I was a little confused with the documentation on terraform plan

0 Answers
Related