Skip to content

Commit

Permalink
fix: update docs (#86)
Browse files Browse the repository at this point in the history
* fix: update docs
  • Loading branch information
BenjaminDecreusefond authored Oct 29, 2024
1 parent 3505b15 commit d16ae8b
Show file tree
Hide file tree
Showing 29 changed files with 89 additions and 50 deletions.
6 changes: 3 additions & 3 deletions docs/resources/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_module Resource - terrakube"
subcategory: ""
description: |-
Resource for managing modules in Terrakube. This resource allows you to create, read, update, and delete modules within a specified organization.
---

# terrakube_module (Resource)


Resource for managing modules in Terrakube. This resource allows you to create, read, update, and delete modules within a specified organization.

## Example Usage

Expand Down Expand Up @@ -49,7 +49,7 @@ resource "terrakube_module" "module" {
- `name` (String) Module name
- `organization_id` (String) Terrakube organization id
- `provider_name` (String) Module provider name. Example: azurerm, google, aws, etc
- `source` (String) Source (git using https or ssh protocol)
- `source` (String) Source repository for the module(git using https or ssh protocol)

### Optional

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_organization Resource - terrakube"
subcategory: ""
description: |-
Creates an Organization on Terrakube instance.
---

# terrakube_organization (Resource)


Creates an Organization on Terrakube instance.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_organization_tag Resource - terrakube"
subcategory: ""
description: |-
Create a tag and attach it to your organization.
---

# terrakube_organization_tag (Resource)


Create a tag and attach it to your organization.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_organization_template Resource - terrakube"
subcategory: ""
description: |-
Create a template and attach it to your organization. This can be useful to define newprocess like drift detection, cost mapping, etc...
---

# terrakube_organization_template (Resource)


Create a template and attach it to your organization. This can be useful to define newprocess like drift detection, cost mapping, etc...

## Example Usage

Expand Down
10 changes: 5 additions & 5 deletions docs/resources/organization_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_organization_variable Resource - terrakube"
subcategory: ""
description: |-
Create an organization variable that can be used by all workspaces inside the organization.
---

# terrakube_organization_variable (Resource)


Create an organization variable that can be used by all workspaces inside the organization.

## Example Usage

Expand Down Expand Up @@ -39,12 +39,12 @@ resource "terrakube_organization_variable" "sample2" {

### Required

- `category` (String) Variable category (ENV or TERRAFORM)
- `category` (String) Variable category (ENV or TERRAFORM). ENV variables are injected in workspace environment at runtime.
- `description` (String) Variable description
- `hcl` (Boolean) is hcl?
- `hcl` (Boolean) Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.
- `key` (String) Variable key
- `organization_id` (String) Terrakube organization id
- `sensitive` (Boolean) is sensitive?
- `sensitive` (Boolean) Sensitive variables are never shown in the UI or API. They may appear in Terraform logs if your configuration is designed to output them.
- `value` (String) Variable value

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_team Resource - terrakube"
subcategory: ""
description: |-
Create a team and bind it to an organization. Allows for fined grained access management.
---

# terrakube_team (Resource)


Create a team and bind it to an organization. Allows for fined grained access management.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/team_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_team_token Resource - terrakube"
subcategory: ""
description: |-
Create a team token that shares the same privilege. Useful when managing devs access.
---

# terrakube_team_token (Resource)


Create a team token that shares the same privilege. Useful when managing devs access.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/vcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_vcs Resource - terrakube"
subcategory: ""
description: |-
Create a VCS provider for the desired organization. VCS are used by VCS workspace to read github repositories at run time.
---

# terrakube_vcs (Resource)


Create a VCS provider for the desired organization. VCS are used by VCS workspace to read github repositories at run time.

## Example Usage

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/workspace_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_workspace_cli Resource - terrakube"
subcategory: ""
description: |-
Create a CLI workspace for Terrakube. When running plan from UI with CLI workspace only the current state will be compared to the cloud provider API not taking into account the file containedin workspace working directory. If you want to fetch files from github use vcs_workspace instead.
---

# terrakube_workspace_cli (Resource)


Create a CLI workspace for Terrakube. When running plan from UI with CLI workspace only the current state will be compared to the cloud provider API not taking into account the file containedin workspace working directory. If you want to fetch files from github use vcs_workspace instead.

## Example Usage

Expand Down Expand Up @@ -38,7 +38,7 @@ resource "terrakube_workspace_cli" "sample2" {
### Required

- `description` (String) Workspace CLI description
- `execution_mode` (String) Workspace CLI execution mode (remote or local)
- `execution_mode` (String) Workspace CLI execution mode (remote or local). Remote execution will require setting up executor.
- `iac_type` (String) Workspace CLI IaC type (Supported values terraform or tofu)
- `iac_version` (String) Workspace CLI IaC type
- `name` (String) Workspace CLI name
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/workspace_schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_workspace_schedule Resource - terrakube"
subcategory: ""
description: |-
Create a workspace schedule that will allow you to run templates on a regular basis.
---

# terrakube_workspace_schedule (Resource)


Create a workspace schedule that will allow you to run templates on a regular basis.



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/workspace_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_workspace_tag Resource - terrakube"
subcategory: ""
description: |-
Adds a tag to a workspace resource.
---

# terrakube_workspace_tag (Resource)


Adds a tag to a workspace resource.

## Example Usage

Expand Down
10 changes: 5 additions & 5 deletions docs/resources/workspace_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_workspace_variable Resource - terrakube"
subcategory: ""
description: |-
Create variables that will be used by this workspace only.
---

# terrakube_workspace_variable (Resource)


Create variables that will be used by this workspace only.

## Example Usage

Expand Down Expand Up @@ -41,12 +41,12 @@ resource "terrakube_workspace_variable" "sample2" {

### Required

- `category` (String) Variable category (ENV or TERRAFORM)
- `category` (String) Variable category (ENV or TERRAFORM). ENV variables are injected in workspace environment at runtime.
- `description` (String) Variable description
- `hcl` (Boolean) is hcl?
- `hcl` (Boolean) Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.
- `key` (String) Variable key
- `organization_id` (String) Terrakube organization id
- `sensitive` (Boolean) is sensitive?
- `sensitive` (Boolean) Sensitive variables are never shown in the UI or API. They may appear in Terraform logs if your configuration is designed to output them.
- `value` (String) Variable value
- `workspace_id` (String) Terrakube workspace id

Expand Down
8 changes: 4 additions & 4 deletions docs/resources/workspace_vcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
page_title: "terrakube_workspace_vcs Resource - terrakube"
subcategory: ""
description: |-
Create a VCS workspace for Terrakube. When running plan from UI with VCS workspace it will compare files contained in github repository with the cloud provider. If you only want to compare state with cloud provider API use CLI workspace instead.
---

# terrakube_workspace_vcs (Resource)


Create a VCS workspace for Terrakube. When running plan from UI with VCS workspace it will compare files contained in github repository with the cloud provider. If you only want to compare state with cloud provider API use CLI workspace instead.

## Example Usage

```terraform
resource "terrakube_workspace_cli" "sample1" {
resource "terrakube_workspace_vcs" "sample1" {
organization_id = data.terrakube_organization.org.id
name = "work-from-provider1"
description = "sample"
Expand All @@ -37,6 +37,7 @@ resource "terrakube_workspace_cli" "sample1" {
- `organization_id` (String) Terrakube organization id
- `repository` (String) Workspace VCS repository
- `template_id` (String) Default template ID for the workspace
- `vcs_id` (String) VCS connection ID for private workspaces

### Optional

Expand All @@ -45,7 +46,6 @@ resource "terrakube_workspace_cli" "sample1" {
- `execution_mode` (String) Workspace VCS execution mode (remote or local)
- `folder` (String) Workspace VCS folder
- `iac_type` (String) Workspace VCS IaC type (Supported values terraform or tofu)
- `vcs_id` (String) VCS connection ID for private workspaces

### Read-Only

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/workspace_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "terrakube_workspace_webhook Resource - terrakube"
subcategory: ""
description: |-
Create a webhook attached to a workspace. Can be useful for automated apply/plan workflows.
---

# terrakube_workspace_webhook (Resource)


Create a webhook attached to a workspace. Can be useful for automated apply/plan workflows.

## Example Usage

Expand All @@ -32,7 +32,7 @@ resource "terrakube_workspace_webhook" "webhook" {

### Optional

- `branch` (List of String) A list of branches that trigger a run.
- `branch` (List of String) A list of branches that trigger a run. Support regex for more complex matching.
- `event` (String) The event type that triggers a run, currently only `PUSH` is supported.
- `path` (List of String) The file paths in regex that trigger a run.
- `remote_hook_id` (String) The remote hook ID.
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/terrakube_workspace_vcs/resource.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "terrakube_workspace_cli" "sample1" {
resource "terrakube_workspace_vcs" "sample1" {
organization_id = data.terrakube_organization.org.id
name = "work-from-provider1"
description = "sample"
Expand Down
5 changes: 4 additions & 1 deletion internal/provider/module_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func (r *ModuleResource) Metadata(ctx context.Context, req resource.MetadataRequ

func (r *ModuleResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Resource for managing modules in Terrakube. " +
"This resource allows you to create, read, update, and delete modules within a specified organization.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand All @@ -79,7 +82,7 @@ func (r *ModuleResource) Schema(ctx context.Context, req resource.SchemaRequest,
},
"source": schema.StringAttribute{
Required: true,
Description: "Source (git using https or ssh protocol)",
Description: "Source repository for the module(git using https or ssh protocol)",
},
"vcs_id": schema.StringAttribute{
Optional: true,
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/organization_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func (r *OrganizationResource) Metadata(ctx context.Context, req resource.Metada

func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Creates an Organization on Terrakube instance.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/organization_tag_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func (r *OrganizationTagResource) Metadata(ctx context.Context, req resource.Met

func (r *OrganizationTagResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create a tag and attach it to your organization.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/organization_template_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func (r *OrganizationTemplateResource) Metadata(ctx context.Context, req resourc

func (r *OrganizationTemplateResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create a template and attach it to your organization. This can be useful to define new" +
"process like drift detection, cost mapping, etc...",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
8 changes: 5 additions & 3 deletions internal/provider/organization_variable_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func (r *OrganizationVariableResource) Metadata(ctx context.Context, req resourc

func (r *OrganizationVariableResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create an organization variable that can be used by all workspaces inside the organization.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand All @@ -79,15 +81,15 @@ func (r *OrganizationVariableResource) Schema(ctx context.Context, req resource.
},
"category": schema.StringAttribute{
Required: true,
Description: "Variable category (ENV or TERRAFORM)",
Description: "Variable category (ENV or TERRAFORM). ENV variables are injected in workspace environment at runtime.",
},
"sensitive": schema.BoolAttribute{
Required: true,
Description: "is sensitive?",
Description: "Sensitive variables are never shown in the UI or API. They may appear in Terraform logs if your configuration is designed to output them.",
},
"hcl": schema.BoolAttribute{
Required: true,
Description: "is hcl?",
Description: "Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.",
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/team_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func (r *TeamResource) Metadata(ctx context.Context, req resource.MetadataReques

func (r *TeamResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create a team and bind it to an organization. Allows for fined grained access management.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
1 change: 1 addition & 0 deletions internal/provider/team_token_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (r *TeamTokenResource) Metadata(ctx context.Context, req resource.MetadataR

func (r *TeamTokenResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create a team token that shares the same privilege. Useful when managing devs access.",
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/vcs_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (r *VcsResource) Metadata(ctx context.Context, req resource.MetadataRequest

func (r *VcsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Create a VCS provider for the desired organization. VCS are used by VCS workspace to read " +
"github repositories at run time.",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand Down
Loading

0 comments on commit d16ae8b

Please sign in to comment.