diff --git a/lang/functions.go b/lang/functions.go index 6964ad2ab291..1996d0d36e10 100644 --- a/lang/functions.go +++ b/lang/functions.go @@ -96,7 +96,6 @@ func (s *Scope) Functions() map[string]function.Function { "replace": funcs.ReplaceFunc, "reverse": funcs.ReverseFunc, "rsadecrypt": funcs.RsaDecryptFunc, - "setdifference": stdlib.SetSymmetricDifferenceFunc, "setintersection": stdlib.SetIntersectionFunc, "setproduct": funcs.SetProductFunc, "setsubtract": stdlib.SetSubtractFunc, diff --git a/lang/functions_test.go b/lang/functions_test.go index 9e317a05c467..ce5febafbc88 100644 --- a/lang/functions_test.go +++ b/lang/functions_test.go @@ -643,17 +643,6 @@ func TestFunctions(t *testing.T) { }, }, - "setdifference": { - { - `setdifference(["a", "b"], ["a", "c"], ["a", "d"])`, - cty.SetVal([]cty.Value{ - cty.StringVal("b"), - cty.StringVal("c"), - cty.StringVal("d"), - }), - }, - }, - "setintersection": { { `setintersection(["a", "b"], ["b", "c"], ["b", "d"])`, diff --git a/website/docs/configuration/functions/setdifference.html.md b/website/docs/configuration/functions/setdifference.html.md deleted file mode 100644 index 985ddd2c5f63..000000000000 --- a/website/docs/configuration/functions/setdifference.html.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: "functions" -page_title: "setdifference - Functions - Configuration Language" -sidebar_current: "docs-funcs-collection-setsubtract" -description: |- - The setdifference function returns a new set containing elements - that appear in any of the given sets but not multiple ---- - -# `setdifference` Function - --> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and -earlier, see -[0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). - -The `setdifference` function returns a new set containing elements that appear in any of the given sets but not multiple. In other words, it computes the -[symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) of the sets. - -```hcl -setdifference(a, b, c) -``` - -## Examples - -``` -> setdifference(["a", "b"], ["a", "c"], ["a", "d"]) -[ - "b", - "c", - "d", -] -``` - -## Related Functions - -* [`setintersection`](./setintersection.html) computes the _intersection_ of multiple sets -* [`setproduct`](./setproduct.html) computes the _Cartesian product_ of multiple - sets. -* [`setsubtract`](./setdifference.html) computes the _relative complement_ of two sets -* [`setunion`](./setunion.html) computes the _union_ of - multiple sets. diff --git a/website/layouts/functions.erb b/website/layouts/functions.erb index e1aa33ace331..c5378a7ff804 100644 --- a/website/layouts/functions.erb +++ b/website/layouts/functions.erb @@ -214,10 +214,6 @@ reverse -
  • - setdifference -
  • -
  • setintersection