Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for CA Product data source #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions docs/data-sources/ca_product.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "tlspc_ca_product Data Source - tlspc"
subcategory: ""
description: |-

Look up the ID of a CA Product Option
---

# tlspc_ca_product (Data Source)


Look up the ID of a CA Product Option

## Example Usage

Expand All @@ -25,9 +25,19 @@ data "tlspc_ca_product" "built_in" {

### Required

- `ca_name` (String)
- `product_option` (String)
- `type` (String)
- `ca_name` (String) Name of Certificate Authority
- `product_option` (String) Name of Product Option
- `type` (String) Type of Certificate Authority, valid values include:
* BUILTIN
* DIGICERT
* GLOBALSIGN
* ENTRUST
* MICROSOFT
* ACME
* ZTPKI
* GLOBALSIGNMSSL
* TPP
* CONNECTOR

### Read-Only

Expand Down
18 changes: 16 additions & 2 deletions internal/provider/ca_product_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,32 @@ func (d *caProductDataSource) Metadata(_ context.Context, req datasource.Metadat
// Schema defines the schema for the data source.
func (d *caProductDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Look up the ID of a CA Product Option",
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
},
"type": schema.StringAttribute{
Required: true,
MarkdownDescription: `Type of Certificate Authority, valid values include:
* BUILTIN
* DIGICERT
* GLOBALSIGN
* ENTRUST
* MICROSOFT
* ACME
* ZTPKI
* GLOBALSIGNMSSL
* TPP
* CONNECTOR`,
},
"ca_name": schema.StringAttribute{
Required: true,
Required: true,
MarkdownDescription: "Name of Certificate Authority",
},
"product_option": schema.StringAttribute{
Required: true,
Required: true,
MarkdownDescription: "Name of Product Option",
},
},
}
Expand Down