# Set up GitHub repository for IaC

GitHub is used to host the Terraform code for your infrastructure.

<!-- prettier-ignore-start -->
!!! tip "Naming convention"
    A good naming convention is to use the name of your team along with `-iac`, for example `barnehageplass-iac`.

<!-- "would like" is the verb "to want" here, not the example sense "such as" replaces. -->
<!-- vale NeedsRewrite.TermsWarnings = NO -->
!!! tip "Give Team Utviklerflyt read access to your repository"
    To better help out your team in case of need, Team Utviklerflyt would like read access to your infrastructure repository. This can be achieved two ways: By setting the privacy of the repository to "Internal", or by granting read access for the repository to [the `kjoremiljo` team in GitHub](https://github.com/orgs/oslokommune/teams/kjoremiljo){:target="_blank"}.
<!-- vale NeedsRewrite.TermsWarnings = YES -->
<!-- prettier-ignore-end -->

## Create a GitHub repository for infrastructure

Create a new empty repository for your team (see [how to create a new repository](https://docs.github.com/en/get-started/quickstart/create-a-repo){:target="_blank"}).

Checkout the repository locally on your machine (see [how to clone a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository){:target="_blank"}).

Initialize with a `.gitignore` file to avoid checking in Terraform cache files etc:

```gitignore title=".gitignore"
.DS_Store

**/.terraform/*
**.tfstate
*.tfstate.*
```

## Next step

Follow [Set up environment](set-up-environment.md) to create configuration files for your first environment.
