5656This script is located at the root of the repo folder.
5757
5858import-data.py obtains data from a Github organization via REST API calls
59- to prepare for mass Terraform importation of present state deployed state .
59+ to prepare for mass Terraform importation of present state.
6060
6161Execute ` python3 import-data.py ` to view options for data to scrape.
6262IE: members, teams, team-membership, repos, repo-collaborators, branch-protection
6363
64- Data output is exported to JSON and is located at the root folder. This data
65- is used by tf-import.sh for mass Terraform import. See following section.
64+ Data output is exported to JSON and is located at the root folder. The API
65+ data is adjusted for the Terraform resource required/deployed. The
66+ tf-import.sh script handles the mass Terraform state import.
67+ Refer following section for more information for Terraform importation.
6668
6769
6870## tf-import.sh
@@ -86,7 +88,11 @@ importation.
8688Theoretically, zero (0) changes should be applied against the Github
8789Organization in which the data imported from. Importing repo-collaborators and
8890branch-protection may result in some changes observed from the the terraform
89- plan output.
91+ plan output. (see below for more information regarding potential changes)
92+
93+ Note, with the release of [ Terraform v1.5] ( https://www.hashicorp.com/blog/terraform-1-5-brings-config-driven-import-and-checks ) ,
94+ this method is likely no longer required. Terraform v1.5 has improved
95+ support for Terraform importation.
9096
9197
9298## Terraform Resources
@@ -101,6 +107,7 @@ Organization(s):
101107[ github_repository_collaborators] ( https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborators )
102108[ github_branch_protection_v3] ( https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection_v3 )
103109
110+
104111### github_repository_collaborators implementation
105112
106113There are two resources to manage Github collaborators via Terraform.
0 commit comments