Skip to content

Commit a71f6cb

Browse files
committed
preparing v2.0.3 release
1 parent 84f44a1 commit a71f6cb

File tree

9 files changed

+57
-12
lines changed

9 files changed

+57
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
### 2.0.3 (Next)
1+
### 2.0.3
22
- Implement `multiple` type custom functions.
3+
- Improve previously implemented custom and data functions.
34

45
### 2.0.2
56
- Implement `map` type custom functions.

docs/functions/cut.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Returns the strings before and after the first instance of the separator in the
1515
```terraform
1616
# Return the separated strings:
1717
provider::stdlib::cut("foobarbaz", "bar")
18-
# result => ("foo", "bar", true)
18+
# result => ("foo", "baz", true)
1919
2020
# Return the separated strings with absent separator:
2121
provider::stdlib::cut("foobarbaz", "pizza")

docs/functions/empty.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "empty function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine if input is empty
7+
---
8+
9+
# function: empty
10+
11+
Return whether the input parameter of one of four possible different types (String, Set, List, or Map) is empty or not.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Returns whether the string is empty.
17+
provider::stdlib::empty("")
18+
# result => true
19+
20+
# Returns whether the set is empty.
21+
provider::stdlib::empty(toset(["no"]))
22+
# result => false
23+
24+
# Returns whether the list is empty.
25+
provider::stdlib::empty([])
26+
# result => true
27+
28+
# Returns whether the map is empty.
29+
provider::stdlib::empty({ "foo" = "bar" })
30+
# result => false
31+
```
32+
33+
## Signature
34+
35+
<!-- signature generated by tfplugindocs -->
36+
```text
37+
empty(input dynamic) bool
38+
```
39+
40+
## Arguments
41+
42+
<!-- arguments generated by tfplugindocs -->
43+
1. `input` (Dynamic) Input parameter to check for emptiness.
44+

docs/functions/has_value.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Return whether the input value parameter is present in the input map parameter.
1414

1515
```terraform
1616
# Check existence of "foo" value in map:
17-
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "foo")
17+
provider::stdlib::has_value({"hello" = "world", "foo" = "bar"}, "foo")
1818
# result => false
1919
2020
# Check existence of "bar" value in map:
21-
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "bar")
21+
provider::stdlib::has_value({"hello" = "world", "foo" = "bar"}, "bar")
2222
# result => true
2323
```
2424

docs/functions/list_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# function: list_index
1010

11-
Return the index of the first occurrence of the element parameter in the list parameter, or return '-1' if the element parameter is not present in the input list parameter.
11+
Return the index of the first occurrence of the element parameter in the list parameter, or return `-1` if the element parameter is not present in the input list parameter.
1212

1313
## Example Usage
1414

docs/functions/product.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# function: product
1010

11-
Input set parameter for determining the product. The set must contain at least one element.
11+
Return the product of the elements within a set. This is similar to the core `sum` function, but for a mathematical product instead.
1212

1313
## Example Usage
1414

@@ -36,5 +36,5 @@ product(set set of number) number
3636
## Arguments
3737

3838
<!-- arguments generated by tfplugindocs -->
39-
1. `set` (Set of Number) Input list parameter for determining the maximum number.
39+
1. `set` (Set of Number) Input set parameter for determining the product. The set must contain at least one element.
4040

docs/functions/replace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# function: replace
1010

11-
Return the list where values are replaced at a specific element index. This function errors if the end_index, or the specified index plus the length of the replace_values list, is out of range for the original list (greater than or equal to the length of list_param).
11+
Return the list where values are replaced at a specific element index. This function errors if the `end_index`, or the specified index plus the length of the `replace_values` list, is out of range for the original list (greater than or equal to the length of the `list` parameter).
1212

1313
## Example Usage
1414

docs/functions/sqrt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Return the square root of an input parameter.
1414

1515
```terraform
1616
# Return the square root of 4:
17-
provider::stdlib::exp(4)
17+
provider::stdlib::sqrt(4)
1818
# result => 2
1919
2020
# Return the square root of 0:
21-
provider::stdlib::exp(0)
21+
provider::stdlib::sqrt(0)
2222
# result => 0
2323
2424
# Return the square root of 2:
25-
provider::stdlib::exp(2)
25+
provider::stdlib::sqrt(2)
2626
# result => 1.4142135623730951
2727
```
2828

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
func main() {
1616
// start provider server
17-
if err := providerserver.Serve(context.Background(), provider.New("2.0.2"), providerserver.ServeOpts{
17+
if err := providerserver.Serve(context.Background(), provider.New("2.0.3"), providerserver.ServeOpts{
1818
Address: "registry.terraform.io/mschuchard/stdlib",
1919
}); err != nil {
2020
log.Fatal(err)

0 commit comments

Comments
 (0)