Skip to content

Commit a4ceb1f

Browse files
authored
Adds documentation for github_organization_custom_properties (#2785)
1 parent e75cc27 commit a4ceb1f

3 files changed

Lines changed: 126 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: "github"
3+
page_title: "GitHub: github_organization_custom_properties"
4+
description: |-
5+
Get information about a GitHub organization custom property
6+
---
7+
8+
# github_organization_custom_properties
9+
10+
Use this data source to retrieve information about a GitHub organization custom property.
11+
12+
## Example Usage
13+
14+
```hcl
15+
data "github_organization_custom_properties" "environment" {
16+
property_name = "environment"
17+
}
18+
```
19+
20+
## Argument Reference
21+
22+
The following arguments are supported:
23+
24+
* `property_name` - (Required) The name of the custom property to retrieve.
25+
26+
## Attributes Reference
27+
28+
* `property_name` - The name of the custom property.
29+
30+
* `value_type` - The type of the custom property. Can be one of `string`, `single_select`, `multi_select`, or `true_false`.
31+
32+
* `required` - Whether the custom property is required.
33+
34+
* `description` - The description of the custom property.
35+
36+
* `default_value` - The default value of the custom property.
37+
38+
* `allowed_values` - List of allowed values for the custom property. Only populated when `value_type` is `single_select` or `multi_select`.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
layout: "github"
3+
page_title: "GitHub: github_organization_custom_properties"
4+
description: |-
5+
Creates and manages custom properties for a GitHub organization
6+
---
7+
8+
# github_organization_custom_properties
9+
10+
This resource allows you to create and manage custom properties for a GitHub organization.
11+
12+
Custom properties enable you to add metadata to repositories within your organization. You can use custom properties to add context about repositories, such as who owns them, when they expire, or compliance requirements.
13+
14+
## Example Usage
15+
16+
```hcl
17+
resource "github_organization_custom_properties" "environment" {
18+
property_name = "environment"
19+
value_type = "single_select"
20+
required = true
21+
description = "The deployment environment for this repository"
22+
default_value = "development"
23+
allowed_values = [
24+
"development",
25+
"staging",
26+
"production"
27+
]
28+
}
29+
```
30+
31+
## Example Usage - Text Property
32+
33+
```hcl
34+
resource "github_organization_custom_properties" "owner" {
35+
property_name = "owner"
36+
value_type = "string"
37+
required = true
38+
description = "The team or individual responsible for this repository"
39+
}
40+
```
41+
42+
## Example Usage - Boolean Property
43+
44+
```hcl
45+
resource "github_organization_custom_properties" "archived" {
46+
property_name = "archived"
47+
value_type = "true_false"
48+
required = false
49+
description = "Whether this repository is archived"
50+
default_value = "false"
51+
}
52+
```
53+
54+
## Argument Reference
55+
56+
The following arguments are supported:
57+
58+
* `property_name` - (Required) The name of the custom property.
59+
60+
* `value_type` - (Optional) The type of the custom property. Can be one of `string`, `single_select`, `multi_select`, or `true_false`. Defaults to `string`.
61+
62+
* `required` - (Optional) Whether the custom property is required. Defaults to `false`.
63+
64+
* `description` - (Optional) The description of the custom property.
65+
66+
* `default_value` - (Optional) The default value of the custom property.
67+
68+
* `allowed_values` - (Optional) List of allowed values for the custom property. Only applicable when `value_type` is `single_select` or `multi_select`.
69+
70+
## Attributes Reference
71+
72+
In addition to all arguments above, the following attributes are exported:
73+
74+
* `property_name` - The name of the custom property.
75+
76+
## Import
77+
78+
Organization custom properties can be imported using the property name:
79+
80+
```
81+
terraform import github_organization_custom_properties.environment environment
82+
```

website/github.erb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@
115115
<li>
116116
<a href="/docs/providers/github/d/organization_custom_role.html">github_organization_custom_role</a>
117117
</li>
118+
<li>
119+
<a href="/docs/providers/github/d/organization_custom_properties.html">github_organization_custom_properties</a>
120+
</li>
118121
<li>
119122
<a href="/docs/providers/github/d/organization_external_identities.html">github_organization_external_identities</a>
120123
</li>
@@ -280,6 +283,9 @@
280283
<li>
281284
<a href="/docs/providers/github/r/organization_custom_role.html">github_organization_custom_role</a>
282285
</li>
286+
<li>
287+
<a href="/docs/providers/github/r/organization_custom_properties.html">github_organization_custom_properties</a>
288+
</li>
283289
<li>
284290
<a href="/docs/providers/github/r/organization_project.html">github_organization_project</a>
285291
</li>

0 commit comments

Comments
 (0)