Skip to content

Commit b44cce8

Browse files
committed
preparing v2.0.2 release
1 parent e4043ee commit b44cce8

File tree

15 files changed

+387
-13
lines changed

15 files changed

+387
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 2.0.2
2+
- Implement `map` type custom functions.
3+
14
### 2.0.1
25
- Implement `slice` type custom functions.
36

docs/data-sources/has_keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ data "stdlib_has_keys" "three_keys_all" {
5858
### Required
5959

6060
- `keys` (List of String) Names of the keys to check for existence in the map.
61-
- `map` (Map of String) Input map parameter from which to check a key's existence.
61+
- `map` (Map of String) Input map parameter from which to check the keys' existence.
6262

6363
### Optional
6464

docs/data-sources/has_value.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "stdlib_has_value Data Source - stdlib"
44
subcategory: ""
55
description: |-
6-
Return whether the input key parameter is present in the input map parameter. The input map must be single-level.
6+
Return whether the input value parameter is present in the input map parameter. The input map must be single-level.
77
---
88

99
# stdlib_has_value (Data Source)
1010

11-
Return whether the input key parameter is present in the input map parameter. The input map must be single-level.
11+
Return whether the input value parameter is present in the input map parameter. The input map must be single-level.
1212

1313
## Example Usage
1414

docs/data-sources/has_values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ data "stdlib_has_values" "three_values_all" {
5757

5858
### Required
5959

60-
- `map` (Map of String) Input map parameter from which to check a value's existence.
60+
- `map` (Map of String) Input map parameter from which to check the values' existence.
6161
- `values` (List of String) Names of the values to check for existence in the map.
6262

6363
### Optional

docs/data-sources/keys_delete.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "stdlib_keys_delete Data Source - stdlib"
44
subcategory: ""
55
description: |-
6-
Return the input map parameter with the key parameter deleted from the map.
6+
Return the input map parameter with the keys parameter deleted from the map.
77
---
88

99
# stdlib_keys_delete (Data Source)
1010

11-
Return the input map parameter with the key parameter deleted from the map.
11+
Return the input map parameter with the keys parameter deleted from the map.
1212

1313
## Example Usage
1414

@@ -31,9 +31,9 @@ data "stdlib_keys_delete" "foo" {
3131
### Required
3232

3333
- `keys` (List of String) Names of the keys to delete from the map.
34-
- `map` (Map of String) Input map parameter from which to delete a key.
34+
- `map` (Map of String) Input map parameter from which to delete the keys.
3535

3636
### Read-Only
3737

3838
- `id` (String) Aliased to string input parameter(s) for efficiency and proper plan diff detection.
39-
- `result` (Map of String) Function result storing the map with the key removed.
39+
- `result` (Map of String) Function result storing the map with the keys removed.

docs/functions/equal_map.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: "equal_map function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Check equality of two maps
7+
---
8+
9+
# function: equal_map
10+
11+
Return whether the two input map parameters contain the same key-value pairs (equality check). The input maps must be single-level.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Reports whether the two maps contain the same key/value pairs:
17+
provider::stdlib::equal_map({ "hello" = "world" }, { "hello" = "world" })
18+
# result => true
19+
20+
# Reports whether the two maps contain the same key/value pairs:
21+
provider::stdlib::equal_map({ "hello" = "world" }, { "foo" = "bar" })
22+
# result => false
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
equal_map(map_one map of string, map_two map of string) bool
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `map_one` (Map of String) First input map parameter to check for equality with the second.
36+
1. `map_two` (Map of String) Second input map parameter to check for equality with the first.
37+

docs/functions/flatten_map.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "flatten_map function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Flatten a list of maps
7+
---
8+
9+
# function: flatten_map
10+
11+
Return the flattened map of an input list of maps. Note that if a key is repeated between distinct element maps, then the last entry will overwrite any previous entries in the result (maps cannot contain repeated keys).
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Flatten a list(map) into map:
17+
provider::stdlib::flatten_map([
18+
{ "hello" = "world" },
19+
{ "foo" = "bar" }
20+
])
21+
# result => {"hello" = "world", "foo = "bar}
22+
```
23+
24+
## Signature
25+
26+
<!-- signature generated by tfplugindocs -->
27+
```text
28+
flatten_map(list_of_maps list of map of string) map of string
29+
```
30+
31+
## Arguments
32+
33+
<!-- arguments generated by tfplugindocs -->
34+
1. `list_of_maps` (List of Map of String) Input list of maps to flatten.
35+

docs/functions/has_key.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: "has_key function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Check existence of key in map
7+
---
8+
9+
# function: has_key
10+
11+
Return whether the input key parameter is present in the input map parameter. The input map must be single-level.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Check existence of "foo" key in map:
17+
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "foo")
18+
# result => true
19+
20+
# Check existence of "bar" key in map:
21+
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "bar")
22+
# result => false
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
has_key(map map of string, key string) bool
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `map` (Map of String) Input map parameter from which to check a key's existence.
36+
1. `key` (String) Name of the key to check for existence in the map.
37+

docs/functions/has_keys.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "has_keys function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Check existence of keys in map
7+
---
8+
9+
# function: has_keys
10+
11+
Return whether any or all of the input key parameters are present in the input map parameter. The input map must be single-level.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Check existence of either "bar" or "foo" keys in map:
17+
provider::stdlib::has_keys(
18+
{
19+
"hello" = "world",
20+
"foo" = "bar",
21+
"baz" = "bat"
22+
},
23+
["bar", "foo"]
24+
)
25+
# result => true
26+
27+
# Check existence of either "bar" or "pizza" keys in map:
28+
provider::stdlib::has_keys(
29+
{
30+
"hello" = "world",
31+
"foo" = "bar",
32+
"baz" = "bat"
33+
},
34+
["bar", "pizza"]
35+
)
36+
# result => false
37+
38+
# Check existence of "bar" and "foo" keys in map:
39+
provider::stdlib::has_keys(
40+
{
41+
"hello" = "world",
42+
"foo" = "bar",
43+
"baz" = "bat"
44+
},
45+
["bar", "foo"],
46+
true
47+
)
48+
# result => false
49+
50+
# Check existence of "hello", "foo", and "baz" keys in map:
51+
provider::stdlib::has_keys(
52+
{
53+
"hello" = "world",
54+
"foo" = "bar",
55+
"baz" = "bat"
56+
},
57+
["hello", "foo", "baz"],
58+
true
59+
)
60+
# result => true
61+
```
62+
63+
## Signature
64+
65+
<!-- signature generated by tfplugindocs -->
66+
```text
67+
has_keys(map map of string, keys list of string, all bool...) bool
68+
```
69+
70+
## Arguments
71+
72+
<!-- arguments generated by tfplugindocs -->
73+
1. `map` (Map of String) Input map parameter from which to check the keys' existence.
74+
1. `keys` (List of String) Names of the keys to check for existence in the map.
75+
<!-- variadic argument generated by tfplugindocs -->
76+
1. `all` (Variadic, Boolean) Optional: Whether to check for all of the keys instead of the default any of the keys.

docs/functions/has_value.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: "has_value function - stdlib"
4+
subcategory: ""
5+
description: |-
6+
Check existence of value in map
7+
---
8+
9+
# function: has_value
10+
11+
Return whether the input value parameter is present in the input map parameter. The input map must be single-level.
12+
13+
## Example Usage
14+
15+
```terraform
16+
# Check existence of "foo" value in map:
17+
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "foo")
18+
# result => false
19+
20+
# Check existence of "bar" value in map:
21+
provider::stdlib::has_key({"hello" = "world", "foo" = "bar"}, "bar")
22+
# result => true
23+
```
24+
25+
## Signature
26+
27+
<!-- signature generated by tfplugindocs -->
28+
```text
29+
has_value(map map of string, value string) bool
30+
```
31+
32+
## Arguments
33+
34+
<!-- arguments generated by tfplugindocs -->
35+
1. `map` (Map of String) Input map parameter from which to check a value's existence.
36+
1. `value` (String) Name of the value to check for existence in the map.
37+

0 commit comments

Comments
 (0)