Skip to content

Commit 60392c3

Browse files
author
Nathan Thiesen
authored
Merge pull request #92 from mineiros-io/kassianh/docs/update-outputs
docs: update outputs
2 parents 603c1f4 + 16dc725 commit 60392c3

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`,
@@ -138,7 +138,7 @@ See [variables.tf] and [examples/] for details and use-cases.
138138
`topics`,
139139
`issue_labels_create`,
140140
`issue_labels_merge_with_github_labels`.
141-
141+
142142
Module defaults are used for all arguments that are not set in `defaults`.
143143
Using top level arguments override defaults set by this argument.
144144

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

810810
This map allows you to create and manage secrets for repositories in your organization.
811811
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:
812-
812+
813813
```
814814
plaintext_secrets = {
815815
SECRET_NAME_1 = "secret_value_1"
816816
SECRET_NAME_2 = "secret_value_2"
817817
...
818818
}
819819
```
820-
820+
821821
When applied, a secret with the given key and value will be created in the repositories.
822822
The value of the secrets must be given in plain text, github provider is in charge of encrypting it.
823823
**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.
@@ -846,52 +846,60 @@ This is due to some terraform limitation and we will update the module once terr
846846

847847
The following attributes are exported by the module:
848848

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

851-
All repository attributes as returned by the [`github_repository`] resource containing all arguments as specified above and the other attributes as specified below.
851+
All repository attributes as returned by the [`github_repository`]
852+
resource containing all arguments as specified above and the other
853+
attributes as specified below.
852854

853-
- **`full_name`**
855+
- [**`full_name`**](#output-full_name): *(`string`)*<a name="output-full_name"></a>
854856

855-
A string of the form "orgname/reponame".
857+
A string of the form "orgname/reponame".
856858

857-
- **`html_url`**
859+
- [**`html_url`**](#output-html_url): *(`string`)*<a name="output-html_url"></a>
858860

859-
URL to the repository on the web.
861+
URL to the repository on the web.
860862

861-
- **`ssh_clone_url`**
863+
- [**`ssh_clone_url`**](#output-ssh_clone_url): *(`string`)*<a name="output-ssh_clone_url"></a>
862864

863-
URL that can be provided to git clone to clone the repository via SSH.
865+
URL that can be provided to git clone to clone the repository via SSH.
864866

865-
- **`http_clone_url`**
867+
- [**`http_clone_url`**](#output-http_clone_url): *(`string`)*<a name="output-http_clone_url"></a>
866868

867-
URL that can be provided to git clone to clone the repository via HTTPS.
869+
URL that can be provided to git clone to clone the repository via HTTPS.
868870

869-
- **`git_clone_url`**
871+
- [**`git_clone_url`**](#output-git_clone_url): *(`string`)*<a name="output-git_clone_url"></a>
870872

871-
URL that can be provided to git clone to clone the repository anonymously via the git protocol.
873+
URL that can be provided to git clone to clone the repository
874+
anonymously via the git protocol.
872875

873-
- **`collaborators`**
876+
- [**`collaborators`**](#output-collaborators): *(`object(collaborators)`)*<a name="output-collaborators"></a>
874877

875-
A map of Collaborator objects keyed by the `name` of the collaborator as returned by the
876-
[`github_repository_collaborator`] resource.
878+
A map of Collaborator objects keyed by the `name` of the collaborator as
879+
returned by the [`github_repository_collaborator`] resource.
877880

878-
- **`deploy_keys`**
881+
- [**`deploy_keys`**](#output-deploy_keys): *(`object(deploy_keys)`)*<a name="output-deploy_keys"></a>
879882

880-
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.
883+
A merged map of deploy key objects for the keys originally passed via
884+
`deploy_keys` and `deploy_keys_computed` as returned by the
885+
[`github_repository_deploy_key`] resource keyed by the input `id` of the
886+
key.
881887

882-
- **`projects`**
888+
- [**`projects`**](#output-projects): *(`object(project)`)*<a name="output-projects"></a>
883889

884-
A map of Project objects keyed by the `id` of the project as returned by the [`github_repository_project`] resource
890+
A map of Project objects keyed by the `id` of the project as returned by
891+
the [`github_repository_project`] resource
885892

886-
- **`issue_labels`**
893+
- [**`issue_labels`**](#output-issue_labels): *(`object(issue_label)`)*<a name="output-issue_labels"></a>
887894

888895
A map of issue labels keyed by label input id or name.
889896

890-
- **`webhooks`**
897+
- [**`webhooks`**](#output-webhooks): *(`object(webhook)`)*<a name="output-webhooks"></a>
891898

892-
All attributes and arguments as returned by the github_repository_webhook resource.
899+
All attributes and arguments as returned by the
900+
`github_repository_webhook` resource.
893901

894-
- **`secrets`**
902+
- [**`secrets`**](#output-secrets): *(`object(secret)`)*<a name="output-secrets"></a>
895903

896904
List of secrets available.
897905

README.tfdoc.hcl

Lines changed: 80 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,56 +1103,100 @@ section {
11031103
title = "Module Outputs"
11041104
content = <<-END
11051105
The following attributes are exported by the module:
1106+
END
11061107

1107-
- **`repository`**
1108-
1109-
All repository attributes as returned by the [`github_repository`] resource containing all arguments as specified above and the other attributes as specified below.
1110-
1111-
- **`full_name`**
1112-
1113-
A string of the form "orgname/reponame".
1114-
1115-
- **`html_url`**
1116-
1117-
URL to the repository on the web.
1118-
1119-
- **`ssh_clone_url`**
1120-
1121-
URL that can be provided to git clone to clone the repository via SSH.
1122-
1123-
- **`http_clone_url`**
1124-
1125-
URL that can be provided to git clone to clone the repository via HTTPS.
1126-
1127-
- **`git_clone_url`**
1108+
output "repository" {
1109+
type = object(repository)
1110+
description = <<-END
1111+
All repository attributes as returned by the [`github_repository`]
1112+
resource containing all arguments as specified above and the other
1113+
attributes as specified below.
1114+
END
1115+
}
11281116

1129-
URL that can be provided to git clone to clone the repository anonymously via the git protocol.
1117+
output "full_name" {
1118+
type = string
1119+
description = <<-END
1120+
A string of the form "orgname/reponame".
1121+
END
1122+
}
11301123

1131-
- **`collaborators`**
1124+
output "html_url" {
1125+
type = string
1126+
description = <<-END
1127+
URL to the repository on the web.
1128+
END
1129+
}
11321130

1133-
A map of Collaborator objects keyed by the `name` of the collaborator as returned by the
1134-
[`github_repository_collaborator`] resource.
1131+
output "ssh_clone_url" {
1132+
type = string
1133+
description = <<-END
1134+
URL that can be provided to git clone to clone the repository via SSH.
1135+
END
1136+
}
11351137

1136-
- **`deploy_keys`**
1138+
output "http_clone_url" {
1139+
type = string
1140+
description = <<-END
1141+
URL that can be provided to git clone to clone the repository via HTTPS.
1142+
END
1143+
}
11371144

1138-
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.
1145+
output "git_clone_url" {
1146+
type = string
1147+
description = <<-END
1148+
URL that can be provided to git clone to clone the repository
1149+
anonymously via the git protocol.
1150+
END
1151+
}
11391152

1140-
- **`projects`**
1153+
output "collaborators" {
1154+
type = object(collaborators)
1155+
description = <<-END
1156+
A map of Collaborator objects keyed by the `name` of the collaborator as
1157+
returned by the [`github_repository_collaborator`] resource.
1158+
END
1159+
}
11411160

1142-
A map of Project objects keyed by the `id` of the project as returned by the [`github_repository_project`] resource
1161+
output "deploy_keys" {
1162+
type = object(deploy_keys)
1163+
description = <<-END
1164+
A merged map of deploy key objects for the keys originally passed via
1165+
`deploy_keys` and `deploy_keys_computed` as returned by the
1166+
[`github_repository_deploy_key`] resource keyed by the input `id` of the
1167+
key.
1168+
END
1169+
}
11431170

1144-
- **`issue_labels`**
1171+
output "projects" {
1172+
type = object(project)
1173+
description = <<-END
1174+
A map of Project objects keyed by the `id` of the project as returned by
1175+
the [`github_repository_project`] resource
1176+
END
1177+
}
11451178

1179+
output "issue_labels" {
1180+
type = object(issue_label)
1181+
description = <<-END
11461182
A map of issue labels keyed by label input id or name.
1183+
END
1184+
}
11471185

1148-
- **`webhooks`**
1149-
1150-
All attributes and arguments as returned by the github_repository_webhook resource.
1151-
1152-
- **`secrets`**
1186+
output "webhooks" {
1187+
type = object(webhook)
1188+
description = <<-END
1189+
All attributes and arguments as returned by the
1190+
`github_repository_webhook` resource.
1191+
END
1192+
}
11531193

1194+
output "secrets" {
1195+
type = object(secret)
1196+
description = <<-END
11541197
List of secrets available.
1155-
END
1198+
END
1199+
}
11561200
}
11571201

11581202
section {

0 commit comments

Comments
 (0)