Skip to content

Commit

Permalink
!Join fails validation because of missing colon in regex. Fixes aws#25
Browse files Browse the repository at this point in the history
  • Loading branch information
sanathkr committed Aug 13, 2017
1 parent c55d5d6 commit e1042a6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
14 changes: 14 additions & 0 deletions test/templates/output_section.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Simple CRUD webservice. State is stored in a SimpleTable (DynamoDB) resource.
Resources:
MyApi:
Type: AWS::Serverless::Api
Properties:
DefinitionUri: s3://bucket/key
StageName: prod

Outputs:
ApiUrl:
Description: URL of API endpoint
Value: !Join ['', ['https://', !Ref "MyApi", '.execute-api.', !Ref 'AWS::Region', '.amazonaws.com/Prod']]
19 changes: 19 additions & 0 deletions validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,24 @@ var _ = Describe("sam", func() {

})


Context("with non-resource sections in CloudFormation template", func() {

inputs := []string{
"test/templates/output_section.yaml",
}

for _, filename := range inputs {
Context("including "+filename, func() {
template, _, err := goformation.Open(filename)
It("should successfully validate the SAM template", func() {
Expect(err).To(BeNil())
Expect(template).ShouldNot(BeNil())
})
})
}

})

})
})
2 changes: 1 addition & 1 deletion vendor/github.com/awslabs/goformation/unmarshal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e1042a6

Please sign in to comment.