diff options
author | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-08-09 15:59:15 +0200 |
---|---|---|
committer | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-08-09 16:39:21 +0200 |
commit | 863486a6b71ed0e562a3965bed56465d007b1418 (patch) | |
tree | e93f6a687695af86d54237ec9f575d4ef104222d /vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go | |
parent | 49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff) | |
download | terraform-provider-statuscake-add_contact_groups.tar.gz terraform-provider-statuscake-add_contact_groups.tar.zst terraform-provider-statuscake-add_contact_groups.zip |
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go b/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go index 7dfc905..016b102 100644 --- a/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go +++ b/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go | |||
@@ -237,6 +237,21 @@ var DirnameFunc = function.New(&function.Spec{ | |||
237 | }, | 237 | }, |
238 | }) | 238 | }) |
239 | 239 | ||
240 | // AbsPathFunc constructs a function that converts a filesystem path to an absolute path | ||
241 | var AbsPathFunc = function.New(&function.Spec{ | ||
242 | Params: []function.Parameter{ | ||
243 | { | ||
244 | Name: "path", | ||
245 | Type: cty.String, | ||
246 | }, | ||
247 | }, | ||
248 | Type: function.StaticReturnType(cty.String), | ||
249 | Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { | ||
250 | absPath, err := filepath.Abs(args[0].AsString()) | ||
251 | return cty.StringVal(filepath.ToSlash(absPath)), err | ||
252 | }, | ||
253 | }) | ||
254 | |||
240 | // PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory. | 255 | // PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory. |
241 | var PathExpandFunc = function.New(&function.Spec{ | 256 | var PathExpandFunc = function.New(&function.Spec{ |
242 | Params: []function.Parameter{ | 257 | Params: []function.Parameter{ |