Skip to content

Commit

Permalink
fix(intrinsics): change Fn::Sub to allow AWS pseudo parameters
Browse files Browse the repository at this point in the history
Adds `:` character to regex for variable match, allowing all AWS pseudo parameters to be replaced

fixes awslabs#274, awslabs#202
  • Loading branch information
shivas committed Mar 20, 2020
1 parent 6803338 commit cdb2c19
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 cdb2c19

Please sign in to comment.