diff --git a/README.md b/README.md index bf436ed..fe4b67c 100644 --- a/README.md +++ b/README.md @@ -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)). diff --git a/docs/index.md b/docs/index.md index 41a536a..dc06cb2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 { diff --git a/docs/resources/instance.md b/docs/resources/instance.md index 926fe90..0ffe1d3 100644 --- a/docs/resources/instance.md +++ b/docs/resources/instance.md @@ -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. diff --git a/internal/provider/instance_resource.go b/internal/provider/instance_resource.go index 0e3b7fe..77c0cd9 100644 --- a/internal/provider/instance_resource.go +++ b/internal/provider/instance_resource.go @@ -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(), diff --git a/internal/provider/instance_types.go b/internal/provider/instance_types.go index 934d715..11cd5a0 100644 --- a/internal/provider/instance_types.go +++ b/internal/provider/instance_types.go @@ -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"` } diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl new file mode 100644 index 0000000..df0516a --- /dev/null +++ b/templates/index.md.tmpl @@ -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 }}