Skip to content

Commit

Permalink
Add provider and resource level descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gdj0nes committed Apr 18, 2024
1 parent 666b8ea commit f2b5cfc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
8 changes: 6 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
page_title: "pinecone Provider"
subcategory: ""
description: |-
You can use the this Terraform provider to manage resources supported
by Pinecone https://www.pinecone.io/. The provider must be configured with the proper
credentials before use. You can provide credentials via the PINECONEAPIKEY environment variable.
---

# pinecone Provider


You can use the this Terraform provider to manage resources supported
by [Pinecone](https://www.pinecone.io/). The provider must be configured with the proper
credentials before use. You can provide credentials via the PINECONE_API_KEY environment variable.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "pinecone_collection Resource - terraform-provider-pinecone"
subcategory: ""
description: |-
Collection resource
The pinecone_collection resource lets you create and manage collections in Pinecone. Learn more about collections in the docs hhttps://docs.pinecone.io/guides/indexes/understanding-collections.
---

# pinecone_collection (Resource)

Collection resource
The `pinecone_collection` resource lets you create and manage collections in Pinecone. Learn more about collections in the [docs](hhttps://docs.pinecone.io/guides/indexes/understanding-collections).

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "pinecone_index Resource - terraform-provider-pinecone"
subcategory: ""
description: |-
Index resource
The pinecone_index resource lets you create and manage indexes in Pinecone. Learn more about indexes in the docs https://docs.pinecone.io/guides/indexes/understanding-indexes.
---

# pinecone_index (Resource)

Index resource
The `pinecone_index` resource lets you create and manage indexes in Pinecone. Learn more about indexes in the [docs](https://docs.pinecone.io/guides/indexes/understanding-indexes).

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion pinecone/provider/collection_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (r *CollectionResource) Metadata(ctx context.Context, req resource.Metadata

func (r *CollectionResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Collection resource",
MarkdownDescription: "The `pinecone_collection` resource lets you create and manage collections in Pinecone. Learn more about collections in the [docs](hhttps://docs.pinecone.io/guides/indexes/understanding-collections).",
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
MarkdownDescription: "Collection identifier",
Expand Down
2 changes: 1 addition & 1 deletion pinecone/provider/index_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (r *IndexResource) Metadata(ctx context.Context, req resource.MetadataReque
func (r *IndexResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
// This description is used by the documentation generator and the language server.
MarkdownDescription: "Index resource",
MarkdownDescription: "The `pinecone_index` resource lets you create and manage indexes in Pinecone. Learn more about indexes in the [docs](https://docs.pinecone.io/guides/indexes/understanding-indexes).",

Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Expand Down
5 changes: 5 additions & 0 deletions pinecone/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ type PineconeProviderModel struct {
}

func (p *PineconeProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {

resp.TypeName = "pinecone"
resp.Version = p.version
}

func (p *PineconeProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: `You can use the this Terraform provider to manage resources supported
by [Pinecone](https://www.pinecone.io/). The provider must be configured with the proper
credentials before use. You can provide credentials via the PINECONE_API_KEY environment variable.`,

Check failure on line 45 in pinecone/provider/provider.go

View workflow job for this annotation

GitHub Actions / build

File is not `gofmt`-ed with `-s` (gofmt)
Attributes: map[string]schema.Attribute{
"api_key": schema.StringAttribute{
MarkdownDescription: "Pinecone API Key. Can be configured by setting PINECONE_API_KEY environment variable.",
Expand Down

0 comments on commit f2b5cfc

Please sign in to comment.