Terraform and Github

Hi folks!

Im new to Terraform and GitHub, but trying to lears.
Want to start the right way, so that I dont have to do all my work over again.

Using VSC for writing my code, and have created a repo in GitHub. Created some code, then doing a commit, then push. All good, the repo is in sync.
I have a .gitignore file in place, so that I dont get trouble with 100mb files.
Then I also have a Terraform Cloud account for storing my state. I have stores some Azure account credetials in Terraform Cloud Workspace variables. All work fine.

So, the question is then:

  • is this the right way of doing this?
  • Is it possible to create authentication varables another place than in these TF Cloud variables?

All tips for a new TF learner is appreciated.