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
Copy file name to clipboardExpand all lines: README.md
+30-25Lines changed: 30 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,8 @@
9
9
# terraform-github-repository
10
10
11
11
A [Terraform] module for creating a public or private repository on [Github].
12
-
13
12
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.20 and above from `integrations/github`._**
14
-
15
13
**Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting `hashicorp/github` provider is `~> 0.10.0`**
16
-
17
14
** Note: Versions 5.3.0, 5.4.0, and 5.5.0 of the Terraform Github Provider have broken branch protections support and should not be used.**
18
15
19
16
@@ -30,6 +27,7 @@ A [Terraform] module for creating a public or private repository on [Github].
(Optional) The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration.
745
+
See [Security and Analysis Configuration](#security-and-analysis-configuration) below for details.
746
+
747
+
Default is `{}`.
748
+
749
+
The `security_and_analysis` object accepts the following attributes:
The secret scanning push protection configuration for the repository. See [Secret Scanning Push Protection Configuration](#secret-scanning-push-protection-configuration) below for details.
This map allows you to create and manage secrets for repositories in your organization.
862
-
863
879
Each element in the map is considered a secret to be managed, being the key map the secret name and the value the corresponding secret in plain text:
864
-
865
880
When applied, a secret with the given key and value will be created in the repositories.
866
-
867
881
The value of the secrets must be given in plain text, GitHub provider is in charge of encrypting it.
868
-
869
882
**Attention:** You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the encrypted_value using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction.
870
883
871
884
Default is `{}`.
@@ -882,9 +895,7 @@ This is due to some terraform limitation and we will update the module once terr
This map allows you to create and manage encrypted secrets for repositories in your organization.
885
-
886
898
Each element in the map is considered a secret to be managed, being the key map the secret name and the value the corresponding encrypted value of the secret using the Github public key in Base64 format.b
887
-
888
899
When applied, a secret with the given key and value will be created in the repositories.
889
900
890
901
Default is `{}`.
@@ -1033,9 +1044,7 @@ The following attributes are exported by the module:
1033
1044
## Module Versioning
1034
1045
1035
1046
This Module follows the principles of [Semantic Versioning (SemVer)].
1036
-
1037
1047
Given a version number `MAJOR.MINOR.PATCH`, we increment the:
1038
-
1039
1048
1.`MAJOR` version when we make incompatible changes,
1040
1049
2.`MINOR` version when we add functionality in a backwards compatible manner, and
1041
1050
3.`PATCH` version when we make backwards compatible bug fixes.
@@ -1049,10 +1058,8 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the:
1049
1058
1050
1059
[Mineiros][homepage] is a remote-first company headquartered in Berlin, Germany
1051
1060
that solves development, automation and security challenges in cloud infrastructure.
1052
-
1053
1061
Our vision is to massively reduce time and overhead for teams to manage and
1054
1062
deploy production-grade and secure cloud infrastructure.
1055
-
1056
1063
We offer commercial support for all of our modules and encourage you to reach out
1057
1064
if you have any questions or need help. Feel free to email us at [[email protected]] or join our
1058
1065
[Community Slack channel][slack].
@@ -1074,10 +1081,8 @@ Run `make help` to see details on each available target.
1074
1081
## License
1075
1082
1076
1083
[![license][badge-license]][apache20]
1077
-
1078
1084
This module is licensed under the Apache License Version 2.0, January 2004.
Copy file name to clipboardExpand all lines: README.tfdoc.hcl
+42-26Lines changed: 42 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -38,11 +38,8 @@ section {
38
38
toc=true
39
39
content=<<-END
40
40
A [Terraform] module for creating a public or private repository on [Github].
41
-
42
41
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.20 and above from `integrations/github`._**
43
-
44
42
**Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting `hashicorp/github` provider is `~> 0.10.0`**
45
-
46
43
** Note: Versions 5.3.0, 5.4.0, and 5.5.0 of the Terraform Github Provider have broken branch protections support and should not be used.**
47
44
END
48
45
@@ -60,7 +57,6 @@ section {
60
57
maintained by our team of platform engineering experts and saves
61
58
companies such as yours tons of time by building on top of a pre-configured
62
59
solution instead of building and maintaining it yourself.
63
-
64
60
For details please see [https://mineiros.io/github-as-code][github-as-code].
65
61
END
66
62
}
@@ -70,19 +66,16 @@ section {
70
66
content=<<-END
71
67
In contrast to the plain `github_repository` resource this module enables various other
72
68
features like Branch Protection or Collaborator Management.
73
-
74
69
- **Default Security Settings**:
75
70
This module creates a `private` repository by default,
76
71
Deploy keys are `read-only` by default
77
-
78
72
- **Standard Repository Features**:
79
73
Setting basic Metadata,
80
74
Merge Strategy,
81
75
Auto Init,
82
76
License Template,
83
77
Gitignore Template,
84
78
Template Repository
85
-
86
79
- **Extended Repository Features**:
87
80
Branches,
88
81
Branch Protection,
@@ -93,7 +86,6 @@ section {
93
86
Deploy Keys,
94
87
Projects,
95
88
Repository Webhooks
96
-
97
89
- _Features not yet implemented_:
98
90
Project Columns support,
99
91
Actions,
@@ -105,12 +97,10 @@ section {
105
97
title="Getting Started"
106
98
content=<<-END
107
99
Most basic usage creating a new private github repository.
108
-
109
100
```hcl
110
101
module "repository" {
111
102
source = "mineiros-io/repository/github"
112
103
version = "~> 0.18.0"
113
-
114
104
name = "terraform-github-repository"
115
105
license_template = "apache-2.0"
116
106
gitignore_template = "Terraform"
@@ -796,12 +786,9 @@ section {
796
786
default=[]
797
787
description=<<-END
798
788
This resource allows you to configure v4 branch protection for repositories in your organization.
799
-
800
789
Each element in the list is a branch to be protected and the value the corresponding to the desired configuration for the branch.
801
-
802
790
When applied, the branch will be protected from forced pushes and deletion.
803
791
Additional constraints, such as required status checks or restrictions on users and teams, can also be configured.
804
-
805
792
**_NOTE:_** May conflict with v3 branch protections if used for the same branch.
806
793
END
807
794
@@ -970,6 +957,47 @@ section {
970
957
}
971
958
}
972
959
960
+
section {
961
+
title="Security And Analysis Configuration"
962
+
963
+
variable"security_and_analysis" {
964
+
type=object(security_and_analysis)
965
+
default={}
966
+
description=<<-END
967
+
(Optional) The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration.
968
+
See [Security and Analysis Configuration](#security-and-analysis-configuration) below for details.
969
+
END
970
+
971
+
attribute"advanced_security" {
972
+
type=string
973
+
required=true
974
+
default="disabled"
975
+
description=<<-END
976
+
The advanced security configuration for the repository. See [Advanced Security Configuration](#advanced-security-configuration) below for details.
977
+
END
978
+
}
979
+
980
+
attribute"secret_scanning" {
981
+
type=string
982
+
required=true
983
+
default="disabled"
984
+
description=<<-END
985
+
The secret scanning configuration for the repository. See [Secret Scanning Configuration](#secret-scanning-configuration) below for details.
986
+
END
987
+
}
988
+
989
+
attribute"secret_scanning_push_protection" {
990
+
type=string
991
+
required=true
992
+
default="disabled"
993
+
description=<<-END
994
+
The secret scanning push protection configuration for the repository. See [Secret Scanning Push Protection Configuration](#secret-scanning-push-protection-configuration) below for details.
995
+
END
996
+
}
997
+
998
+
}
999
+
}
1000
+
973
1001
section {
974
1002
title="Issue Labels Configuration"
975
1003
@@ -1134,13 +1162,9 @@ section {
1134
1162
default={}
1135
1163
description=<<-END
1136
1164
This map allows you to create and manage secrets for repositories in your organization.
1137
-
1138
1165
Each element in the map is considered a secret to be managed, being the key map the secret name and the value the corresponding secret in plain text:
1139
-
1140
1166
When applied, a secret with the given key and value will be created in the repositories.
1141
-
1142
1167
The value of the secrets must be given in plain text, GitHub provider is in charge of encrypting it.
1143
-
1144
1168
**Attention:** You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the encrypted_value using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction.
1145
1169
END
1146
1170
@@ -1157,9 +1181,7 @@ section {
1157
1181
default={}
1158
1182
description=<<-END
1159
1183
This map allows you to create and manage encrypted secrets for repositories in your organization.
1160
-
1161
1184
Each element in the map is considered a secret to be managed, being the key map the secret name and the value the corresponding encrypted value of the secret using the Github public key in Base64 format.b
1162
-
1163
1185
When applied, a secret with the given key and value will be created in the repositories.
1164
1186
END
1165
1187
@@ -1379,9 +1401,7 @@ section {
1379
1401
title="Module Versioning"
1380
1402
content=<<-END
1381
1403
This Module follows the principles of [Semantic Versioning (SemVer)].
1382
-
1383
1404
Given a version number `MAJOR.MINOR.PATCH`, we increment the:
1384
-
1385
1405
1. `MAJOR` version when we make incompatible changes,
1386
1406
2. `MINOR` version when we add functionality in a backwards compatible manner, and
1387
1407
3. `PATCH` version when we make backwards compatible bug fixes.
@@ -1401,10 +1421,8 @@ section {
1401
1421
content=<<-END
1402
1422
[Mineiros][homepage] is a remote-first company headquartered in Berlin, Germany
1403
1423
that solves development, automation and security challenges in cloud infrastructure.
1404
-
1405
1424
Our vision is to massively reduce time and overhead for teams to manage and
1406
1425
deploy production-grade and secure cloud infrastructure.
1407
-
1408
1426
We offer commercial support for all of our modules and encourage you to reach out
1409
1427
if you have any questions or need help. Feel free to email us at [[email protected]] or join our
1410
1428
[Community Slack channel][slack].
@@ -1438,10 +1456,8 @@ section {
1438
1456
title="License"
1439
1457
content=<<-END
1440
1458
[![license][badge-license]][apache20]
1441
-
1442
1459
This module is licensed under the Apache License Version 2.0, January 2004.
0 commit comments