Skip to content

Commit 1b59c8d

Browse files
committed
Add initial example usage
1 parent eb28ec9 commit 1b59c8d

File tree

20 files changed

+139
-17
lines changed

20 files changed

+139
-17
lines changed

docs/data-sources/ca_product.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
data "tlspc_ca_product" "built_in" {
17+
type = "BUILTIN"
18+
ca_name = "Built-In CA"
19+
product_option = "Default Product"
20+
}
21+
```
1422

1523
<!-- schema generated by tfplugindocs -->
1624
## Schema

docs/data-sources/user.md

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

1111

1212

13+
## Example Usage
1314

15+
```terraform
16+
data "tlspc_user" "example" {
17+
18+
}
19+
```
1420

1521
<!-- schema generated by tfplugindocs -->
1622
## Schema

docs/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ description: |-
1313
## Example Usage
1414

1515
```terraform
16-
provider "scaffolding" {
17-
# example configuration here
16+
provider "tlspc" {
17+
apikey = ""
18+
endpoint = "https://api.venafi.eu"
1819
}
1920
```
2021

docs/resources/application.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tlspc_application" "app" {
17+
name = "TF Managed App"
18+
owners = [{ type = "USER", owner = data.tlspc_user.owner.id }, { type = "TEAM", owner = resource.tlspc_team.team.id }]
19+
ca_template_aliases = { "${resource.tlspc_certificate_template.built_in.name}" = resource.tlspc_certificate_template.built_in.id }
20+
}
21+
```
1422

1523
<!-- schema generated by tfplugindocs -->
1624
## Schema

docs/resources/certificate_template.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tlspc_certificate_template" "built_in" {
17+
name = "Built-In CA Cert Template"
18+
ca_type = data.tlspc_ca_product.built_in.type
19+
ca_product_id = data.tlspc_ca_product.built_in.id
20+
key_reuse = false
21+
}
22+
```
1423

1524
<!-- schema generated by tfplugindocs -->
1625
## Schema

docs/resources/plugin.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tlspc_plugin" "digicert" {
17+
type = "CA"
18+
manifest = file("${path.root}/plugins/digicert.json")
19+
}
20+
```
1421

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

docs/resources/registry_account.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tlspc_registry_account" "oci" {
17+
name = "k8s-oci"
18+
owner = resource.tlspc_team.team.id
19+
scopes = ["oci-registry-cm"]
20+
credential_lifetime = 365
21+
}
22+
23+
output "dockerconfig" {
24+
value = jsonencode({ "auths" = { "private-registry.venafi.eu" = { "auth" = base64encode("${resource.tlspc_registry_account.oci.oci_account_name}:${resource.tlspc_registry_account.oci.oci_registry_token}") } } })
25+
sensitive = true
26+
}
27+
```
1428

1529
<!-- schema generated by tfplugindocs -->
1630
## Schema

docs/resources/service_account.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tls_private_key" "rsa-key" {
17+
algorithm = "RSA"
18+
rsa_bits = 4096
19+
}
20+
21+
resource "tlspc_service_account" "sa" {
22+
name = "k8s-cluster"
23+
owner = resource.tlspc_team.team.id
24+
scopes = ["kubernetes-discovery"]
25+
credential_lifetime = 365
26+
public_key = trimspace(resource.tls_private_key.rsa-key.public_key_pem)
27+
}
28+
```
1429

1530
<!-- schema generated by tfplugindocs -->
1631
## Schema

docs/resources/team.md

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

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
resource "tlspc_team" "app_team_1" {
17+
name = "App Team 1"
18+
role = "PLATFORM_ADMIN"
19+
owners = [data.tlspc_user.owner.id]
20+
}
21+
```
1422

1523
<!-- schema generated by tfplugindocs -->
1624
## Schema

examples/data-sources/scaffolding_example/data-source.tf

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)