Skip to content

Commit 002e3d4

Browse files
committed
docs: migrate provider docs to tfplugindocs
1 parent 1af72d4 commit 002e3d4

545 files changed

Lines changed: 10984 additions & 1956 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ jobs:
3535
cache: true
3636
- run: make tools
3737
- run: make lintcheck
38-
- run: make website-lint
38+
- run: make docs-check
3939
- run: make build
4040
- run: make test

GNUmakefile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ endif
2828
default: build
2929

3030
tools:
31-
go install github.com/client9/misspell/cmd/[email protected]
3231
go install github.com/golangci/golangci-lint/v2/cmd/[email protected]
32+
go install github.com/hashicorp/terraform-plugin-docs/cmd/[email protected]
3333

3434
build: lintcheck
3535
CGO_ENABLED=0 go build -ldflags="-s -w" ./...
@@ -74,8 +74,22 @@ endif
7474
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
7575

7676
website-lint:
77-
@echo "==> Checking website against linters..."
78-
@misspell -error -source=text website/
77+
@$(MAKE) docs-check
78+
79+
docs:
80+
@echo "==> Generating provider docs..."
81+
go generate ./...
82+
83+
docs-validate:
84+
@echo "==> Validating provider docs..."
85+
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs validate --provider-name $(PKG_NAME)
86+
87+
docs-check: docs docs-validate
88+
@echo "==> Checking provider docs for drift..."
89+
@test -z "$$(git status --short --untracked-files=all -- docs templates examples main.go go.mod go.sum)" || \
90+
( echo "Generated docs are out of date. Run 'make docs' and commit the results."; \
91+
git status --short --untracked-files=all -- docs templates examples main.go go.mod go.sum; \
92+
exit 1 )
7993

8094
website-test:
8195
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
@@ -84,4 +98,4 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
8498
endif
8599
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
86100

87-
.PHONY: build test testacc fmt lint lintcheck tools website website-lint website-test sweep
101+
.PHONY: build test testacc fmt lint lintcheck tools website website-lint website-test docs docs-validate docs-check sweep

website/docs/d/actions_environment_public_key.html.markdown renamed to docs/data-sources/actions_environment_public_key.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_environment_public_key"
43
description: |-
54
Get information on a GitHub Actions Environment Public Key.
5+
subcategory: "GitHub Actions"
66
---
77

88
# github_actions_environment_public_key
99

10-
Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions.
11-
Note that the provider `token` must have admin rights to a repository to retrieve the action public keys of it's environments.
12-
10+
Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve the action public keys of it's environments.
1311

1412
## Example Usage
1513

16-
```hcl
14+
```terraform
1715
data "github_actions_environment_public_key" "example" {
1816
repository = "example_repo"
1917
environment = "example_environment"
@@ -22,10 +20,10 @@ data "github_actions_environment_public_key" "example" {
2220

2321
## Argument Reference
2422

25-
* `repository` - (Required) Name of the repository to get public key from.
26-
* `environment` - (Required) Name of the environment to get public key from.
23+
* `repository` - (Required) Name of the repository to get public key from.
24+
* `environment` - (Required) Name of the environment to get public key from.
2725

2826
## Attributes Reference
2927

30-
* `key_id` - ID of the key that has been retrieved.
31-
* `key` - Actual key retrieved.
28+
* `key_id` - ID of the key that has been retrieved.
29+
* `key` - Actual key retrieved.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_environment_secrets"
43
description: |-
54
Get Actions secrets of the repository environment
5+
subcategory: "GitHub Actions"
66
---
77

88
# github\_actions\_environment\_secrets
@@ -11,7 +11,7 @@ Use this data source to retrieve the list of secrets of the repository environme
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_environment_secrets" "example" {
1616
name = "exampleRepo"
1717
environment = "exampleEnvironment"
@@ -22,7 +22,7 @@ data "github_actions_environment_secrets" "example" {
2222

2323
## Attributes Reference
2424

25-
* `secrets` - list of secrets for the environment
26-
* `name` - Name of the secret
27-
* `created_at` - Timestamp of the secret creation
28-
* `updated_at` - Timestamp of the secret last update
25+
* `secrets` - list of secrets for the environment
26+
* `name` - Name of the secret
27+
* `created_at` - Timestamp of the secret creation
28+
* `updated_at` - Timestamp of the secret last update

website/docs/d/actions_environment_variables.html.markdown renamed to docs/data-sources/actions_environment_variables.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_environment_variables"
43
description: |-
54
Get Actions variables of the repository environment
5+
subcategory: "GitHub Actions"
66
---
77

88
# github\_actions\_environment\_variables
@@ -11,7 +11,7 @@ Use this data source to retrieve the list of variables of the repository environ
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_environment_variables" "example" {
1616
name = "exampleRepo"
1717
environment = "exampleEnvironment"
@@ -22,8 +22,8 @@ data "github_actions_environment_variables" "example" {
2222

2323
## Attributes Reference
2424

25-
* `variables` - list of variables for the environment
26-
* `name` - Name of the variable
27-
* `value` - Value of the variable
28-
* `created_at` - Timestamp of the variable creation
29-
* `updated_at` - Timestamp of the variable last update
25+
* `variables` - list of variables for the environment
26+
* `name` - Name of the variable
27+
* `value` - Value of the variable
28+
* `created_at` - Timestamp of the variable creation
29+
* `updated_at` - Timestamp of the variable last update

website/docs/d/actions_organization_oidc_subject_claim_customization_template.html.markdown renamed to docs/data-sources/actions_organization_oidc_subject_claim_customization_template.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
layout: "github"
3-
page_title: "GitHub: actions_organization_oidc_subject_claim_customization_template"
2+
page_title: "GitHub: github_actions_organization_oidc_subject_claim_customization_template"
43
description: |-
54
Get a GitHub Actions organization OpenID Connect customization template
5+
subcategory: "GitHub Actions"
66
---
77

8-
# actions_organization_oidc_subject_claim_customization_template
8+
# github_actions_organization_oidc_subject_claim_customization_template
99

1010
Use this data source to retrieve the OpenID Connect subject claim customization template for an organization
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_organization_oidc_subject_claim_customization_template" "example" {
1616
}
1717
```
@@ -20,4 +20,4 @@ data "github_actions_organization_oidc_subject_claim_customization_template" "ex
2020

2121
## Attributes Reference
2222

23-
* `include_claim_keys` - The list of OpenID Connect claim keys.
23+
* `include_claim_keys` - The list of OpenID Connect claim keys.

website/docs/d/actions_organization_public_key.html.markdown renamed to docs/data-sources/actions_organization_public_key.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_organization_public_key"
43
description: |-
54
Get information on a GitHub Actions Organization Public Key.
5+
subcategory: "GitHub Actions"
66
---
77

88
# github_actions_organization_public_key
99

10-
Use this data source to retrieve information about a GitHub Actions Organization public key. This data source is required to be used with other GitHub secrets interactions.
11-
Note that the provider `token` must have admin rights to an organization to retrieve it's action public key.
10+
Use this data source to retrieve information about a GitHub Actions Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's action public key.
1211

1312
## Example Usage
1413

15-
```hcl
14+
```terraform
1615
data "github_actions_organization_public_key" "example" {}
1716
```
1817

1918
## Attributes Reference
2019

21-
* `key_id` - ID of the key that has been retrieved.
22-
* `key` - Actual key retrieved.
20+
* `key_id` - ID of the key that has been retrieved.
21+
* `key` - Actual key retrieved.

website/docs/d/actions_organization_registration_token.html.markdown renamed to docs/data-sources/actions_organization_registration_token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
layout: "github"
3-
page_title: "GitHub: actions_organization_registration_token"
2+
page_title: "GitHub: github_actions_organization_registration_token"
43
description: |-
54
Get a GitHub Actions organization registration token.
5+
subcategory: "GitHub Actions"
66
---
77

8-
# actions_registration_token
8+
# github_actions_organization_registration_token
99

1010
Use this data source to retrieve a GitHub Actions organization registration token. This token can then be used to register a self-hosted runner.
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_organization_registration_token" "example" {
1616
}
1717
```
@@ -20,5 +20,5 @@ data "github_actions_organization_registration_token" "example" {
2020

2121
## Attributes Reference
2222

23-
* `token` - The token that has been retrieved.
24-
* `expires_at` - The token expiration date.
23+
* `token` - The token that has been retrieved.
24+
* `expires_at` - The token expiration date.
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_organization_secrets"
43
description: |-
54
Get actions secrets of the organization
5+
subcategory: "GitHub Actions"
66
---
77

88
# github\_actions\_organization\_secrets
@@ -11,7 +11,7 @@ Use this data source to retrieve the list of secrets of the organization.
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_organization_secrets" "example" {
1616
}
1717
```
@@ -20,9 +20,8 @@ data "github_actions_organization_secrets" "example" {
2020

2121
## Attributes Reference
2222

23-
* `secrets` - list of secrets for the repository
24-
* `name` - Secret name
25-
* `visibility` - Secret visibility
26-
* `created_at` - Timestamp of the secret creation
27-
* `updated_at` - Timestamp of the secret last update
28-
23+
* `secrets` - list of secrets for the repository
24+
* `name` - Secret name
25+
* `visibility` - Secret visibility
26+
* `created_at` - Timestamp of the secret creation
27+
* `updated_at` - Timestamp of the secret last update

website/docs/d/actions_organization_variables.html.markdown renamed to docs/data-sources/actions_organization_variables.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
layout: "github"
32
page_title: "GitHub: github_actions_organization_variables"
43
description: |-
54
Get Actions variables of the organization
5+
subcategory: "GitHub Actions"
66
---
77

88
# github\_actions\_organization\_variables
@@ -11,7 +11,7 @@ Use this data source to retrieve the list of variables of the organization.
1111

1212
## Example Usage
1313

14-
```hcl
14+
```terraform
1515
data "github_actions_organization_variables" "example" {
1616
}
1717
```
@@ -20,9 +20,9 @@ data "github_actions_organization_variables" "example" {
2020

2121
## Attributes Reference
2222

23-
* `variables` - list of variables for the repository
24-
* `name` - Name of the variable
25-
* `value` - Value of the variable
26-
* `visibility` - Visibility of the variable
27-
* `created_at` - Timestamp of the variable creation
28-
* `updated_at` - Timestamp of the variable last update
23+
* `variables` - list of variables for the repository
24+
* `name` - Name of the variable
25+
* `value` - Value of the variable
26+
* `visibility` - Visibility of the variable
27+
* `created_at` - Timestamp of the variable creation
28+
* `updated_at` - Timestamp of the variable last update

0 commit comments

Comments
 (0)