Skip to content

Commit eeeab84

Browse files
committed
terraform/language: Mention provider-defined functions
1 parent 96815ac commit eeeab84

File tree

5 files changed

+105
-10
lines changed

5 files changed

+105
-10
lines changed

content/terraform/v1.10.x/docs/language/functions/index.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ For more details on syntax, see
2222
[_Function Calls_](/terraform/language/expressions/function-calls)
2323
in the Expressions section.
2424

25-
The Terraform language does not support user-defined functions, and so only
26-
the functions built in to the language are available for use. The documentation includes a page for all of the available built-in functions.
25+
# Provider-defined Functions
26+
27+
The Terraform language does not support _user_-defined functions.
28+
However [providers can implement functions](/terraform/plugin/framework/functions)
29+
which users can use.
30+
31+
The language requires such functions to use a prefix `provider::<local-name>::`
32+
where `<local-name>` corresponds with an entry in `required_providers` block.
33+
34+
```hcl
35+
provider::terraform::encode_tfvars({
36+
example = "Hello!"
37+
})
38+
```
39+
40+
The documentation covers the built-in functions and built-in provider-defined functions only.
41+
42+
Functions defined by external providers are documented by those providers
43+
in the [Terraform Registry](https://registry.terraform.io/browse/providers).
44+
45+
# Experimenting with Functions
2746

2847
You can experiment with the behavior of Terraform's built-in functions from
2948
the Terraform expression console, by running

content/terraform/v1.11.x/docs/language/functions/index.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ For more details on syntax, see
2222
[_Function Calls_](/terraform/language/expressions/function-calls)
2323
in the Expressions section.
2424

25-
The Terraform language does not support user-defined functions, and so only
26-
the functions built in to the language are available for use. The documentation includes a page for all of the available built-in functions.
25+
# Provider-defined Functions
26+
27+
The Terraform language does not support _user_-defined functions.
28+
However [providers can implement functions](/terraform/plugin/framework/functions)
29+
which users can use.
30+
31+
The language requires such functions to use a prefix `provider::<local-name>::`
32+
where `<local-name>` corresponds with an entry in `required_providers` block.
33+
34+
```hcl
35+
provider::terraform::encode_tfvars({
36+
example = "Hello!"
37+
})
38+
```
39+
40+
The documentation covers the built-in functions and built-in provider-defined functions only.
41+
42+
Functions defined by external providers are documented by those providers
43+
in the [Terraform Registry](https://registry.terraform.io/browse/providers).
44+
45+
# Experimenting with Functions
2746

2847
You can experiment with the behavior of Terraform's built-in functions from
2948
the Terraform expression console, by running

content/terraform/v1.12.x/docs/language/functions/index.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ For more details on syntax, see
2222
[_Function Calls_](/terraform/language/expressions/function-calls)
2323
in the Expressions section.
2424

25-
The Terraform language does not support user-defined functions, and so only
26-
the functions built in to the language are available for use. The documentation includes a page for all of the available built-in functions.
25+
# Provider-defined Functions
26+
27+
The Terraform language does not support _user_-defined functions.
28+
However [providers can implement functions](/terraform/plugin/framework/functions)
29+
which users can use.
30+
31+
The language requires such functions to use a prefix `provider::<local-name>::`
32+
where `<local-name>` corresponds with an entry in `required_providers` block.
33+
34+
```hcl
35+
provider::terraform::encode_tfvars({
36+
example = "Hello!"
37+
})
38+
```
39+
40+
The documentation covers the built-in functions and built-in provider-defined functions only.
41+
42+
Functions defined by external providers are documented by those providers
43+
in the [Terraform Registry](https://registry.terraform.io/browse/providers).
44+
45+
# Experimenting with Functions
2746

2847
You can experiment with the behavior of Terraform's built-in functions from
2948
the Terraform expression console, by running

content/terraform/v1.8.x/docs/language/functions/index.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ For more details on syntax, see
2222
[_Function Calls_](/terraform/language/expressions/function-calls)
2323
in the Expressions section.
2424

25-
The Terraform language does not support user-defined functions, and so only
26-
the functions built in to the language are available for use. The documentation includes a page for all of the available built-in functions.
25+
# Provider-defined Functions
26+
27+
The Terraform language does not support _user_-defined functions.
28+
However [providers can implement functions](/terraform/plugin/framework/functions)
29+
which users can use.
30+
31+
The language requires such functions to use a prefix `provider::<local-name>::`
32+
where `<local-name>` corresponds with an entry in `required_providers` block.
33+
34+
```hcl
35+
provider::terraform::encode_tfvars({
36+
example = "Hello!"
37+
})
38+
```
39+
40+
The documentation covers the built-in functions and built-in provider-defined functions only.
41+
42+
Functions defined by external providers are documented by those providers
43+
in the [Terraform Registry](https://registry.terraform.io/browse/providers).
44+
45+
# Experimenting with Functions
2746

2847
You can experiment with the behavior of Terraform's built-in functions from
2948
the Terraform expression console, by running

content/terraform/v1.9.x/docs/language/functions/index.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ For more details on syntax, see
2222
[_Function Calls_](/terraform/language/expressions/function-calls)
2323
in the Expressions section.
2424

25-
The Terraform language does not support user-defined functions, and so only
26-
the functions built in to the language are available for use. The documentation includes a page for all of the available built-in functions.
25+
# Provider-defined Functions
26+
27+
The Terraform language does not support _user_-defined functions.
28+
However [providers can implement functions](/terraform/plugin/framework/functions)
29+
which users can use.
30+
31+
The language requires such functions to use a prefix `provider::<local-name>::`
32+
where `<local-name>` corresponds with an entry in `required_providers` block.
33+
34+
```hcl
35+
provider::terraform::encode_tfvars({
36+
example = "Hello!"
37+
})
38+
```
39+
40+
The documentation covers the built-in functions and built-in provider-defined functions only.
41+
42+
Functions defined by external providers are documented by those providers
43+
in the [Terraform Registry](https://registry.terraform.io/browse/providers).
44+
45+
# Experimenting with Functions
2746

2847
You can experiment with the behavior of Terraform's built-in functions from
2948
the Terraform expression console, by running

0 commit comments

Comments
 (0)