You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/terraform/introduction.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1716,59 +1716,59 @@ There are many categories of functions like Number functions, String functions,
1716
1716
1717
1717
Numeric functions are used to perform arithmetic operations like addition, subtraction, min, max, and rounding.
1718
1718
1719
-
- max(1, 2, 3): Returns the maximum value from the list of numbers. In this case, it will return 3.
1720
-
- min(1, 2, 3): Returns the minimum value from the list of numbers. In this case, it will return 1.
1721
-
- ceil(10.1): Returns the smallest integer value greater than or equal to the number. In this case, it will return 11.
1722
-
- floor(10.9): Returns the largest integer value less than or equal to the number. In this case, it will return 10.
1719
+
-`max(1, 2, 3): Returns the maximum value from the list of numbers. In this case, it will return 3.
1720
+
-`min(1, 2, 3)`: Returns the minimum value from the list of numbers. In this case, it will return 1.
1721
+
-`ceil(10.1)`: Returns the smallest integer value greater than or equal to the number. In this case, it will return 11.
1722
+
-`floor(10.9)`: Returns the largest integer value less than or equal to the number. In this case, it will return 10.
1723
1723
1724
1724
### String Functions
1725
1725
1726
1726
String functions are used to perform string manipulation operations like concatenation, substring, and formatting.
1727
1727
1728
-
- split(",", "ami-xyz, AMI-ABC, ami-pqr"): Splits the string into a list of substrings based on the delimiter. In this case, it will return ["ami-xyz", "AMI-ABC", "ami-pqr"].
1729
-
- lower("AMI-XYZ"): Converts the string to lowercase. In this case, it will return "ami-xyz".
1730
-
- upper("ami-xyz"): Converts the string to uppercase. In this case, it will return "AMI-XYZ".
1731
-
- title("ami-xyz"): Converts the string to title case. In this case, it will return "Ami-Xyz".
1732
-
- substr("ami-xyz", 0, 3): Returns a substring from the string. In this case, it will return "ami".
1733
-
- join(",", ["ami-xyz", "ami-abc", "ami-pqr"]): Joins the list of strings into a single string. In this case, it will return "ami-xyz,ami-abc,ami-pqr".
1728
+
-`split(",", "ami-xyz, AMI-ABC, ami-pqr")`: Splits the string into a list of substrings based on the delimiter. In this case, it will return ["ami-xyz", "AMI-ABC", "ami-pqr"].
1729
+
-`lower("AMI-XYZ")`: Converts the string to lowercase. In this case, it will return "ami-xyz".
1730
+
-`upper("ami-xyz")`: Converts the string to uppercase. In this case, it will return "AMI-XYZ".
1731
+
-`title("ami-xyz")`: Converts the string to title case. In this case, it will return "Ami-Xyz".
1732
+
-`substr("ami-xyz", 0, 3)`: Returns a substring from the string. In this case, it will return "ami".
1733
+
-`join(",", ["ami-xyz", "ami-abc", "ami-pqr"])`: Joins the list of strings into a single string. In this case, it will return "ami-xyz,ami-abc,ami-pqr".
1734
1734
1735
1735
### Collection Functions
1736
1736
1737
1737
Collection functions are used to perform operations on lists and maps like filtering, sorting, and merging.
1738
1738
1739
-
- length(["ami-xyz", "ami-abc", "ami-pqr"]): Returns the length of the list. In this case, it will return 3.
1740
-
- index(["ami-xyz", "ami-abc", "ami-pqr"], "ami-abc"): Returns the index of the element in the list. In this case, it will return 1.
1741
-
- element(["ami-xyz", "ami-abc", "ami-pqr"], 1): Returns the element at the index in the list. In this case, it will return "ami-abc".
1742
-
- contains(["ami-xyz", "ami-abc", "ami-pqr"], "ami-abc"): Returns true if the element is present in the list. In this case, it will return true.
1739
+
-`length(["ami-xyz", "ami-abc", "ami-pqr"])`: Returns the length of the list. In this case, it will return 3.
1740
+
-`index(["ami-xyz", "ami-abc", "ami-pqr"], "ami-abc")`: Returns the index of the element in the list. In this case, it will return 1.
1741
+
-`element(["ami-xyz", "ami-abc", "ami-pqr"], 1)`: Returns the element at the index in the list. In this case, it will return "ami-abc".
1742
+
-`contains(["ami-xyz", "ami-abc", "ami-pqr"], "ami-abc")`: Returns true if the element is present in the list. In this case, it will return true.
1743
1743
1744
1744
### Map Functions
1745
1745
1746
1746
Map functions are used to perform operations on maps like merging, filtering, and transforming.
1747
1747
1748
-
- keys({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}): Returns the keys of the map. In this case, it will return ["ami-xyz", "ami-abc"].
1749
-
- values({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}): Returns the values of the map. In this case, it will return ["ami-abc", "ami-pqr"].
1750
-
- lookup({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}, "ami-abc"): Returns the value of the key in the map. In this case, it will return "ami-pqr".
1751
-
- lookup({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}, "ami-xyz", "default"): Returns the value of the key in the map or the default value. In this case, it will return "ami-abc".
1748
+
-`keys({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"})`: Returns the keys of the map. In this case, it will return ["ami-xyz", "ami-abc"].
1749
+
-`values({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"})`: Returns the values of the map. In this case, it will return ["ami-abc", "ami-pqr"].
1750
+
-`lookup({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}, "ami-abc")`: Returns the value of the key in the map. In this case, it will return "ami-pqr".
1751
+
-`lookup({"ami-xyz": "ami-abc", "ami-abc": "ami-pqr"}, "ami-xyz", "default")`: Returns the value of the key in the map or the default value. In this case, it will return "ami-abc".
1752
1752
1753
1753
### Numeric Operators
1754
1754
1755
1755
Numeric operators are used to perform arithmetic operations like addition, subtraction, multiplication, and division.
1756
1756
1757
-
- 1 + 2: Addition
1758
-
- 5 - 3: Subtraction
1759
-
- 2 * 3: Multiplication
1760
-
- 6 / 2: Division
1757
+
-`1 + 2`: Addition
1758
+
-`5 - 3`: Subtraction
1759
+
-`2 * 3`: Multiplication
1760
+
-`6 / 2`: Division
1761
1761
1762
1762
### Equality Operators
1763
1763
1764
1764
Equality operators are used to compare values like equal, not equal, greater than, and less than.
0 commit comments