Skip to content

Commit f7dbce3

Browse files
committed
preparing v2.0.0 release
1 parent 7ff557a commit f7dbce3

File tree

13 files changed

+245
-12
lines changed

13 files changed

+245
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### 2.0.0 (Next)
1+
### 2.0.0
22
- Implement `string` and `number` type custom functions.
33

44
### 1.6.0

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ This README is purposefully short as all documentation is generated with `terraf
66

77
This repository additionally does accept feature requests for e.g. additional functions or enhancements to current functions in the Github issue tracker.
88

9-
### Upcoming 2.0.0 Release Announcement
9+
If your version of Terraform is >= 1.8 then you can additionally invoke the provider custom functions instead of the data sources. Otherwise you must declare the data sources to utilize this plugin's functions.
10+
11+
### Upcoming 2.0 Release Announcement
1012
- All functions as of version 1.6.0 will be re-implemented as custom provider functions.
11-
- All new functions implemented after the release of version 2.0.0 will be custom provider functions only, and not data sources.
13+
- All new functions implemented after the release of version 1.6.0 will be custom provider functions only, and not data sources.
1214
- All data source functions that exist at the time of the release of version 1.6.0 will be maintained afterwards for any necessary bug fixes.
1315
- Please upgrade to Terraform version >= 1.8 by the release of version 2.1.0 to ensure support for any new functions supported by this provider.

docs/data-sources/sqrt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "stdlib_sqrt Data Source - stdlib"
44
subcategory: ""
55
description: |-
6-
Return the square root of an input parameter;.
6+
Return the square root of an input parameter.
77
---
88

99
# stdlib_sqrt (Data Source)
1010

11-
Return the square root of an input parameter;.
11+
Return the square root of an input parameter.
1212

1313
## Example Usage
1414

docs/functions/cut.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "cut function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Cut a string in two
7+
---
8+
9+
# function: cut
10+
11+
Returns the strings before and after the first instance of the separator in the input string. Also returns whether or not the separator was found in the input string. The return is a tuple: `before`, `after`, `found`. If the separator is not found in the input string, then `found` will be false, `before` will be equal to `param`, and `after` will be an empty string.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the separated strings:
17+
provider::stdlib::cut("foobarbaz", "bar")
18+
# result: ("foo", "bar", true)
19+
20+
# Return the separated strings with absent separator:
21+
provider::stdlib::cut("foobarbaz", "pizza")
22+
# result: ("foobarbaz", "", false)
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
cut(string string, separator string) dynamic
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `string` (String) Input string parameter for cutting around a separator.
36+
1. `separator` (String) The separator for cutting the input string.
37+

docs/functions/exp.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "exp function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine exponential of a number
7+
---
8+
9+
# function: exp
10+
11+
Return the base-e exponential of an input number parameter.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the base e exponential of 0:
17+
provider::stdlib::exp(0)
18+
# result: 1
19+
20+
# Return the base e exponential of 1.0986122:
21+
provider::stdlib::exp(1.0986122)
22+
# result: 2.9999997339956828
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
exp(number number) number
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `number` (Number) Input number parameter for determining the base-e exponential.
36+

docs/functions/last_char.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "last_char function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine last character(s) of a string
7+
---
8+
9+
# function: last_char
10+
11+
Return the last character(s) of an input string parameter. Only the terminating character is returned by default unless a value for `num_chars` is defined.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the last character of a string:
17+
provider::stdlib::last_char("hello")
18+
# result: "o"
19+
20+
# Return the last three characters of a string:
21+
provider::stdlib::last_char("hello", 3)
22+
# result: "llo"
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
last_char(string string, number_of_characters number...) string
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `string` (String) Input string parameter for determining the last character.
36+
<!-- variadic argument generated by tfplugindocs -->
37+
1. `number_of_characters` (Variadic, Number) Optional: The number of terminating characters at the end of the string to return (default: 1). This must be fewer than the number of characters in the input string.

docs/functions/mod.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mod function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine modulus of a number
7+
---
8+
9+
# function: mod
10+
11+
Return the remainder of the dividend number divided by the divisor number.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the remainder of 4 / 2:
17+
provider::stdlib::mod(4, 2)
18+
# result: 0
19+
20+
# Return the remainder of 5 / 3:
21+
provider::stdlib::mod(5, 3)
22+
# result: 2
23+
24+
# Return the remainder of 10 / 4.75:
25+
provider::stdlib::mod(10, 4.75)
26+
# result: 0.5
27+
```
28+
29+
## Signature
30+
31+
<!-- signature generated by tfplugindocs -->
32+
```text
33+
mod(dividend number, divisor number) number
34+
```
35+
36+
## Arguments
37+
38+
<!-- arguments generated by tfplugindocs -->
39+
1. `dividend` (Number) The dividend number from which to divide.
40+
1. `divisor` (Number) The divisor number by which to divide.
41+

docs/functions/round.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "round function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine rounding of a number
7+
---
8+
9+
# function: round
10+
11+
Return the nearest integer of an input parameter; rounding half away from zero.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the rounding of of 1.2:
17+
provider::stdlib::round(1.2)
18+
# result: 1
19+
20+
# Return the rounding of of 1.8:
21+
provider::stdlib::round(1.8)
22+
# result: 2
23+
24+
# Return the rounding of of 1.5:
25+
provider::stdlib::round(1.5)
26+
# result: 2
27+
```
28+
29+
## Signature
30+
31+
<!-- signature generated by tfplugindocs -->
32+
```text
33+
round(number number) number
34+
```
35+
36+
## Arguments
37+
38+
<!-- arguments generated by tfplugindocs -->
39+
1. `number` (Number) Input number parameter for determining the rounding.
40+

docs/functions/sqrt.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "sqrt function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Determine square root of a number
7+
---
8+
9+
# function: sqrt
10+
11+
Return the square root of an input parameter.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Return the square root of 4:
17+
provider::stdlib::exp(4)
18+
# result: 2
19+
20+
# Return the square root of 0:
21+
provider::stdlib::exp(0)
22+
# result: 0
23+
24+
# Return the square root of 2:
25+
provider::stdlib::exp(2)
26+
# result: 1.4142135623730951
27+
```
28+
29+
## Signature
30+
31+
<!-- signature generated by tfplugindocs -->
32+
```text
33+
sqrt(number number) number
34+
```
35+
36+
## Arguments
37+
38+
<!-- arguments generated by tfplugindocs -->
39+
1. `number` (Number) Input number parameter for determining the square root. This number cannot be negative, infinite (positive or negative), or NaN.
40+

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ description: |-
99

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

12-
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.
12+
The Terraform provider plugin "stdlib" provides additional functions for Terraform available as data sources and custom functions. These data sources and custom functions enable functionality either not intrinsically available to Terraform, or instead streamlined within a single invocation. However, data sources are not as robustly invoked with inputs or returns compared to true functions. Without the true support for custom functions in Terraform >= 1.8 then this becomes the next best available option. If you are using Terraform >= 1.8 then it is advised to use the custom functions instead of the data sources, but otherwise you will need to declare the data sources.
1313

14-
Use the navigation to the left to read about the available data sources which are each equivalent to Terraform functions.
14+
Use the navigation to the left to read about the available custom functions, and the alternative data sources which are each equivalent to Terraform functions.
1515

1616
## Example Usage
1717

@@ -20,7 +20,7 @@ terraform {
2020
required_providers {
2121
stdlib = {
2222
source = "mschuchard/stdlib"
23-
version = "~> 1.0"
23+
version = "~> 2.0"
2424
}
2525
}
2626
}

0 commit comments

Comments
 (0)