Skip to content

Commit

Permalink
Fix documentation to include examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vydrazde committed Oct 15, 2023
1 parent d4dd5a2 commit 855cf8f
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 34 deletions.
20 changes: 19 additions & 1 deletion docs/resources/sandbox_allocation_unit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@ description: |-

Sandbox allocation unit


## Example Usage

```terraform
resource "kypo_sandbox_definition" "example" {
url = "[email protected]:muni-kypo-trainings/games/junior-hacker.git"
rev = "master"
}
resource "kypo_sandbox_pool" "example" {
definition = {
id = kypo_sandbox_definition.example.id
}
max_size = 1
}
resource "kypo_sandbox_allocation_unit" "example" {
pool_id = kypo_sandbox_pool.example.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
9 changes: 8 additions & 1 deletion docs/resources/sandbox_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ description: |-

Sandbox definition


## Example Usage

```terraform
resource "kypo_sandbox_definition" "example" {
url = "[email protected]:muni-kypo-trainings/games/junior-hacker.git"
rev = "master"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
16 changes: 15 additions & 1 deletion docs/resources/sandbox_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ description: |-

Sandbox pool


## Example Usage

```terraform
resource "kypo_sandbox_definition" "example" {
url = "[email protected]:muni-kypo-trainings/games/junior-hacker.git"
rev = "master"
}
resource "kypo_sandbox_pool" "example" {
definition = {
id = kypo_sandbox_definition.example.id
}
max_size = 2
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
20 changes: 19 additions & 1 deletion docs/resources/training_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@ description: |-

Training definition


## Example Usage

```terraform
resource "kypo_training_definition" "example" {
content = jsonencode(
{
title = "test"
description = null
state = "UNRELEASED"
show_stepper_bar = true
variant_sandboxes = false
estimated_duration = 0
levels = []
outcomes = []
prerequisites = []
}
)
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
19 changes: 18 additions & 1 deletion docs/resources/training_definition_adaptive.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@ description: |-

Training definition adaptive


## Example Usage

```terraform
resource "kypo_training_definition_adaptive" "example" {
content = jsonencode(
{
title = "test"
description = null
state = "UNRELEASED"
show_stepper_bar = true
estimated_duration = 0
outcomes = []
phases = []
prerequisites = []
}
)
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions examples/resources/kypo_training_definition/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "kypo_training_definition" "example" {
content = jsonencode(
{
title = "test"
description = null
state = "UNRELEASED"
show_stepper_bar = true
variant_sandboxes = false
estimated_duration = 0
levels = []
outcomes = []
prerequisites = []
}
)
}
14 changes: 14 additions & 0 deletions examples/resources/kypo_training_definition_adaptive/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resource "kypo_training_definition_adaptive" "example" {
content = jsonencode(
{
title = "test"
description = null
state = "UNRELEASED"
show_stepper_bar = true
estimated_duration = 0
outcomes = []
phases = []
prerequisites = []
}
)
}
15 changes: 0 additions & 15 deletions examples/resources/training_definition/resource.tf

This file was deleted.

14 changes: 0 additions & 14 deletions examples/resources/training_definition_adaptive/resource.tf

This file was deleted.

0 comments on commit 855cf8f

Please sign in to comment.