Skip to content

Commit

Permalink
Documentation Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
skirsten committed Aug 18, 2023
1 parent abf19b3 commit 8631aea
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Genesis Cloud provider is used to interact with resources supported by [Gene

- [Documentation](https://www.terraform.io/docs/providers/genesiscloud/index.html)
- [Genesis Cloud API Documentation](https://developers.genesiscloud.com/)
- [How to generate an API key?](https://support.genesiscloud.com/support/solutions/articles/47001126146-how-to-generate-an-api-token-)
- [How to generate an API token?](https://support.genesiscloud.com/support/solutions/articles/47001126146-how-to-generate-an-api-token-)
- [Terraform Website](https://www.terraform.io)

This repository is licensed under Mozilla Public License 2.0 (no copyleft exception) (see [LICENSE.txt](./LICENSE.txt)) and includes third-party code subject to third-party notices (see [THIRD-PARTY-NOTICES.txt](./THIRD-PARTY-NOTICES.txt)).
Expand Down
15 changes: 12 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "genesiscloud Provider"
page_title: "Provider: Genesis Cloud"
subcategory: ""
description: |-
The Genesis Cloud provider is used to interact with resources supported by Genesis Cloud https://www.genesiscloud.com/. The provider needs to be configured with the proper credentials before it can be used.
---

# genesiscloud Provider
# Genesis Cloud Provider

The Genesis Cloud provider is used to interact with resources supported by [Genesis Cloud](https://www.genesiscloud.com/). The provider needs to be configured with the proper credentials before it can be used.

- [API Documentation](https://developers.genesiscloud.com/)
- [How to generate an API token?](https://support.genesiscloud.com/support/solutions/articles/47001126146-how-to-generate-an-api-token-)

The [provider repository](https://github.com/genesiscloud/terraform-provider-genesiscloud) is licensed under Mozilla Public License 2.0 (no copyleft exception) (see [LICENSE.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/LICENSE.txt)) and includes third-party code subject to third-party notices (see [THIRD-PARTY-NOTICES.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/THIRD-PARTY-NOTICES.txt)).

## Example Usage

- Create a Genesis Cloud account
- Create a API token (see above)
- Set the `GENESISCLOUD_TOKEN` env var or specify the `token` in the provider
- Make sure to set the version in the provider

```terraform
terraform {
required_providers {
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "genesiscloud_instance" "example" {

Optional:

- `startup_script` (String) A plain text bash script or "cloud-config" file that will be executed after the first instance boot. It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the NVIDIA GPU driver. Learn more about [startup scripts and installing the GPU driver](https://support.com/support/solutions/articles/47001122478).
- `startup_script` (String) A plain text bash script or "cloud-config" file that will be executed after the first instance boot. It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the NVIDIA GPU driver. Learn more about [startup scripts and installing the GPU driver](https://support.genesiscloud.com/support/solutions/articles/47001122478).
- If the value of this attribute changes, Terraform will destroy and recreate the resource.


Expand Down
2 changes: 1 addition & 1 deletion internal/provider/instance_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (r *InstanceResource) Schema(ctx context.Context, req resource.SchemaReques
"startup_script": resourceenhancer.Attribute(ctx, schema.StringAttribute{
MarkdownDescription: "A plain text bash script or \"cloud-config\" file that will be executed after the first instance boot. " +
"It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the NVIDIA GPU driver. " +
"Learn more about [startup scripts and installing the GPU driver](https://support.com/support/solutions/articles/47001122478).",
"Learn more about [startup scripts and installing the GPU driver](https://support.genesiscloud.com/support/solutions/articles/47001122478).",
Optional: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/instance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type InstanceMetadataModel struct {
// StartupScript A plain text bash script or "cloud-config" file that will be executed after the first instance boot.
// It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the **NVIDIA GPU driver**.
// Learn more about [startup scripts and installing the GPU driver](https://support.com/support/solutions/articles/47001122478).
// Learn more about [startup scripts and installing the GPU driver](https://support.genesiscloud.com/support/solutions/articles/47001122478).
StartupScript types.String `tfsdk:"startup_script"`
}

Expand Down
26 changes: 26 additions & 0 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "Provider: Genesis Cloud"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# Genesis Cloud Provider

{{ .Description | trimspace }}

- [API Documentation](https://developers.genesiscloud.com/)
- [How to generate an API token?](https://support.genesiscloud.com/support/solutions/articles/47001126146-how-to-generate-an-api-token-)

The [provider repository](https://github.com/genesiscloud/terraform-provider-genesiscloud) is licensed under Mozilla Public License 2.0 (no copyleft exception) (see [LICENSE.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/LICENSE.txt)) and includes third-party code subject to third-party notices (see [THIRD-PARTY-NOTICES.txt](https://github.com/genesiscloud/terraform-provider-genesiscloud/blob/main/THIRD-PARTY-NOTICES.txt)).

## Example Usage

- Create a Genesis Cloud account
- Create a API token (see above)
- Set the `GENESISCLOUD_TOKEN` env var or specify the `token` in the provider
- Make sure to set the version in the provider

{{tffile "examples/provider/provider.tf"}}

{{ .SchemaMarkdown | trimspace }}

0 comments on commit 8631aea

Please sign in to comment.