Skip to content

Commit

Permalink
fix(intrinsics): change Fn::Sub to allow AWS pseudo parameters (awsla…
Browse files Browse the repository at this point in the history
…bs#275)

Adds `:` character to regex for variable match, allowing all AWS pseudo parameters to be replaced

fixes awslabs#274, awslabs#202
  • Loading branch information
shivas authored Apr 4, 2020
1 parent 6803338 commit 5a48c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion intrinsics/fnsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit 5a48c27

Please sign in to comment.