Skip to content

Commit 5e035e0

Browse files
authored
Merge pull request #56 from jetstack/cert_template_docs
Add docs for Certificate Template resources
2 parents 258aa03 + d29fa23 commit 5e035e0

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

docs/resources/certificate_template.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
page_title: "tlspc_certificate_template Resource - tlspc"
44
subcategory: ""
55
description: |-
6-
6+
Manage Certificate Issuing Template
7+
[!Note]Currently only a limited subset of attributes are supported.All Common Name/SAN/CSR validation fields are set to .* (allow all).Permitted Key Algorithms are set to RSA 2048/3072/4096.
78
---
89

910
# tlspc_certificate_template (Resource)
1011

12+
Manage Certificate Issuing Template
1113

14+
> [!Note]
15+
> Currently only a limited subset of attributes are supported.
16+
> All Common Name/SAN/CSR validation fields are set to `.*` (allow all).
17+
> Permitted Key Algorithms are set to RSA 2048/3072/4096.
1218
1319
## Example Usage
1420

@@ -26,10 +32,10 @@ resource "tlspc_certificate_template" "built_in" {
2632

2733
### Required
2834

29-
- `ca_product_id` (String)
30-
- `ca_type` (String)
31-
- `key_reuse` (Boolean)
32-
- `name` (String)
35+
- `ca_product_id` (String) The ID of a Certificate Authority Product Option
36+
- `ca_type` (String) Type of Certificate Authority (see Certificate Authority Product Option data source)
37+
- `key_reuse` (Boolean) Allow Private Key Reuse
38+
- `name` (String) Name of the Certificate Issuing Template
3339

3440
### Read-Only
3541

internal/provider/certificate_template_resource.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ func (r *certificateTemplateResource) Metadata(_ context.Context, req resource.M
3737

3838
func (r *certificateTemplateResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
3939
resp.Schema = schema.Schema{
40+
MarkdownDescription: `Manage Certificate Issuing Template
41+
42+
> [!Note]
43+
> Currently only a limited subset of attributes are supported.
44+
> All Common Name/SAN/CSR validation fields are set to ` + "`.*` (allow all)." + `
45+
> Permitted Key Algorithms are set to RSA 2048/3072/4096.
46+
`,
4047
Attributes: map[string]schema.Attribute{
4148
"id": schema.StringAttribute{
4249
Computed: true,
@@ -45,16 +52,20 @@ func (r *certificateTemplateResource) Schema(_ context.Context, _ resource.Schem
4552
},
4653
},
4754
"name": schema.StringAttribute{
48-
Required: true,
55+
Required: true,
56+
MarkdownDescription: "Name of the Certificate Issuing Template",
4957
},
5058
"ca_type": schema.StringAttribute{
51-
Required: true,
59+
Required: true,
60+
MarkdownDescription: "Type of Certificate Authority (see Certificate Authority Product Option data source)",
5261
},
5362
"ca_product_id": schema.StringAttribute{
54-
Required: true,
63+
Required: true,
64+
MarkdownDescription: "The ID of a Certificate Authority Product Option",
5565
},
5666
"key_reuse": schema.BoolAttribute{
57-
Required: true,
67+
Required: true,
68+
MarkdownDescription: "Allow Private Key Reuse",
5869
},
5970
/*
6071
"key_types": schema.SetAttribute{

0 commit comments

Comments
 (0)