Skip to content

Commit 7b63cfe

Browse files
authored
Merge pull request #55 from jetstack/plugin_docs
Add docs for plugin resources
2 parents 5e035e0 + 3db093f commit 7b63cfe

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

docs/resources/plugin.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@
33
page_title: "tlspc_plugin Resource - tlspc"
44
subcategory: ""
55
description: |-
6+
Manage the installed plugins for a TLS Protect Cloud tenant.
7+
See the API Documentation https://developer.venafi.com/tlsprotectcloud/reference/post-v1-plugins for guidance.
8+
The manifest attribute should be a json string which meets the specification of the manifest object.
9+
For an example, see the DigiCert CA Connector https://github.com/Venafi/digicert-ca-connector/blob/main/manifest.json.
10+
This would additionally need a deployment block to meet the required specification, and specify the image location:
611
12+
"deployment": {
13+
"executionTarget": "vsat",
14+
"image": "org/image:v0.1.0"
15+
}
716
---
817

918
# tlspc_plugin (Resource)
1019

20+
Manage the installed plugins for a TLS Protect Cloud tenant.
1121

22+
See the [API Documentation](https://developer.venafi.com/tlsprotectcloud/reference/post-v1-plugins) for guidance.
23+
The manifest attribute should be a json string which meets the specification of the manifest object.
24+
25+
For an example, see the [DigiCert CA Connector](https://github.com/Venafi/digicert-ca-connector/blob/main/manifest.json).
26+
This would additionally need a deployment block to meet the required specification, and specify the image location:
27+
```
28+
"deployment": {
29+
"executionTarget": "vsat",
30+
"image": "org/image:v0.1.0"
31+
}
32+
```
1233

1334
## Example Usage
1435

@@ -24,8 +45,8 @@ resource "tlspc_plugin" "digicert" {
2445

2546
### Required
2647

27-
- `manifest` (String)
28-
- `type` (String)
48+
- `manifest` (String) JSON string of a plugin manifest
49+
- `type` (String) Type of plugin, e.g. `CA` or `MACHINE`
2950

3051
### Read-Only
3152

internal/provider/plugin_resource.go

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ func (r *pluginResource) Metadata(_ context.Context, req resource.MetadataReques
3939

4040
func (r *pluginResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
4141
resp.Schema = schema.Schema{
42+
MarkdownDescription: `Manage the installed plugins for a TLS Protect Cloud tenant.
43+
44+
See the [API Documentation](https://developer.venafi.com/tlsprotectcloud/reference/post-v1-plugins) for guidance.
45+
The manifest attribute should be a json string which meets the specification of the manifest object.
46+
47+
For an example, see the [DigiCert CA Connector](https://github.com/Venafi/digicert-ca-connector/blob/main/manifest.json).
48+
This would additionally need a deployment block to meet the required specification, and specify the image location:
49+
` + "```" + `
50+
"deployment": {
51+
"executionTarget": "vsat",
52+
"image": "org/image:v0.1.0"
53+
}
54+
` + "```",
4255
Attributes: map[string]schema.Attribute{
4356
"id": schema.StringAttribute{
4457
Computed: true,
@@ -47,11 +60,13 @@ func (r *pluginResource) Schema(_ context.Context, _ resource.SchemaRequest, res
4760
},
4861
},
4962
"type": schema.StringAttribute{
50-
Required: true,
63+
Required: true,
64+
MarkdownDescription: "Type of plugin, e.g. `CA` or `MACHINE`",
5165
},
5266
"manifest": schema.StringAttribute{
53-
Required: true,
54-
CustomType: jsontypes.NormalizedType{},
67+
Required: true,
68+
CustomType: jsontypes.NormalizedType{},
69+
MarkdownDescription: "JSON string of a plugin manifest",
5570
},
5671
},
5772
}

0 commit comments

Comments
 (0)