Skip to content

Commit a6e45ec

Browse files
committed
update readme
1 parent 555dded commit a6e45ec

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ role. The role is either `member` or `admin`.
110110

111111
#### [github_team](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team)
112112

113-
`python3 import-data.py teams`
113+
`python3 import-data.py teams`\
114114
`tf-import.sh teams`
115115

116116
This is a straight forward data scrape and Terraform importation. The
@@ -122,7 +122,7 @@ Terraform state. The default in the configuration is `false`.
122122

123123
#### [github_team_membership](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership)
124124

125-
`python3 import-data.py team-membership`
125+
`python3 import-data.py team-membership`\
126126
`tf-import.sh team-membership`
127127

128128
This is a straight forward data scrape and Terraform importation. The
@@ -132,7 +132,7 @@ respective role.
132132

133133
### [github_repository](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository)
134134

135-
`python3 import-data.py repos`
135+
`python3 import-data.py repos`\
136136
`tf-import.sh repos`
137137

138138

@@ -153,7 +153,7 @@ can be ignored
153153

154154
#### [github_repository_collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborators)
155155

156-
`python3 import-data.py repo-collab`
156+
`python3 import-data.py repo-collab`\
157157
`tf-import.sh repo-collab`
158158

159159
There are two resources to manage Github collaborators via Terraform:
@@ -195,12 +195,40 @@ owner via the API. Consequently you may notice this as a potential change,
195195
however, this does not change any functionality.
196196

197197

198-
### github_branch_protection implementation
198+
#### [github_branch_protection_v3](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection_v3)
199199

200-
`python3 import-data.py branch-protection`
200+
`python3 import-data.py branch-protection`\
201201
`tf-import.sh branch-protection`
202202

203-
[github_branch_protection_v3](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection_v3)
203+
Current branch protection data is obtained for the default branch of each
204+
repository. In the event branch protection is not enabled for a repository,
205+
the default JSON data defaults to the following minimal configuration:
206+
207+
`enforce_admins: true`
208+
`required_approving_review_count: 1`
209+
`required_status_checks: true`
210+
211+
The above minimal configuration will be applied to the default branch of any
212+
repository that does not have branch protection configured. (If branch protection
213+
is configured, the configuration will not be changed)
214+
215+
There is an additional folder `branch-protection-full-data/` created, with the
216+
execution of `python3 import-data.py branch-protection` This folder contains
217+
the full branch protection api data of each repository. This is for reference
218+
if needed. For the most part, this folder can be ignored.
219+
220+
Notes:
221+
222+
1) The `apps` list for the bypass_pull_request_allowances or restrictions
223+
block is not implemented.
224+
225+
2) The `contexts` for the required_status_checks block is omitted, as it is a
226+
deprecated value per HashiCorp documentation.
227+
228+
3) Review the JSON data and/or `import-data.py` to ensure that the
229+
configuration is correct for your organization. This resource has a number of
230+
options that may need to be adjusted.
231+
204232

205233
## Deployment Diagram
206234

0 commit comments

Comments
 (0)