-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCALRCORE-24642 Provider > Autogenerate documentation (#277)
* SCALRCORE-24642 Add terraform-plugin-docs dependency and generate cmd * SCALRCORE-24642 Bump Go version to 1.19 * SCALRCORE-24642 Implement docs generation * SCALRCORE-24642 Improve templates, add tools for formatting and page ordering * SCALRCORE-24642 Add Github workflows for documentation publishing * SCALRCORE-24642 Generate docs
- Loading branch information
1 parent
a2d831c
commit 29ef9d1
Showing
243 changed files
with
5,499 additions
and
3,127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: '🚀 Publish the documentation' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Readme documentation version' | ||
required: true | ||
type: string | ||
default: '0.0.4' | ||
dry: | ||
description: 'Perform a dry run (preview the changes without publishing)' | ||
required: true | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
docs: | ||
name: Docs | ||
uses: ./.github/workflows/rdme.yml | ||
with: | ||
version: ${{ inputs.version }} | ||
dry: ${{ inputs.dry }} | ||
secrets: | ||
README_API_KEY: ${{ secrets.README_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: '(callee) readme.io' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'Readme documentation version' | ||
required: true | ||
type: string | ||
dry: | ||
description: 'Perform a dry run (preview the changes without publishing)' | ||
required: true | ||
type: boolean | ||
secrets: | ||
README_API_KEY: | ||
required: true | ||
|
||
jobs: | ||
readme: | ||
name: readme.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Preview | ||
if: inputs.dry == true | ||
uses: readmeio/rdme@v8 | ||
with: | ||
rdme: docs ./docs --key=${{ secrets.README_API_KEY }} --version=${{ inputs.version }} --dryRun | ||
- name: Publish | ||
if: inputs.dry == false | ||
uses: readmeio/rdme@v8 | ||
with: | ||
rdme: docs ./docs --key=${{ secrets.README_API_KEY }} --version=${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.18.9 | ||
1.19.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: "scalr_access_policy" | ||
categorySlug: "scalr-terraform-provider" | ||
slug: "provider_datasource_scalr_access_policy" | ||
parentDocSlug: "provider_datasources" | ||
hidden: false | ||
order: 1 | ||
--- | ||
## Data Source Overview | ||
|
||
This data source is used to retrieve details of a single access policy by id. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "scalr_access_policy" "example" { | ||
id = "ap-xxxxxxxxxx" | ||
} | ||
output "scope_id" { | ||
value = data.scalr_access_policy.example.scope[0].id | ||
} | ||
output "subject_id" { | ||
value = data.scalr_access_policy.example.subject[0].id | ||
} | ||
``` | ||
|
||
<!-- Manually filling the schema here because of https://github.com/hashicorp/terraform-plugin-docs/issues/28 --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The access policy ID. | ||
|
||
### Read-Only | ||
|
||
- `is_system` (Boolean) | ||
- `role_ids` (List of String) The list of the role IDs. | ||
- `scope` (List of Object) Defines the scope where access policy is applied. (see [below for nested schema](#nestedatt--scope)) | ||
- `subject` (List of Object) Defines the subject of the access policy. (see [below for nested schema](#nestedatt--subject)) | ||
|
||
<a id="nestedatt--scope"></a> | ||
### Nested Schema for `scope` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) The scope ID, `acc-<RANDOM STRING>` for account, `env-<RANDOM STRING>` for environment, `ws-<RANDOM STRING>` for workspace. | ||
- `type` (String) The scope identity type, is one of `account`, `environment`, or `workspace`. | ||
|
||
|
||
<a id="nestedatt--subject"></a> | ||
### Nested Schema for `subject` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) The subject ID, `user-<RANDOM STRING>` for user, `team-<RANDOM STRING>` for team, `sa-<RANDOM STRING>` for service account. | ||
- `type` (String) The subject type, is one of `user`, `team`, or `service_account`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "scalr_agent_pool" | ||
categorySlug: "scalr-terraform-provider" | ||
slug: "provider_datasource_scalr_agent_pool" | ||
parentDocSlug: "provider_datasources" | ||
hidden: false | ||
order: 2 | ||
--- | ||
## Data Source Overview | ||
|
||
Retrieves the details of an agent pool. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "scalr_agent_pool" "example1" { | ||
id = "apool-xxxxxxxxxx" | ||
account_id = "acc-xxxxxxxxxx" | ||
} | ||
data "scalr_agent_pool" "example2" { | ||
name = "default-pool" | ||
account_id = "acc-xxxxxxxxxx" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `account_id` (String) An identifier of the Scalr account. | ||
- `environment_id` (String) An identifier of the Scalr environment. | ||
- `id` (String) ID of the agent pool. | ||
- `name` (String) A name of the agent pool. | ||
- `vcs_enabled` (Boolean) Indicates whether the VCS support is enabled for agents in the pool. | ||
|
||
### Read-Only | ||
|
||
- `workspace_ids` (List of String) The list of IDs of linked workspaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "scalr_current_account" | ||
categorySlug: "scalr-terraform-provider" | ||
slug: "provider_datasource_scalr_current_account" | ||
parentDocSlug: "provider_datasources" | ||
hidden: false | ||
order: 3 | ||
--- | ||
## Data Source Overview | ||
|
||
Retrieves the details of current account when using Scalr remote backend. | ||
|
||
No arguments are required. The data source returns details of the current account based on the `SCALR_ACCOUNT_ID` environment variable that is automatically exported in the Scalr remote backend. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "scalr_current_account" "account" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The identifier of the account. | ||
- `name` (String) The name of the account. |
Oops, something went wrong.