From 091adb2b71db8f4a027af9ede8a4aea676271fee Mon Sep 17 00:00:00 2001 From: Henrique Santos Date: Mon, 11 Sep 2023 16:26:48 +0100 Subject: [PATCH 1/2] Add template --- templates/index.md.tmpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 templates/index.md.tmpl diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl new file mode 100644 index 000000000..ef8ed9e9d --- /dev/null +++ b/templates/index.md.tmpl @@ -0,0 +1,13 @@ +# {{ .ProviderShortName | upper }} Provider + +The STACKIT provider is the official Terraform provider to integrate all the resources developed by STACKIT. + +## Example Usage + +{{ tffile "examples/provider/provider.tf" }} + +## Authentication + +Currently, only the *token flow* is supported. The Terraform provider will first try to find a token in the `STACKIT_SERVICE_ACCOUNT_TOKEN` env var. If not present, it will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified, or in `$HOME/.stackit/credentials.json` as a fallback. If the token is found, all the requests are authenticated using that token. + +{{ .SchemaMarkdown | trimspace }} From 571a9135faf25d2391c0ce54ebb42b00e71810af Mon Sep 17 00:00:00 2001 From: Henrique Santos Date: Mon, 11 Sep 2023 16:26:54 +0100 Subject: [PATCH 2/2] Generate docs --- docs/index.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/index.md b/docs/index.md index 064d82da6..7049b76f4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,20 +1,7 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "stackit Provider" -subcategory: "" -description: |- - ---- - -# stackit Provider +# STACKIT Provider The STACKIT provider is the official Terraform provider to integrate all the resources developed by STACKIT. -# Authentication - -Currently, only the *token flow* is supported. The Terraform provider will first try to find a token in the `STACKIT_SERVICE_ACCOUNT_TOKEN` env var. If not present, it will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified, or in `$HOME/.stackit/credentials.json` as a fallback. If the token is found, all the requests are authenticated using that token. - - ## Example Usage ```terraform @@ -23,6 +10,10 @@ provider "stackit" { } ``` +## Authentication + +Currently, only the *token flow* is supported. The Terraform provider will first try to find a token in the `STACKIT_SERVICE_ACCOUNT_TOKEN` env var. If not present, it will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified, or in `$HOME/.stackit/credentials.json` as a fallback. If the token is found, all the requests are authenticated using that token. + ## Schema