Skip to content

Commit 914a48b

Browse files
docs: add missing examples (#245)
1 parent 15785fb commit 914a48b

File tree

10 files changed

+123
-4
lines changed

10 files changed

+123
-4
lines changed

docs/resources/context_field.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ description: |-
1010

1111
Fetch a context field.
1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "unleash_context_field" "ham_context_field" {
17+
name = "ham"
18+
}
19+
20+
resource "unleash_context_field" "cheese_context_field" {
21+
name = "cheese"
22+
stickiness = true
23+
description = "Type of cheese to constrain on"
24+
legal_values = [
25+
{
26+
value = "brie"
27+
description = "Gooey, delicious"
28+
}
29+
]
30+
}
31+
```
1432

1533
<!-- schema generated by tfplugindocs -->
1634
## Schema

docs/resources/environment.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ description: |-
1010

1111
Manage Unleash environments.
1212

13+
## Example Usage
1314

15+
```terraform
16+
resource "unleash_environment" "space" {
17+
name = "outerspace"
18+
type = "vacuum"
19+
}
20+
```
1421

1522
<!-- schema generated by tfplugindocs -->
1623
## Schema

docs/resources/oidc.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ description: |-
1010

1111
Manages OIDC configuration.
1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "unleash_oidc" "simple_oidc_config" {
17+
enabled = true
18+
discover_url = "http://mock-openid-server:9000/.well-known/openid-configuration"
19+
secret = "kinda-sorta-secret"
20+
client_id = "client-id"
21+
auto_create = true
22+
default_root_role = 1
23+
}
24+
```
1425

1526
<!-- schema generated by tfplugindocs -->
1627
## Schema

docs/resources/project_environment.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,27 @@ description: |-
1010

1111
ProjectEnvironment schema
1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "unleash_project" "project_1" {
17+
id = "one"
18+
name = "First project"
19+
description = "My first project"
20+
}
21+
22+
resource "unleash_environment" "space" {
23+
name = "outerspace"
24+
type = "vacuum"
25+
}
26+
27+
resource "unleash_project_environment" "space_environment" {
28+
project_id = unleash_project.project_1.id
29+
environment_name = unleash_environment.space.name
30+
change_requests_enabled = true
31+
required_approvals = 2
32+
}
33+
```
1434

1535
<!-- schema generated by tfplugindocs -->
1636
## Schema

docs/resources/saml.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ description: |-
1010

1111
Manages SAML configuration.
1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "unleash_saml" "simple_saml_config" {
17+
enabled = true
18+
certificate = "test-certificate"
19+
entity_id = "some-entity-id"
20+
sign_on_url = "http://other-places.com"
21+
auto_create = true
22+
default_root_role = 1
23+
}
24+
```
1425

1526
<!-- schema generated by tfplugindocs -->
1627
## Schema
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
resource "unleash_context_field" "ham_context_field" {
2+
name = "ham"
3+
}
4+
5+
resource "unleash_context_field" "cheese_context_field" {
6+
name = "cheese"
7+
stickiness = true
8+
description = "Type of cheese to constrain on"
9+
legal_values = [
10+
{
11+
value = "brie"
12+
description = "Gooey, delicious"
13+
}
14+
]
15+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "unleash_environment" "space" {
2+
name = "outerspace"
3+
type = "vacuum"
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "unleash_oidc" "simple_oidc_config" {
2+
enabled = true
3+
discover_url = "http://mock-openid-server:9000/.well-known/openid-configuration"
4+
secret = "kinda-sorta-secret"
5+
client_id = "client-id"
6+
auto_create = true
7+
default_root_role = 1
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
resource "unleash_project" "project_1" {
2+
id = "one"
3+
name = "First project"
4+
description = "My first project"
5+
}
6+
7+
resource "unleash_environment" "space" {
8+
name = "outerspace"
9+
type = "vacuum"
10+
}
11+
12+
resource "unleash_project_environment" "space_environment" {
13+
project_id = unleash_project.project_1.id
14+
environment_name = unleash_environment.space.name
15+
change_requests_enabled = true
16+
required_approvals = 2
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "unleash_saml" "simple_saml_config" {
2+
enabled = true
3+
certificate = "test-certificate"
4+
entity_id = "some-entity-id"
5+
sign_on_url = "http://other-places.com"
6+
auto_create = true
7+
default_root_role = 1
8+
}

0 commit comments

Comments
 (0)