GitHub Provider

A Terraform provider for GitHub.

Warning: This section is under construction

Importing GitHub Repository

The github_repository resource will always attempt to create a repository if it isn't managed by Terraform state.

import-ing the repository is the way to go. But depending on where the resource is defined, the import path may be different.

Root level

Note

This assumes a repository named workflows-test, and resource id of my_id.

Module level

Note

This assumes a repository named workflows-test, a module named my-module with a module id workflows-test, and resource id of my_id.

Warning: Take note that terraform sometimes requires keys to be wrapped in square brackets ([)... and ZSH treats square brackets as special characters. These will need to be escaped, or the entire string needs to be wrapped in single quotes.