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
|[github_team.this](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team)| data source |
38
+
|[github_user.this](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user)| data source |
35
39
36
40
## Inputs
37
41
@@ -41,6 +45,8 @@ No modules.
41
45
| <aname="input_repository"></a> [repository](#input\_repository)| (Required) The repository name which the environment belongs to. |`string`| n/a | yes |
42
46
| <aname="input_allow_admin_to_bypass"></a> [allow\_admin\_to\_bypass](#input\_allow\_admin\_to\_bypass)| (Optional) Whether to allow admins to bypass the wait timer and deployment review. The default value is `true`. |`bool`|`true`| no |
43
47
| <aname="input_allows_self_approval"></a> [allows\_self\_approval](#input\_allows\_self\_approval)| (Optional) Whether to allow users to approve their own deployment. The default value is `false`. |`bool`|`false`| no |
48
+
| <aname="input_deployment_policy"></a> [deployment\_policy](#input\_deployment\_policy)| (Optional) A configuration for deployment policy. `deployment_policy` block as defined below.<br/> (Optional) `restriction` - The type of deployment restriction. Valid values are `NONE`, `PROTECTED_BRANCH`, or `CUSTOM`. Defaults to `NONE`.<br/> (Optional) `branches` - A set of branch name patterns to restrict deployments to when the restriction type is `CUSTOM`.<br/> (Optional) `tags` - A set of tag name patterns to restrict deployments to when the restriction type is `CUSTOM`. | <pre>object({<br/> restriction = optional(string, "NONE")<br/> branches = optional(set(string), [])<br/> tags = optional(set(string), [])<br/> })</pre> |`{}`| no |
49
+
| <aname="input_reviewers"></a> [reviewers](#input\_reviewers)| (Optional) A list of reviewers who may review jobs that reference the environment. Up to 6 reviewers can be added to an environment. Each item of `reviewers` block as defined below.<br/> (Required) `type` - The type of the reviewer. Valid values are `USER` or `TEAM`.<br/> (Required) `name` - The username of the reviewer if the type is `USER`, or the team slug if the type is `TEAM`. | <pre>list(object({<br/> type = string<br/> name = string<br/> }))</pre> |`[]`| no |
44
50
| <aname="input_secrets"></a> [secrets](#input\_secrets)| (Optional) A map of GitHub Actions secrets to set for the environment. Currently, all values will be ignored and treated as placeholders. You should mange the secrets manually in GitHub after the environment is created. Defaults to `{}`. |`map(string)`|`{}`| no |
45
51
| <aname="input_variables"></a> [variables](#input\_variables)| (Optional) A map of GitHub Actions variables to set for the environment. Defaults to `{}`. |`map(string)`|`{}`| no |
46
52
| <aname="input_wait_timer"></a> [wait\_timer](#input\_wait\_timer)| (Optional) The amount of time in minutes to wait before allowing deployments to proceed. The default value is `0`. |`number`|`0`| no |
@@ -51,8 +57,10 @@ No modules.
51
57
|------|-------------|
52
58
| <aname="output_allow_admin_to_bypass"></a> [allow\_admin\_to\_bypass](#output\_allow\_admin\_to\_bypass)| Whether to allow admins to bypass the wait timer and deployment review. |
53
59
| <aname="output_allows_self_approval"></a> [allows\_self\_approval](#output\_allows\_self\_approval)| Whether to allow users to approve their own deployment. |
60
+
| <aname="output_deployment_policy"></a> [deployment\_policy](#output\_deployment\_policy)| The configuration for deployment policy of the environment. |
54
61
| <aname="output_name"></a> [name](#output\_name)| The name of the environment. |
55
62
| <aname="output_repository"></a> [repository](#output\_repository)| The repository name which the environment belongs to. |
63
+
| <aname="output_reviewers"></a> [reviewers](#output\_reviewers)| A list of reviewers who may review jobs that reference the environment. |
56
64
| <aname="output_secrets"></a> [secrets](#output\_secrets)| A map of GitHub Actions secrets set for the environment. Currently, all values will be placeholders and you should manage the secrets manually in GitHub after the environment is created. |
57
65
| <aname="output_variables"></a> [variables](#output\_variables)| A map of GitHub Actions variables set for the environment. |
58
66
| <aname="output_wait_timer"></a> [wait\_timer](#output\_wait\_timer)| The amount of time in minutes to wait before allowing deployments to proceed. |
(Optional) A list of reviewers who may review jobs that reference the environment. Up to 6 reviewers can be added to an environment. Each item of `reviewers` block as defined below.
37
+
(Required) `type` - The type of the reviewer. Valid values are `USER` or `TEAM`.
38
+
(Required) `name` - The username of the reviewer if the type is `USER`, or the team slug if the type is `TEAM`.
39
+
EOF
40
+
type=list(object({
41
+
type =string
42
+
name =string
43
+
}))
44
+
default=[]
45
+
nullable=false
46
+
47
+
validation {
48
+
condition=alltrue([
49
+
forreviewerinvar.reviewers:
50
+
contains(["USER", "TEAM"], reviewer.type)
51
+
])
52
+
error_message="Valid values for `type` are `USER` or `TEAM`."
53
+
}
54
+
validation {
55
+
condition=length(var.reviewers) <=6
56
+
error_message="Up to 6 reviewers can be added to an environment."
57
+
}
58
+
}
59
+
60
+
variable"deployment_policy" {
61
+
description=<<EOF
62
+
(Optional) A configuration for deployment policy. `deployment_policy` block as defined below.
63
+
(Optional) `restriction` - The type of deployment restriction. Valid values are `NONE`, `PROTECTED_BRANCH`, or `CUSTOM`. Defaults to `NONE`.
64
+
(Optional) `branches` - A set of branch name patterns to restrict deployments to when the restriction type is `CUSTOM`.
65
+
(Optional) `tags` - A set of tag name patterns to restrict deployments to when the restriction type is `CUSTOM`.
Copy file name to clipboardExpand all lines: modules/repository/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ This module creates following resources.
64
64
| <aname="input_delete_branch_on_merge"></a> [delete\_branch\_on\_merge](#input\_delete\_branch\_on\_merge)| (Optional) Automatically delete head branch after a pull request is merged. Defaults to `true`. |`bool`|`true`| no |
65
65
| <aname="input_deploy_keys"></a> [deploy\_keys](#input\_deploy\_keys)| (Optional) A list of deploy keys to grant access to the repository. A deploy key is a SSH key. Each item of `deploy_keys` block as defined below.<br/> (Optional) `name` - A name of deploy key.<br/> (Required) `key` - A SSH key. Begins with 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'ssh-ed25519', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com'.<br/> (Optional) `writable` - Whether to allow write access to the repository. The key can be used to push to the repository if enabled. Defaults to `false`. | <pre>list(object({<br/> name = optional(string)<br/> key = string<br/> writable = optional(bool, false)<br/> }))</pre> |`[]`| no |
66
66
| <aname="input_description"></a> [description](#input\_description)| (Optional) A description of the repository. |`string`|`"Managed by Terraform."`| no |
67
-
| <a name="input_environments"></a> [environments](#input\_environments) | (Optional) A list of environments for the repository. Each item of `environments` block as defined below.<br/> (Required) `name` - The name of the environment.<br/> (Optional) `wait_timer` - The amount of time in minutes to wait before allowing deployments to proceed. The default value is `0`.<br/> (Optional) `allow_admin_to_bypass` - Whether to allow admins to bypass the wait timer and deployment review. The default value is `true`.<br/> (Optional) `allows_self_approval` - Whether to allow users to approve their own deployment. The default value is `false`.<br/> (Optional) `variables` - A map of GitHub Actions variables to set for the environment. Defaults to `{}`.<br/> (Optional) `secrets` - A map of GitHub Actions secrets to set for the environment. Defaults to `{}`. | <pre>list(object({<br/> name = string<br/> wait_timer = optional(number, 0)<br/> allow_admin_to_bypass = optional(bool, true)<br/> allows_self_approval = optional(bool, false)<br/><br/> variables = optional(map(string), {})<br/> secrets = optional(map(string), {})<br/> }))</pre> | `[]` | no |
67
+
| <a name="input_environments"></a> [environments](#input\_environments) | (Optional) A list of environments for the repository. Each item of `environments` block as defined below.<br/> (Required) `name` - The name of the environment.<br/> (Optional) `wait_timer` - The amount of time in minutes to wait before allowing deployments to proceed. The default value is `0`.<br/> (Optional) `allow_admin_to_bypass` - Whether to allow admins to bypass the wait timer and deployment review. The default value is `true`.<br/> (Optional) `allows_self_approval` - Whether to allow users to approve their own deployment. The default value is `false`.<br/> (Optional) `reviewers` - A list of reviewers who may review jobs that reference the environment. Each item of `reviewers` block as defined below.<br/> (Required) `type` - The type of the reviewer. Valid values are `USER` or `TEAM`.<br/> (Required) `name` - The name of the reviewer. For a user reviewer, the value should be the user's username. For a team reviewer, the value should be the team's slug.<br/> (Optional) `deployment_policy` - A configuration for deployment policy of the environment. `deployment_policy` block as defined below.<br/> (Optional) `restriction` - The type of deployment restriction. Valid values are `NONE`, `PROTECTED_BRANCH`, or `CUSTOM`. Defaults to `NONE`.<br/> (Optional) `branches` - A set of branch name patterns to restrict deployments to when the restriction type is `CUSTOM`.<br/> (Optional) `tags` - A set of tag name patterns to restrict deployments to when the restriction type is `CUSTOM`.<br/> (Optional) `variables` - A map of GitHub Actions variables to set for the environment. Defaults to `{}`.<br/> (Optional) `secrets` - A map of GitHub Actions secrets to set for the environment. Defaults to `{}`. | <pre>list(object({<br/> name = string<br/> wait_timer = optional(number, 0)<br/> allow_admin_to_bypass = optional(bool, true)<br/> allows_self_approval = optional(bool, false)<br/><br/> reviewers = optional(list(object({<br/> type = string<br/> name = string<br/> })), [])<br/> deployment_policy = optional(object({<br/> restriction = optional(string, "NONE")<br/> branches = optional(set(string), [])<br/> tags = optional(set(string), [])<br/> }), {})<br/><br/> variables = optional(map(string), {})<br/> secrets = optional(map(string), {})<br/> }))</pre> | `[]` | no |
68
68
| <aname="input_features"></a> [features](#input\_features)| (Optional) A list of enabled features on the repository. Available features: `DISCUSSIONS`, `ISSUES`, `PROJECTS`, `WIKI`. Defaults to `["ISSUES"]`|`set(string)`| <pre>[<br/> "ISSUES"<br/>]</pre> | no |
69
69
| <a name="input_files"></a> [files](#input\_files) | (Optional) A list of files to create and manage within the repository. Each item of `files` block as defined below.<br/> (Required) `file` - A `file` block as defined below.<br/> (Required) `path` - The path of the file to manage.<br/> (Required) `content` - The file content.<br/> (Optional) `commit` - A `commit` block as defined below.<br/> (Optional) `author` - Committer author name to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.<br/> (Optional) `email` - Committer email address to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.<br/> (Optional) `message` - The commit message when creating, updating or deleting the managed file. Defaults to `chore: managed by Terraform.`.<br/> (Optional) `overwrite_on_create` - Enable overwriting existing files. If set to true it will overwrite an existing file with the same name. If set to false it will fail if there is an existing file with the same name. Defaults to `true`. | <pre>list(object({<br/> file = object({<br/> path = string<br/> content = string<br/> })<br/> commit = optional(object({<br/> author = optional(string)<br/> email = optional(string)<br/> message = optional(string, "chore: managed by Terraform.")<br/> }), {})<br/> overwrite_on_create = optional(bool, true)<br/> }))</pre> | `[]` | no |
70
70
| <aname="input_homepage"></a> [homepage](#input\_homepage)| (Optional) A URL of website describing the repository. |`string`|`""`| no |
Copy file name to clipboardExpand all lines: modules/repository/variables.tf
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -271,6 +271,13 @@ variable "environments" {
271
271
(Optional) `wait_timer` - The amount of time in minutes to wait before allowing deployments to proceed. The default value is `0`.
272
272
(Optional) `allow_admin_to_bypass` - Whether to allow admins to bypass the wait timer and deployment review. The default value is `true`.
273
273
(Optional) `allows_self_approval` - Whether to allow users to approve their own deployment. The default value is `false`.
274
+
(Optional) `reviewers` - A list of reviewers who may review jobs that reference the environment. Each item of `reviewers` block as defined below.
275
+
(Required) `type` - The type of the reviewer. Valid values are `USER` or `TEAM`.
276
+
(Required) `name` - The name of the reviewer. For a user reviewer, the value should be the user's username. For a team reviewer, the value should be the team's slug.
277
+
(Optional) `deployment_policy` - A configuration for deployment policy of the environment. `deployment_policy` block as defined below.
278
+
(Optional) `restriction` - The type of deployment restriction. Valid values are `NONE`, `PROTECTED_BRANCH`, or `CUSTOM`. Defaults to `NONE`.
279
+
(Optional) `branches` - A set of branch name patterns to restrict deployments to when the restriction type is `CUSTOM`.
280
+
(Optional) `tags` - A set of tag name patterns to restrict deployments to when the restriction type is `CUSTOM`.
274
281
(Optional) `variables` - A map of GitHub Actions variables to set for the environment. Defaults to `{}`.
275
282
(Optional) `secrets` - A map of GitHub Actions secrets to set for the environment. Defaults to `{}`.
0 commit comments