Example:
./terraformer import github --owner=YOUR_ORGANIZATION --resources=repositories --token=YOUR_TOKEN // or GITHUB_TOKEN in env
./terraformer import github --owner=YOUR_ORGANIZATION --resources=repositories --filter=repository=id1:id2:id4 --token=YOUR_TOKEN // or GITHUB_TOKEN in env
./terraformer import github --owner=YOUR_ORGANIZATION --resources=repositories --base-url=https://your-enterprise-github-url
Supports only organizational resources. List of supported resources:
membersgithub_membership
organization_blocksgithub_organization_block
organization_projectsgithub_organization_project
organization_webhooksgithub_organization_webhook
repositoriesgithub_branch_protectiongithub_repositorygithub_repository_collaboratorgithub_repository_deploy_keygithub_repository_webhook
teamsgithub_teamgithub_team_membershipgithub_team_repository
user_ssh_keysgithub_user_ssh_key
Notes:
- Terraformer can't get webhook secrets from the GitHub API. If you use a secret token in any of your webhooks, running
terraform planwill result in a change being detected: =>configuration.#: "1" => "0"in tfstate only.