File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ repositories:
115115 - another-topic
116116 # Properties
117117 is_template: true # OPTIONAL, DEFAULT false
118+ # Contents
119+ template: # OPTIONAL, DEFAULT none
120+ owner: bruzit
121+ repository: template
122+ include_all_branches: true # OPTIONAL, DEFAULT false
118123` ` `
119124
120125Set it as source of truth :
Original file line number Diff line number Diff line change @@ -14,4 +14,18 @@ resource "github_repository" "this" {
1414
1515 # Properties
1616 is_template = try (each. value . is_template , null )
17+
18+ # Contents
19+ dynamic "template" {
20+ for_each = (
21+ try (each. value . template , null ) != null &&
22+ length (try (each. value . template , {})) > 0
23+ ) ? [each . value . template ] : []
24+
25+ content {
26+ owner = template. value . owner
27+ repository = template. value . repository
28+ include_all_branches = try (template. value . include_all_branches , false )
29+ }
30+ }
1731}
Original file line number Diff line number Diff line change @@ -11,3 +11,7 @@ repositories:
1111 topics :
1212 - repository-template
1313 is_template : true
14+ - name : template-use
15+ template :
16+ owner : bruzit-test
17+ repository : template
You can’t perform that action at this time.
0 commit comments