You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create basic module that supports creating repository from the template (#4)
* create new repo based on the template
* adding delete branch on merge
* adding default branch protection
* adding tag protection
* adding extra labels
* adding example of usage
* updating Readme
| <aname="input_repository_default_branch"></a> [repository\_default\_branch](#input\_repository\_default\_branch)| The default branch name. |`string`|`"main"`| no |
69
+
| <aname="input_repository_delete_branch_on_merge"></a> [repository\_delete\_branch\_on\_merge](#input\_repository\_delete\_branch\_on\_merge)| Automatically delete head branch after a pull request is merged. |`bool`|`true`| no |
70
+
| <aname="input_repository_description"></a> [repository\_description](#input\_repository\_description)| Brief description of the project. |`string`|`"test_repo desc"`| no |
71
+
| <aname="input_repository_has_issues"></a> [repository\_has\_issues](#input\_repository\_has\_issues)| Enable the GitHub Issues on the repository. |`bool`|`true`| no |
72
+
| <aname="input_repository_has_projects"></a> [repository\_has\_projects](#input\_repository\_has\_projects)| Enable the GitHub Project on the repository. |`bool`|`false`| no |
73
+
| <aname="input_repository_has_wiki"></a> [repository\_has\_wiki](#input\_repository\_has\_wiki)| Enable the GitHub Wiki on the repository. |`bool`|`false`| no |
74
+
| <aname="input_repository_name"></a> [repository\_name](#input\_repository\_name)| The name of the repository. |`string`|`"test_repo"`| no |
75
+
| <aname="input_repository_require_code_owner_reviews"></a> [repository\_require\_code\_owner\_reviews](#input\_repository\_require\_code\_owner\_reviews)| Require code owners review before PR can be merged |`bool`|`true`| no |
76
+
| <aname="input_repository_require_conversation_resolution"></a> [repository\_require\_conversation\_resolution](#input\_repository\_require\_conversation\_resolution)| Resolve all the comments before PR can be merged |`bool`|`true`| no |
77
+
| <aname="input_repository_required_approving_review_count"></a> [repository\_required\_approving\_review\_count](#input\_repository\_required\_approving\_review\_count)| Require N aprovales before PR can be merged |`number`|`1`| no |
78
+
| <aname="input_repository_tag_protection_pattern"></a> [repository\_tag\_protection\_pattern](#input\_repository\_tag\_protection\_pattern)| The pattern of the tag to protect. |`string`|`"v*"`| no |
79
+
| <aname="input_repository_template_owner"></a> [repository\_template\_owner](#input\_repository\_template\_owner)| The GitHub organization or user the template repository is owned by. |`string`|`"opsd-io"`| no |
80
+
| <aname="input_repository_template_repository"></a> [repository\_template\_repository](#input\_repository\_template\_repository)| Name of the (template) repository from which to create the new repository. |`string`|`"terraform-module-template"`| no |
81
+
| <aname="input_repository_visibility"></a> [repository\_visibility](#input\_repository\_visibility)| Specify whether the created repository should be private or public. Available options `private` or `public`. |`string`|`"public"`| no |
40
82
41
83
## Outputs
42
84
@@ -45,11 +87,11 @@ No outputs.
45
87
46
88
## Contributing
47
89
48
-
[Contributing](CONTRIBUTING.md)
90
+
If you are interested in contributing to the project, see see our [guide](CONTRIBUTING.md).
49
91
50
92
## Support
51
93
52
-
If you have a problem with the module or want to propose a new feature, you can report it via the project's (Github) issue tracker.
94
+
If you have a problem with the module or want to propose a new feature, you can report it via the project's (Github) [issue tracker](https://github.com/opsd-io/terraform-github/issues/new/choose).
53
95
54
96
If you want to discuss something in person, you can join our community on [Slack](https://join.slack.com/t/opsd-community/signup).
Before you start, you need to create a [GitHub token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) or use an existing one.
4
+
5
+
Next, set the environment variable.
6
+
7
+
```bash
8
+
export GITHUB_TOKEN="ghp_your_github_token"
9
+
```
10
+
11
+
Now, you need to initialize terraform.
12
+
13
+
```shell
14
+
terraform init
15
+
```
16
+
17
+
Execute plan command.
18
+
19
+
```shell
20
+
terraform plan
21
+
```
22
+
23
+
and verify what will be created.
24
+
25
+
The last step is to create the repo
26
+
27
+
```shell
28
+
terrafrorm apply
29
+
```
30
+
31
+
**IMPORTANT**: Please double-check the command output. The vital section can be seen in the example `Plan: 6 to add, 0 to change, 0 to destroy`. Ensure that you understand the changes you are making.
32
+
33
+
Next, you will be asked
34
+
35
+
```shell
36
+
Do you want to perform these actions?
37
+
Terraform will perform the actions described above.
0 commit comments