From 5a48c27630b945dcdc33133defd0241f898ccc52 Mon Sep 17 00:00:00 2001 From: Audrius Karabanovas Date: Sat, 4 Apr 2020 22:57:55 +0300 Subject: [PATCH] fix(intrinsics): change Fn::Sub to allow AWS pseudo parameters (#275) Adds `:` character to regex for variable match, allowing all AWS pseudo parameters to be replaced fixes #274, #202 --- intrinsics/fnsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intrinsics/fnsub.go b/intrinsics/fnsub.go index 8e46e8e48a..4a0f8caa0a 100644 --- a/intrinsics/fnsub.go +++ b/intrinsics/fnsub.go @@ -36,7 +36,7 @@ func FnSub(name string, input interface{}, template interface{}) interface{} { case string: // Look up references for each of the variables - regex := regexp.MustCompile(`\$\{([\.0-9A-Za-z]+)\}`) + regex := regexp.MustCompile(`\$\{([\.:0-9A-Za-z]+)\}`) variables := regex.FindAllStringSubmatch(val, -1) for _, variable := range variables {