Learn Infrastructure as Code fundamentals with Terraform or OpenTofu by managing GitHub repository settings.
-
Who is this for: Developers and DevOps engineers new to Infrastructure as Code concepts
-
What you'll learn: Infrastructure as Code workflow fundamentals, provider authentication, and GitHub provider usage
-
What you'll build: Configuration to manage GitHub repository settings including labels and branch protection rules
-
Prerequisites:
- Basic understanding of Git and GitHub
- Familiarity with command-line interfaces
- No prior Terraform or OpenTofu knowledge required
-
How long: This exercise takes less than 30 minutes to complete.
In this exercise, you will:
- Run your first Terraform/OpenTofu workflow
- Understand what providers are and how to use them
- Learn how to manage your GitHub repository settings management as code
Simply copy the exercise to your account, then give your favorite Octocat (Mona) about 20 seconds to prepare the first lesson, then refresh the page.
Having trouble? 🤷
When copying the exercise, we recommend the following settings:
-
For owner, choose your personal account or an organization to host the repository.
-
We recommend creating a public repository, since private repositories will use Actions minutes.
If the exercise isn't ready in 20 seconds, please check the Actions tab.
-
Check to see if a job is running. Sometimes it simply takes a bit longer.
-
If the page shows a failed job, please submit an issue. Nice, you found a bug! 🐛
© 2025 GitHub • Code of Conduct • MIT License