diff --git a/docs/index.md b/docs/index.md index bb9b4fa..488703a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,8 +16,7 @@ description: |- terraform { required_providers { wandb = { - source = "wandb/wandb" - version = "0.1.0" + source = "wandb/wandb" } } } diff --git a/docs/resources/run_queue.md b/docs/resources/run_queue.md index fa010fd..085161c 100644 --- a/docs/resources/run_queue.md +++ b/docs/resources/run_queue.md @@ -3,12 +3,12 @@ page_title: "wandb_run_queue Resource - wandb" subcategory: "" description: |- - RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch + RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch. See here https://github.com/wandb/terraform-provider-wandb/blob/main/examples/resources/run_queue/resource.tf for an example --- # wandb_run_queue (Resource) -RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch +RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch. See [here](https://github.com/wandb/terraform-provider-wandb/blob/main/examples/resources/run_queue/resource.tf) for an example diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 2e41927..dad3339 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -1,8 +1,7 @@ terraform { required_providers { wandb = { - source = "wandb/wandb" - version = "0.1.0" + source = "wandb/wandb" } } } diff --git a/internal/provider/run_queue_resource.go b/internal/provider/run_queue_resource.go index 3183ebc..a025a49 100644 --- a/internal/provider/run_queue_resource.go +++ b/internal/provider/run_queue_resource.go @@ -47,7 +47,7 @@ func (r *RunQueueResource) Metadata(ctx context.Context, req resource.MetadataRe func (r *RunQueueResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch", + MarkdownDescription: "RunQueue resource used with W&B Launch. See: https://docs.wandb.ai/guides/launch. See [here](https://github.com/wandb/terraform-provider-wandb/blob/main/examples/resources/run_queue/resource.tf) for an example", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ diff --git a/tools/tools.go b/tools/tools.go index 867d3a2..950ed45 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,11 +1,19 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -//go:build tools +//go:build generate package tools import ( - // Documentation generation + _ "github.com/hashicorp/copywrite" _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" ) + +// Format Terraform code for use in documentation. +// If you do not have Terraform installed, you can remove the formatting command, but it is suggested +// to ensure the documentation is formatted properly. +//go:generate terraform fmt -recursive ../examples/ + +// Generate documentation. +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-dir .. -provider-name wandb