Skip to content

Commit c3b96d4

Browse files
committed
docs: update outputs
1 parent b089c13 commit c3b96d4

File tree

2 files changed

+116
-64
lines changed

2 files changed

+116
-64
lines changed

README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ See [variables.tf] and [examples/] for details and use-cases.
117117

118118
A object of default settings to use instead of module defaults for top-level arguments.
119119
See below for a list of supported arguments.
120-
120+
121121
This is a special argument to set various defaults to be reused for multiple repositories.
122-
122+
123123
The following top-level arguments can be set as defaults:
124124
`homepage_url`,
125125
`visibility`,
@@ -137,7 +137,7 @@ See [variables.tf] and [examples/] for details and use-cases.
137137
`topics`,
138138
`issue_labels_create`,
139139
`issue_labels_merge_with_github_labels`.
140-
140+
141141
Module defaults are used for all arguments that are not set in `defaults`.
142142
Using top level arguments override defaults set by this argument.
143143

@@ -799,15 +799,15 @@ This is due to some terraform limitation and we will update the module once terr
799799

800800
This map allows you to create and manage secrets for repositories in your organization.
801801
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:
802-
802+
803803
```
804804
plaintext_secrets = {
805805
SECRET_NAME_1 = "secret_value_1"
806806
SECRET_NAME_2 = "secret_value_2"
807807
...
808808
}
809809
```
810-
810+
811811
When applied, a secret with the given key and value will be created in the repositories.
812812
The value of the secrets must be given in plain text, github provider is in charge of encrypting it.
813813
**Attention:** You might want to get secrets via a data source from a secure vault and not add them in plain text to your source files; so you do not commit plaintext secrets into the git repository managing your github account.
@@ -836,52 +836,60 @@ This is due to some terraform limitation and we will update the module once terr
836836

837837
The following attributes are exported by the module:
838838

839-
- **`repository`**
839+
- [**`repository`**](#output-repository): *(`object(repository)`)*<a name="output-repository"></a>
840840

841-
All repository attributes as returned by the [`github_repository`] resource containing all arguments as specified above and the other attributes as specified below.
841+
All repository attributes as returned by the [`github_repository`]
842+
resource containing all arguments as specified above and the other
843+
attributes as specified below.
842844

843-
- **`full_name`**
845+
- [**`full_name`**](#output-full_name): *(`string`)*<a name="output-full_name"></a>
844846

845-
A string of the form "orgname/reponame".
847+
A string of the form "orgname/reponame".
846848

847-
- **`html_url`**
849+
- [**`html_url`**](#output-html_url): *(`string`)*<a name="output-html_url"></a>
848850

849-
URL to the repository on the web.
851+
URL to the repository on the web.
850852

851-
- **`ssh_clone_url`**
853+
- [**`ssh_clone_url`**](#output-ssh_clone_url): *(`string`)*<a name="output-ssh_clone_url"></a>
852854

853-
URL that can be provided to git clone to clone the repository via SSH.
855+
URL that can be provided to git clone to clone the repository via SSH.
854856

855-
- **`http_clone_url`**
857+
- [**`http_clone_url`**](#output-http_clone_url): *(`string`)*<a name="output-http_clone_url"></a>
856858

857-
URL that can be provided to git clone to clone the repository via HTTPS.
859+
URL that can be provided to git clone to clone the repository via HTTPS.
858860

859-
- **`git_clone_url`**
861+
- [**`git_clone_url`**](#output-git_clone_url): *(`string`)*<a name="output-git_clone_url"></a>
860862

861-
URL that can be provided to git clone to clone the repository anonymously via the git protocol.
863+
URL that can be provided to git clone to clone the repository
864+
anonymously via the git protocol.
862865

863-
- **`collaborators`**
866+
- [**`collaborators`**](#output-collaborators): *(`object(collaborators)`)*<a name="output-collaborators"></a>
864867

865-
A map of Collaborator objects keyed by the `name` of the collaborator as returned by the
866-
[`github_repository_collaborator`] resource.
868+
A map of Collaborator objects keyed by the `name` of the collaborator as
869+
returned by the [`github_repository_collaborator`] resource.
867870

868-
- **`deploy_keys`**
871+
- [**`deploy_keys`**](#output-deploy_keys): *(`object(deploy_keys)`)*<a name="output-deploy_keys"></a>
869872

870-
A merged map of deploy key objects for the keys originally passed via `deploy_keys` and `deploy_keys_computed` as returned by the [`github_repository_deploy_key`] resource keyed by the input `id` of the key.
873+
A merged map of deploy key objects for the keys originally passed via
874+
`deploy_keys` and `deploy_keys_computed` as returned by the
875+
[`github_repository_deploy_key`] resource keyed by the input `id` of the
876+
key.
871877

872-
- **`projects`**
878+
- [**`projects`**](#output-projects): *(`object(project)`)*<a name="output-projects"></a>
873879

874-
A map of Project objects keyed by the `id` of the project as returned by the [`github_repository_project`] resource
880+
A map of Project objects keyed by the `id` of the project as returned by
881+
the [`github_repository_project`] resource
875882

876-
- **`issue_labels`**
883+
- [**`issue_labels`**](#output-issue_labels): *(`object(issue_label)`)*<a name="output-issue_labels"></a>
877884

878885
A map of issue labels keyed by label input id or name.
879886

880-
- **`webhooks`**
887+
- [**`webhooks`**](#output-webhooks): *(`object(webhook)`)*<a name="output-webhooks"></a>
881888

882-
All attributes and arguments as returned by the github_repository_webhook resource.
889+
All attributes and arguments as returned by the
890+
`github_repository_webhook` resource.
883891

884-
- **`secrets`**
892+
- [**`secrets`**](#output-secrets): *(`object(secret)`)*<a name="output-secrets"></a>
885893

886894
List of secrets available.
887895

README.tfdoc.hcl

Lines changed: 80 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,56 +1091,100 @@ section {
10911091
title = "Module Outputs"
10921092
content = <<-END
10931093
The following attributes are exported by the module:
1094+
END
10941095

1095-
- **`repository`**
1096-
1097-
All repository attributes as returned by the [`github_repository`] resource containing all arguments as specified above and the other attributes as specified below.
1098-
1099-
- **`full_name`**
1100-
1101-
A string of the form "orgname/reponame".
1102-
1103-
- **`html_url`**
1104-
1105-
URL to the repository on the web.
1106-
1107-
- **`ssh_clone_url`**
1108-
1109-
URL that can be provided to git clone to clone the repository via SSH.
1110-
1111-
- **`http_clone_url`**
1112-
1113-
URL that can be provided to git clone to clone the repository via HTTPS.
1114-
1115-
- **`git_clone_url`**
1096+
output "repository" {
1097+
type = object(repository)
1098+
description = <<-END
1099+
All repository attributes as returned by the [`github_repository`]
1100+
resource containing all arguments as specified above and the other
1101+
attributes as specified below.
1102+
END
1103+
}
11161104

1117-
URL that can be provided to git clone to clone the repository anonymously via the git protocol.
1105+
output "full_name" {
1106+
type = string
1107+
description = <<-END
1108+
A string of the form "orgname/reponame".
1109+
END
1110+
}
11181111

1119-
- **`collaborators`**
1112+
output "html_url" {
1113+
type = string
1114+
description = <<-END
1115+
URL to the repository on the web.
1116+
END
1117+
}
11201118

1121-
A map of Collaborator objects keyed by the `name` of the collaborator as returned by the
1122-
[`github_repository_collaborator`] resource.
1119+
output "ssh_clone_url" {
1120+
type = string
1121+
description = <<-END
1122+
URL that can be provided to git clone to clone the repository via SSH.
1123+
END
1124+
}
11231125

1124-
- **`deploy_keys`**
1126+
output "http_clone_url" {
1127+
type = string
1128+
description = <<-END
1129+
URL that can be provided to git clone to clone the repository via HTTPS.
1130+
END
1131+
}
11251132

1126-
A merged map of deploy key objects for the keys originally passed via `deploy_keys` and `deploy_keys_computed` as returned by the [`github_repository_deploy_key`] resource keyed by the input `id` of the key.
1133+
output "git_clone_url" {
1134+
type = string
1135+
description = <<-END
1136+
URL that can be provided to git clone to clone the repository
1137+
anonymously via the git protocol.
1138+
END
1139+
}
11271140

1128-
- **`projects`**
1141+
output "collaborators" {
1142+
type = object(collaborators)
1143+
description = <<-END
1144+
A map of Collaborator objects keyed by the `name` of the collaborator as
1145+
returned by the [`github_repository_collaborator`] resource.
1146+
END
1147+
}
11291148

1130-
A map of Project objects keyed by the `id` of the project as returned by the [`github_repository_project`] resource
1149+
output "deploy_keys" {
1150+
type = object(deploy_keys)
1151+
description = <<-END
1152+
A merged map of deploy key objects for the keys originally passed via
1153+
`deploy_keys` and `deploy_keys_computed` as returned by the
1154+
[`github_repository_deploy_key`] resource keyed by the input `id` of the
1155+
key.
1156+
END
1157+
}
11311158

1132-
- **`issue_labels`**
1159+
output "projects" {
1160+
type = object(project)
1161+
description = <<-END
1162+
A map of Project objects keyed by the `id` of the project as returned by
1163+
the [`github_repository_project`] resource
1164+
END
1165+
}
11331166

1167+
output "issue_labels" {
1168+
type = object(issue_label)
1169+
description = <<-END
11341170
A map of issue labels keyed by label input id or name.
1171+
END
1172+
}
11351173

1136-
- **`webhooks`**
1137-
1138-
All attributes and arguments as returned by the github_repository_webhook resource.
1139-
1140-
- **`secrets`**
1174+
output "webhooks" {
1175+
type = object(webhook)
1176+
description = <<-END
1177+
All attributes and arguments as returned by the
1178+
`github_repository_webhook` resource.
1179+
END
1180+
}
11411181

1182+
output "secrets" {
1183+
type = object(secret)
1184+
description = <<-END
11421185
List of secrets available.
1143-
END
1186+
END
1187+
}
11441188
}
11451189

11461190
section {

0 commit comments

Comments
 (0)