Skip to content

Commit

Permalink
preparing v1.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Oct 5, 2024
1 parent 88e90c2 commit bed5e66
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.5.0 (Next)
### 1.5.0
- Do not coerce `number` type ID to `string` type ID (may cause superficial plan changes to existing states).
- Add `exp`, `mod`, `round`, and `sqrt` functions.

Expand Down
39 changes: 39 additions & 0 deletions docs/data-sources/exp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stdlib_exp Data Source - stdlib"
subcategory: ""
description: |-
Return the base-e exponential of an input parameter.
---

# stdlib_exp (Data Source)

Return the base-e exponential of an input parameter.

## Example Usage

```terraform
# Return the base e exponential of 0
data "stdlib_exp" "zero" {
param = 0
}
# => 1
# Return the base e exponential of 1.0986122
data "stdlib_exp" "decimal" {
param = 1.0986122
}
# => 2.9999997339956828
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `param` (Number) Input number parameter for determining the base-e exponential.

### Read-Only

- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the base-e exponential of the input parameter.
2 changes: 1 addition & 1 deletion docs/data-sources/flatten_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ data "stdlib_flatten_map" "foo" {

### Read-Only

- `id` (String) Aliased to string input parameter(s) for efficiency and proper plan diff detection.
- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Map of String) Function result storing the flattened map.
4 changes: 2 additions & 2 deletions docs/data-sources/has_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Return whether any or all of the input value parameters are present in the input

```terraform
# Check existence of either "foo" or "bar" values in map:
data "stdlib_has_keys" "foo_bar" {
data "stdlib_has_values" "foo_bar" {
map = {
"hello" = "world",
"foo" = "bar",
Expand All @@ -25,7 +25,7 @@ data "stdlib_has_keys" "foo_bar" {
# => true
# Check existence of either "foo" or "pizza" keys in map:
data "stdlib_has_keys" "foo_pizza" {
data "stdlib_has_values" "foo_pizza" {
map = {
"hello" = "world",
"foo" = "bar",
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/max_number.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ data "stdlib_max_number" "fibonacci" {

### Read-Only

- `id` (String) Aliased to string input parameter(s) for efficiency and proper plan diff detection.
- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the maximum number from the element(s) of the input list.
2 changes: 1 addition & 1 deletion docs/data-sources/min_number.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ data "stdlib_min_number" "fibonacci" {

### Read-Only

- `id` (String) Aliased to string input parameter(s) for efficiency and proper plan diff detection.
- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the minimum number from the element(s) of the input list.
49 changes: 49 additions & 0 deletions docs/data-sources/mod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stdlib_mod Data Source - stdlib"
subcategory: ""
description: |-
Return the remainder of the dividend divided by the divisor.
---

# stdlib_mod (Data Source)

Return the remainder of the dividend divided by the divisor.

## Example Usage

```terraform
# Return the remainder of 4 / 2
data "stdlib_mod" "zero" {
dividend = 4
divisor = 2
}
# => 0
# Return the remainder of 5 / 3
data "stdlib_mod" "integer" {
dividend = 5
divisor = 3
}
# => 2
# Return the remainder of 10 / 3.5
data "stdlib_mod" "decimal" {
dividend = 10
divisor = 4.75
}
# => 0.5
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `dividend` (Number) The dividend number from which to divide.
- `divisor` (Number) The divisor number by which to divide.

### Read-Only

- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the remainder of the dividend divided by the divisor.
45 changes: 45 additions & 0 deletions docs/data-sources/round.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stdlib_round Data Source - stdlib"
subcategory: ""
description: |-
Return the nearest integer of an input parameter; rounding half away from zero.
---

# stdlib_round (Data Source)

Return the nearest integer of an input parameter; rounding half away from zero.

## Example Usage

```terraform
# Return the square root of 4
data "stdlib_sqrt" "four" {
param = 4
}
# => 2
# Return the square root of 0
data "stdlib_sqrt" "zero" {
param = 0
}
# => 0
# Return the square root of 2
data "stdlib_sqrt" "two" {
param = 2
}
# => 1.4142135623730951
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `param` (Number) Input number parameter for determining the rounding.

### Read-Only

- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the rounding of the input parameter.
4 changes: 2 additions & 2 deletions docs/data-sources/sort_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "stdlib_sort_list Data Source - stdlib"
subcategory: ""
description: |-
Return the list where values are sorted in ascending order. Note that the Terraform 'types' has issues converting some numbers for comparisons such that e.g. 49 will be sorted before 5 due to 4 < 5, but 45 would be correctly sorted before 49.
Return the list where values are sorted in ascending order. Note that the Terraform 'types' package has issues converting some numbers for comparisons such that e.g. 49 will be sorted before 5 due to 4 < 5, but 45 would be correctly sorted before 49.
---

# stdlib_sort_list (Data Source)

Return the list where values are sorted in ascending order. Note that the Terraform 'types' has issues converting some numbers for comparisons such that e.g. 49 will be sorted before 5 due to 4 < 5, but 45 would be correctly sorted before 49.
Return the list where values are sorted in ascending order. Note that the Terraform 'types' package has issues converting some numbers for comparisons such that e.g. 49 will be sorted before 5 due to 4 < 5, but 45 would be correctly sorted before 49.

## Example Usage

Expand Down
45 changes: 45 additions & 0 deletions docs/data-sources/sqrt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stdlib_sqrt Data Source - stdlib"
subcategory: ""
description: |-
Return the square root of an input parameter;.
---

# stdlib_sqrt (Data Source)

Return the square root of an input parameter;.

## Example Usage

```terraform
# Return the rounding of of 1.2
data "stdlib_round" "down" {
param = 1.2
}
# => 1
# Return the rounding of 1.8
data "stdlib_round" "up" {
param = 1.8
}
# => 2
# Return the rounding of 1.5
data "stdlib_round" "half" {
param = 1.5
}
# => 2
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `param` (Number) Input number parameter for determining the square root.

### Read-Only

- `id` (Number) Aliased to number input parameter(s) for efficiency and proper plan diff detection.
- `result` (Number) Function result storing the square root of the input parameter.

0 comments on commit bed5e66

Please sign in to comment.