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 ofmy_id
.
Module level
Note
This assumes a repository named
workflows-test
, a module namedmy-module
with a module idworkflows-test
, and resource id ofmy_id
.
Warning: Take note that
terraform
sometimes requires keys to be wrapped in square brackets ([
)... andZSH
treats square brackets as special characters. These will need to be escaped, or the entire string needs to be wrapped in single quotes.