Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Aug 22, 2023
1 parent 9754298 commit 428bd8f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 21 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# terraform-provider-stdlib

The Terraform Provider Plugin "stdlib" provides additional functions to enhance the capabilities of the Terraform DSL through HCL2. These additional functions will not overlap with the core functionality of Terraform. If that were ever to occur, then the corresponding function in this plugin will be gradually deprecated.

This README is purposefully short as all documentation is generated with `terraform-plugin-docs` and hosted at the [Terraform Registry](https://registry.terraform.io/providers/mschuchard/stdlib/latest/docs) as per usual.

This repository additionally does accept feature requests for e.g. additional functions or enhancements to current functions in the Github issue tracker.
2 changes: 0 additions & 2 deletions docs/data-sources/flatten_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ data "stdlib_flatten_map" "foo" {

- `id` (String) Aliased to string input parameter for efficiency.
- `result` (Map of String) Function result storing the flattened map.


2 changes: 0 additions & 2 deletions docs/data-sources/has_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ data "stdlib_has_key" "bar" {

- `id` (String) Aliased to string input parameter for efficiency.
- `result` (Boolean) Function result storing whether the key exists in the map.


2 changes: 0 additions & 2 deletions docs/data-sources/has_value.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ data "stdlib_has_value" "bar" {

- `id` (String) Aliased to string input parameter for efficiency.
- `result` (Boolean) Function result storing whether the key exists in the map.


2 changes: 0 additions & 2 deletions docs/data-sources/key_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ data "stdlib_key_delete" "foo" {

- `id` (String) Aliased to string input parameter for efficiency.
- `result` (Map of String) Function result storing the map with the key removed.


2 changes: 0 additions & 2 deletions docs/data-sources/last_char.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ data "stdlib_last_char" "hello" {

- `id` (String) Aliased to string input parameter for efficiency.
- `result` (String) Function result storing the last character of the input string.


16 changes: 11 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
page_title: "Provider: stdlib"
page_title: "stdlib Provider"
subcategory: ""
description: |-
The stdlib provider provides additional functions for use within Terraform's HCL2 configuration language.
---

# STDLIB Provider
# stdlib Provider

PLACEHOLDER
The stdlib provider provides additional functions for use within Terraform's HCL2 configuration language.

Use the navigation to the left to read about the available data sources which are each equivalent to functions.
The Terraform provider plugin "stdlib" provides additional functions for Terraform available as data sources. These data sources enable functionality not intrinsically available to Terraform, or streamlined within a single invocation. However, data sources are not as robustly invoked with inputs or returns as true intrinsic functions. Without true support for custom functions this becomes the next best available option.

Use the navigation to the left to read about the available data sources which are each equivalent to Terraform functions.

## Example Usage

Expand All @@ -22,5 +25,8 @@ terraform {
}
}
provider "stdlib" {}
provider "stdlib" {} # can be omitted
```

<!-- schema generated by tfplugindocs -->
## Schema
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
}
}

provider "stdlib" {}
provider "stdlib" {} # can be omitted
4 changes: 3 additions & 1 deletion stdlib/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ func (_ *stdlibProvider) Metadata(_ context.Context, _ provider.MetadataRequest,

// define the provider-level schema for configuration data
func (_ *stdlibProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{}
resp.Schema = schema.Schema{
Description: "The stdlib provider provides additional functions for use within Terraform's HCL2 configuration language.",
}
}

// prepare an API client for data sources and resources
Expand Down
15 changes: 11 additions & 4 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
---
page_title: "Provider: stdlib"
page_title: "{{.ProviderShortName}} Provider"
subcategory: ""
description: |-
The stdlib provider provides additional functions for use within Terraform's HCL2 configuration language.
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{ .ProviderShortName | upper }} Provider
# {{.ProviderShortName}} Provider

PLACEHOLDER
{{ .Description | trimspace }}

The Terraform provider plugin "stdlib" provides additional functions for Terraform available as data sources. These data sources enable functionality not intrinsically available to Terraform, or streamlined within a single invocation. However, data sources are not as robustly invoked with inputs or returns as true intrinsic functions. Without true support for custom functions this becomes the next best available option.

Use the navigation to the left to read about the available data sources which are each equivalent to Terraform functions.

{{ if .HasExample -}}
## Example Usage

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

{{ .SchemaMarkdown | trimspace }}

0 comments on commit 428bd8f

Please sign in to comment.