{"id":18354478,"url":"https://github.com/alvarofpp/import-from-github-to-terraform","last_synced_at":"2026-05-09T05:06:08.310Z","repository":{"id":255732472,"uuid":"849099577","full_name":"alvarofpp/import-from-github-to-terraform","owner":"alvarofpp","description":"Scripts to import data from organizations and personal projects on GitHub into Terraform.","archived":false,"fork":false,"pushed_at":"2024-09-06T19:20:20.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T16:47:35.973Z","etag":null,"topics":["github","import","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvarofpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T01:20:31.000Z","updated_at":"2024-09-06T19:20:23.000Z","dependencies_parsed_at":"2024-09-06T23:09:55.569Z","dependency_job_id":null,"html_url":"https://github.com/alvarofpp/import-from-github-to-terraform","commit_stats":null,"previous_names":["alvarofpp/import-from-github-to-terraform"],"tags_count":0,"template":false,"template_full_name":"alvarofpp/template-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fimport-from-github-to-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fimport-from-github-to-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fimport-from-github-to-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fimport-from-github-to-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarofpp","download_url":"https://codeload.github.com/alvarofpp/import-from-github-to-terraform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137941,"owners_count":21053785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","import","terraform"],"created_at":"2024-11-05T22:04:13.411Z","updated_at":"2026-05-09T05:06:08.284Z","avatar_url":"https://github.com/alvarofpp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Import from GitHub to Terraform\n\nThis repository contains a configured Docker image with scripts to import your personal\nrepositories or repositories, members and teams of an organization into Terraform.\n\nAfter running the import script, two sets of artifacts are generated\nand saved in the `resources/`:\n\n- `import_*.txt`: files with commands for importing resources.\n- `members/*.tf`, `repositories/*.tf` and `teams/*.tf`: Terraform resource files.\n\nThe [alvarofpp/template-infra-terraform][template-infra] repository has a directory structure\nthat you can use as a basis.\n\n## How to use\n\nThis repository can be used for two purposes:\n\n- Importing your personal repositories.\n- Importing members of an organization's repositories and teams.\n\nFor both cases, you first need to run `make build` to generate the\nDocker image that will be used to run the scripts.\n\nThe commands using `make` that will be shown below can be found in the `Makefile` file.\nIf you choose not to use the [Makefile](`Makefile`), you can copy and paste the commands\ninto your terminal.\n\n### Importing my repositories\n\n1. Export the GitHub access token with the permissions for your repositories:\n\n```shell\nexport GITHUB_ACCESS_TOKEN=github_pat_...\n```\n\n2. Run:\n\n```shell\nmake import-my-repos\n```\n\n### Importing an organization\n\n1. Export the GitHub access token with permissions for repositories, members and teams:\n\n```shell\nexport GITHUB_ACCESS_TOKEN=github_pat_...\n```\n\n2. You also need to export the organization identifier:\n\n```shell\nexport ORG=...\n```\n\n3. Run:\n\n```shell\nmake import-org\n```\n\n[template-infra]: https://github.com/alvarofpp/template-infra-terraform\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarofpp%2Fimport-from-github-to-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarofpp%2Fimport-from-github-to-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarofpp%2Fimport-from-github-to-terraform/lists"}