Skip to content

Commit 8afbc19

Browse files
Add Schema Attribute Descriptions For Remaining Resources (#1544)
* Add Schema Attribute Descriptions For Remaining Resources * Description fixes. --------- Co-authored-by: Keegan Campbell <[email protected]>
1 parent 92449fd commit 8afbc19

File tree

42 files changed

+702
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+702
-480
lines changed

github/resource_github_actions_environment_secret.go

+17-10
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,30 @@ func resourceGithubActionsEnvironmentSecret() *schema.Resource {
1919

2020
Schema: map[string]*schema.Schema{
2121
"repository": {
22-
Type: schema.TypeString,
23-
Required: true,
24-
ForceNew: true,
22+
Type: schema.TypeString,
23+
Required: true,
24+
ForceNew: true,
25+
Description: "Name of the repository.",
2526
},
2627
"environment": {
27-
Type: schema.TypeString,
28-
Required: true,
29-
ForceNew: true,
28+
Type: schema.TypeString,
29+
Required: true,
30+
ForceNew: true,
31+
Description: "Name of the environment.",
3032
},
3133
"secret_name": {
3234
Type: schema.TypeString,
3335
Required: true,
3436
ForceNew: true,
37+
Description: "Name of the secret.",
3538
ValidateFunc: validateSecretNameFunc,
3639
},
3740
"encrypted_value": {
3841
Type: schema.TypeString,
3942
Optional: true,
4043
ForceNew: true,
4144
Sensitive: true,
45+
Description: "Encrypted value of the secret using the GitHub public key in Base64 format.",
4246
ConflictsWith: []string{"plaintext_value"},
4347
ValidateFunc: validation.StringIsBase64,
4448
},
@@ -47,15 +51,18 @@ func resourceGithubActionsEnvironmentSecret() *schema.Resource {
4751
Optional: true,
4852
ForceNew: true,
4953
Sensitive: true,
54+
Description: "Plaintext value of the secret to be encrypted.",
5055
ConflictsWith: []string{"encrypted_value"},
5156
},
5257
"created_at": {
53-
Type: schema.TypeString,
54-
Computed: true,
58+
Type: schema.TypeString,
59+
Computed: true,
60+
Description: "Date of 'actions_environment_secret' creation.",
5561
},
5662
"updated_at": {
57-
Type: schema.TypeString,
58-
Computed: true,
63+
Type: schema.TypeString,
64+
Computed: true,
65+
Description: "Date of 'actions_environment_secret' update.",
5966
},
6067
},
6168
}

github/resource_github_actions_organization_oidc_subject_claim_customization_template.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ func resourceGithubActionsOrganizationOIDCSubjectClaimCustomizationTemplate() *s
1818
},
1919
Schema: map[string]*schema.Schema{
2020
"include_claim_keys": {
21-
Type: schema.TypeList,
22-
Required: true,
23-
MinItems: 1,
21+
Type: schema.TypeList,
22+
Required: true,
23+
MinItems: 1,
24+
Description: "A list of OpenID Connect claims.",
2425
Elem: &schema.Schema{
2526
Type: schema.TypeString,
2627
},

github/resource_github_actions_organization_permissions.go

+25-17
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,54 @@ func resourceGithubActionsOrganizationPermissions() *schema.Resource {
2323
"allowed_actions": {
2424
Type: schema.TypeString,
2525
Optional: true,
26+
Description: "The permissions policy that controls the actions that are allowed to run. Can be one of: 'all', 'local_only', or 'selected'.",
2627
ValidateFunc: validation.StringInSlice([]string{"all", "local_only", "selected"}, false),
2728
},
2829
"enabled_repositories": {
2930
Type: schema.TypeString,
3031
Required: true,
32+
Description: "The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: 'all', 'none', or 'selected'.",
3133
ValidateFunc: validation.StringInSlice([]string{"all", "none", "selected"}, false),
3234
},
3335
"allowed_actions_config": {
34-
Type: schema.TypeList,
35-
Optional: true,
36-
MaxItems: 1,
36+
Type: schema.TypeList,
37+
Optional: true,
38+
MaxItems: 1,
39+
Description: "Sets the actions that are allowed in an organization. Only available when 'allowed_actions' = 'selected'",
3740
Elem: &schema.Resource{
3841
Schema: map[string]*schema.Schema{
3942
"github_owned_allowed": {
40-
Type: schema.TypeBool,
41-
Required: true,
43+
Type: schema.TypeBool,
44+
Required: true,
45+
Description: "Whether GitHub-owned actions are allowed in the organization.",
4246
},
4347
"patterns_allowed": {
44-
Type: schema.TypeSet,
45-
Optional: true,
46-
Elem: &schema.Schema{Type: schema.TypeString},
47-
Set: schema.HashString,
48+
Type: schema.TypeSet,
49+
Optional: true,
50+
Description: "Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, 'monalisa/octocat@', 'monalisa/octocat@v2', 'monalisa/'.",
51+
Elem: &schema.Schema{Type: schema.TypeString},
52+
Set: schema.HashString,
4853
},
4954
"verified_allowed": {
50-
Type: schema.TypeBool,
51-
Optional: true,
55+
Type: schema.TypeBool,
56+
Optional: true,
57+
Description: "Whether actions in GitHub Marketplace from verified creators are allowed. Set to 'true' to allow all GitHub Marketplace actions by verified creators.",
5258
},
5359
},
5460
},
5561
},
5662
"enabled_repositories_config": {
57-
Type: schema.TypeList,
58-
Optional: true,
59-
MaxItems: 1,
63+
Type: schema.TypeList,
64+
Optional: true,
65+
MaxItems: 1,
66+
Description: "Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when 'enabled_repositories' = 'selected'.",
6067
Elem: &schema.Resource{
6168
Schema: map[string]*schema.Schema{
6269
"repository_ids": {
63-
Type: schema.TypeSet,
64-
Elem: &schema.Schema{Type: schema.TypeInt},
65-
Required: true,
70+
Type: schema.TypeSet,
71+
Description: "List of repository IDs to enable for GitHub Actions.",
72+
Elem: &schema.Schema{Type: schema.TypeInt},
73+
Required: true,
6674
},
6775
},
6876
},

github/resource_github_actions_organization_secret.go

+13-6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func resourceGithubActionsOrganizationSecret() *schema.Resource {
3030
Type: schema.TypeString,
3131
Required: true,
3232
ForceNew: true,
33+
Description: "Name of the secret.",
3334
ValidateFunc: validateSecretNameFunc,
3435
},
3536
"encrypted_value": {
@@ -38,6 +39,7 @@ func resourceGithubActionsOrganizationSecret() *schema.Resource {
3839
Optional: true,
3940
Sensitive: true,
4041
ConflictsWith: []string{"plaintext_value"},
42+
Description: "Encrypted value of the secret using the GitHub public key in Base64 format.",
4143
ValidateFunc: validation.StringIsBase64,
4244
},
4345
"plaintext_value": {
@@ -46,28 +48,33 @@ func resourceGithubActionsOrganizationSecret() *schema.Resource {
4648
Optional: true,
4749
Sensitive: true,
4850
ConflictsWith: []string{"encrypted_value"},
51+
Description: "Plaintext value of the secret to be encrypted.",
4952
},
5053
"visibility": {
5154
Type: schema.TypeString,
5255
Required: true,
5356
ValidateFunc: validateValueFunc([]string{"all", "private", "selected"}),
5457
ForceNew: true,
58+
Description: "Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'.",
5559
},
5660
"selected_repository_ids": {
5761
Type: schema.TypeSet,
5862
Elem: &schema.Schema{
5963
Type: schema.TypeInt,
6064
},
61-
Set: schema.HashInt,
62-
Optional: true,
65+
Set: schema.HashInt,
66+
Optional: true,
67+
Description: "An array of repository ids that can access the organization secret.",
6368
},
6469
"created_at": {
65-
Type: schema.TypeString,
66-
Computed: true,
70+
Type: schema.TypeString,
71+
Computed: true,
72+
Description: "Date of 'actions_secret' creation.",
6773
},
6874
"updated_at": {
69-
Type: schema.TypeString,
70-
Computed: true,
75+
Type: schema.TypeString,
76+
Computed: true,
77+
Description: "Date of 'actions_secret' update.",
7178
},
7279
},
7380
}

github/resource_github_actions_organization_secret_repositories.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ func resourceGithubActionsOrganizationSecretRepositories() *schema.Resource {
2222
Type: schema.TypeString,
2323
Required: true,
2424
ForceNew: true,
25+
Description: "Name of the existing secret.",
2526
ValidateFunc: validateSecretNameFunc,
2627
},
2728
"selected_repository_ids": {
2829
Type: schema.TypeSet,
2930
Elem: &schema.Schema{
3031
Type: schema.TypeInt,
3132
},
32-
Set: schema.HashInt,
33-
Required: true,
33+
Set: schema.HashInt,
34+
Required: true,
35+
Description: "An array of repository ids that can access the organization secret.",
3436
},
3537
},
3638
}

github/resource_github_actions_repository_access_level.go

+2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ func resourceGithubActionsRepositoryAccessLevel() *schema.Resource {
2222
"access_level": {
2323
Type: schema.TypeString,
2424
Required: true,
25+
Description: "Where the actions or reusable workflows of the repository may be used. Possible values are 'none', 'user', 'organization', or 'enterprise'.",
2526
ValidateFunc: validation.StringInSlice([]string{"none", "user", "organization", "enterprise"}, false),
2627
},
2728
"repository": {
2829
Type: schema.TypeString,
2930
Required: true,
31+
Description: "The GitHub repository.",
3032
ValidateFunc: validation.StringLenBetween(1, 100),
3133
},
3234
},

github/resource_github_actions_repository_oidc_subject_claim_customization_template.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ func resourceGithubActionsRepositoryOIDCSubjectClaimCustomizationTemplate() *sch
2222
"repository": {
2323
Type: schema.TypeString,
2424
Required: true,
25+
Description: "The name of the repository.",
2526
ValidateFunc: validation.StringLenBetween(1, 100),
2627
},
2728
"use_default": {
28-
Type: schema.TypeBool,
29-
Required: true,
29+
Type: schema.TypeBool,
30+
Required: true,
31+
Description: "Whether to use the default template or not. If 'true', 'include_claim_keys' must not be set.",
3032
},
3133
"include_claim_keys": {
32-
Type: schema.TypeList,
33-
Optional: true,
34-
MinItems: 1,
34+
Type: schema.TypeList,
35+
Optional: true,
36+
MinItems: 1,
37+
Description: "A list of OpenID Connect claims.",
3538
Elem: &schema.Schema{
3639
Type: schema.TypeString,
3740
},

github/resource_github_actions_repository_permissions.go

+21-14
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,46 @@ func resourceGithubActionsRepositoryPermissions() *schema.Resource {
2424
"allowed_actions": {
2525
Type: schema.TypeString,
2626
Optional: true,
27+
Description: "The permissions policy that controls the actions that are allowed to run. Can be one of: 'all', 'local_only', or 'selected'.",
2728
ValidateFunc: validation.StringInSlice([]string{"all", "local_only", "selected"}, false),
2829
},
2930
"allowed_actions_config": {
30-
Type: schema.TypeList,
31-
Optional: true,
32-
MaxItems: 1,
31+
Type: schema.TypeList,
32+
Optional: true,
33+
MaxItems: 1,
34+
Description: "Sets the actions that are allowed in an repository. Only available when 'allowed_actions' = 'selected'. ",
3335
Elem: &schema.Resource{
3436
Schema: map[string]*schema.Schema{
3537
"github_owned_allowed": {
36-
Type: schema.TypeBool,
37-
Required: true,
38+
Type: schema.TypeBool,
39+
Required: true,
40+
Description: "Whether GitHub-owned actions are allowed in the repository.",
3841
},
3942
"patterns_allowed": {
40-
Type: schema.TypeSet,
41-
Optional: true,
42-
Elem: &schema.Schema{Type: schema.TypeString},
43-
Set: schema.HashString,
43+
Type: schema.TypeSet,
44+
Optional: true,
45+
Description: "Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, 'monalisa/octocat@', 'monalisa/octocat@v2', 'monalisa/'.",
46+
Elem: &schema.Schema{Type: schema.TypeString},
47+
Set: schema.HashString,
4448
},
4549
"verified_allowed": {
46-
Type: schema.TypeBool,
47-
Optional: true,
50+
Type: schema.TypeBool,
51+
Optional: true,
52+
Description: "Whether actions in GitHub Marketplace from verified creators are allowed. Set to 'true' to allow all GitHub Marketplace actions by verified creators.",
4853
},
4954
},
5055
},
5156
},
5257
"enabled": {
53-
Type: schema.TypeBool,
54-
Optional: true,
55-
Default: true,
58+
Type: schema.TypeBool,
59+
Optional: true,
60+
Default: true,
61+
Description: "Should GitHub actions be enabled on this repository.",
5662
},
5763
"repository": {
5864
Type: schema.TypeString,
5965
Required: true,
66+
Description: "The GitHub repository.",
6067
ValidateFunc: validation.StringLenBetween(1, 100),
6168
},
6269
},

0 commit comments

Comments
 (0)