This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Issue #134 - FN::GetAtt can return an array #139
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4ae1383
Issue #134 - FN::GetAtt can return an array
9dfbfaa
Remove Redundant Tests
6005e55
Add NoSuchResourceTypeAttribute exception processing to fnGetAtt
f35687f
Merge branch 'master' into master
martysweet a27990e
Merge branch 'master' into master
martysweet 0147d82
Update CHANGELOG.md
martysweet 3ea9d84
Merge branch 'master' into master
martysweet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
testData/valid/yaml/issue-134-invalid-fngetatt-att-does-not-exist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
AWSTemplateFormatVersion: "2010-09-09" | ||
Description: "AWS CloudFormation Template to demonstrate Fn::GetAtt returning an array" | ||
Resources: | ||
DNSVPCDomain: | ||
Type: "AWS::Route53::HostedZone" | ||
Properties: | ||
Name: "staging.DOMAIN.COM" | ||
HostedZoneConfig: | ||
Comment: "ENVIRONMENT staging Public DNS" | ||
HostedZoneTags: | ||
- Key: Name | ||
Value: "ENVIRONMENT-staging-hosted-zone" | ||
DNSVPCDelegation: | ||
Type: "AWS::Route53::RecordSet" | ||
DependsOn: | ||
- DNSVPCDomain | ||
Properties: | ||
Name: "staging.DOMAIN.COM" | ||
Comment: "ENVIRONMENT staging Subdomain Delegation" | ||
HostedZoneId: "Z3**************" | ||
ResourceRecords: !GetAtt DNSVPCDomain.VeryLostNameServers | ||
TTL: 300 | ||
Type: NS |
25 changes: 25 additions & 0 deletions
25
testData/valid/yaml/issue-134-invalid-fngetatt-returns-array.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
AWSTemplateFormatVersion: "2010-09-09" | ||
Description: "AWS CloudFormation Template to demonstrate Fn::GetAtt returning an array" | ||
Resources: | ||
DNSVPCDomain: | ||
Type: "AWS::Route53::HostedZone" | ||
Properties: | ||
Name: "staging.DOMAIN.COM" | ||
HostedZoneConfig: | ||
Comment: "ENVIRONMENT staging Public DNS" | ||
HostedZoneTags: | ||
- Key: Name | ||
Value: "ENVIRONMENT-staging-hosted-zone" | ||
DNSVPCDelegation: | ||
Type: "AWS::Route53::RecordSet" | ||
DependsOn: | ||
- DNSVPCDomain | ||
Properties: | ||
Name: !GetAtt DNSVPCDomain.NameServers | ||
Comment: "ENVIRONMENT staging Subdomain Delegation" | ||
HostedZoneId: "Z3**************" | ||
ResourceRecords: | ||
- "ns1.domain.com" | ||
- "ns2.domain.com" | ||
TTL: 300 | ||
Type: NS |
23 changes: 23 additions & 0 deletions
23
testData/valid/yaml/issue-134-valid-fngetatt-returns-array.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
AWSTemplateFormatVersion: "2010-09-09" | ||
Description: "AWS CloudFormation Template to demonstrate Fn::GetAtt returning an array" | ||
Resources: | ||
DNSVPCDomain: | ||
Type: "AWS::Route53::HostedZone" | ||
Properties: | ||
Name: "staging.DOMAIN.COM" | ||
HostedZoneConfig: | ||
Comment: "ENVIRONMENT staging Public DNS" | ||
HostedZoneTags: | ||
- Key: Name | ||
Value: "ENVIRONMENT-staging-hosted-zone" | ||
DNSVPCDelegation: | ||
Type: "AWS::Route53::RecordSet" | ||
DependsOn: | ||
- DNSVPCDomain | ||
Properties: | ||
Name: "staging.DOMAIN.COM" | ||
Comment: "ENVIRONMENT staging Subdomain Delegation" | ||
HostedZoneId: "Z3**************" | ||
ResourceRecords: !GetAtt DNSVPCDomain.NameServers | ||
TTL: 300 | ||
Type: NS |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the
!!
intentional?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's my oldskool JS showing itself... 'double-not' coerces to boolean (i.e. true if not
falsy
). The intent here is to test for the existence of the property and make sure it has a value - I could have usedhasOwnProperty
(orinstanceof
) come to think of it, unless there is an idiomatic TypeScript way to do it...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!