mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 08:51:02 -06:00
config: allow '/' in string args
This commit is contained in:
parent
efaedbabb0
commit
4a3dff2441
@ -32,6 +32,7 @@ BUG FIXES:
|
||||
* core: Variables are validated to not contain interpolations. [GH-180]
|
||||
* core: Key files for provisioning can now contain `~` and will be expanded
|
||||
to the user's home directory. [GH-179]
|
||||
* core: The `file()` function can load files in sub-directories. [GH-213]
|
||||
* providers/aws: Fix issues around failing to read EIPs. [GH-122]
|
||||
* providers/aws: Autoscaling groups now register and export load
|
||||
balancers. [GH-207]
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
|
||||
// interpRegexp is a regexp that matches interpolations such as ${foo.bar}
|
||||
var interpRegexp *regexp.Regexp = regexp.MustCompile(
|
||||
`(?i)(\$+)\{([\s*-.,\(\)a-z0-9_"]+)\}`)
|
||||
`(?i)(\$+)\{([\s*-.,\\/\(\)a-z0-9_"]+)\}`)
|
||||
|
||||
// interpolationWalker implements interfaces for the reflectwalk package
|
||||
// (github.com/mitchellh/reflectwalk) that can be used to automatically
|
||||
|
@ -87,6 +87,22 @@ func TestInterpolationWalker_detect(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
Input: map[string]interface{}{
|
||||
"foo": `${file("foo/bar.txt")}`,
|
||||
},
|
||||
Result: []Interpolation{
|
||||
&FunctionInterpolation{
|
||||
Func: nil,
|
||||
Args: []Interpolation{
|
||||
&LiteralInterpolation{
|
||||
Literal: "foo/bar.txt",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for i, tc := range cases {
|
||||
|
Loading…
Reference in New Issue
Block a user