Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/ebs/ebs.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"Value": {
"Ref": "AWS::Region"
}
},
{
"Key": "yor_trace",
"Value": "5a5d5a3d-70ed-4771-a32f-e7f4cfaf5ba1"
}
],
"AvailabilityZone": "us-west-2a"
Expand Down
2 changes: 2 additions & 0 deletions tests/cloudformation/resources/ebs/ebs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Resources:
Value: TagValue
- Key: Name
Value: !Ref EnvironmentName
- Key: yor_trace
Value: 94c2c7b0-a31c-413d-8772-57b18f59bd1b
AvailabilityZone: us-west-2a
DeletionPolicy: Snapshot

Expand Down
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/ebs/ebs_tagged.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "47604885-8695-41e9-9985-82a9380a5647"
}
],
"AvailabilityZone": "us-west-2a"
Expand Down
2 changes: 2 additions & 0 deletions tests/cloudformation/resources/ebs/ebs_tagged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Resources:
Value: !Ref EnvironmentName
- Key: new_tag
Value: new_value
- Key: yor_trace
Value: 821bf6c4-07f9-410f-b114-d9415573e2ec
AvailabilityZone: us-west-2a
DeletionPolicy: Snapshot

Expand Down
12 changes: 12 additions & 0 deletions tests/cloudformation/resources/ec2_untagged/ec2_untagged.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@
"EC2InstanceResource0": {
"Type": "AWS::EC2::Instance",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "59582b3f-710d-4667-98ea-3d50afe1e896"
}
],
"ImageId": "ami-04169656fea786776"
}
},
"EC2InstanceResource1": {
"Type": "AWS::EC2::Instance",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "01697564-736e-4451-b887-b06b5b8c6925"
}
],
"ImageId": "ami-04169656fea786776",
"NetworkInterfaces": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Resources:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-04169656fea786776

Tags:
- Key: yor_trace
Value: 6f6a600b-c22a-447e-931a-0e1527154f60
EC2InstanceResource1:
Type: AWS::EC2::Instance
Properties:
Expand All @@ -15,6 +17,9 @@ Resources:
GroupSet:
- "myVPCEC2SecurityGroup"
SubnetId: "PublicSubnet"
Tags:
- Key: yor_trace
Value: 3f393509-7141-493e-a521-246abb9d82b0
# Some unindented comment
EC2LaunchTemplateResource0:
Type: AWS::EC2::LaunchTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "f737343e-a1bb-4fa6-8753-98d2468fa8d2"
}
],
"ImageId": "ami-04169656fea786776"
Expand All @@ -20,6 +24,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "973493ed-c66e-4bae-bd78-d3193440b579"
}
],
"ImageId": "ami-04169656fea786776",
Expand Down
2 changes: 2 additions & 0 deletions tests/cloudformation/resources/extensions/ebs.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ Resources:
Tags:
- Key: MyTag
Value: TagValue
- Key: yor_trace
Value: 3e607267-06e6-4811-9426-268aebf42976
DeletionPolicy: Snapshot
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/extensions/ebs2.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
{
"Key": "MyTag",
"Value": "TagValue"
},
{
"Key": "yor_trace",
"Value": "2dd4b5fc-2e75-4863-b6e3-a1f8492a6e52"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion tests/cloudformation/resources/issue114/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ Resources:
Tags:
- Key: Name
Value: !Ref EnvironmentName
- Key: yor_trace
Value: 00df030f-801c-4bf1-8d84-125cbf108a90
InternetGateway:
Type: AWS::EC2::InternetGateway
Properties:
Tags:
- Key: Name
Value: !Ref EnvironmentName
Value: !Ref EnvironmentName
- Key: yor_trace
Value: 3c4f22c7-83be-4bc1-964f-b9d99f04212c
6 changes: 5 additions & 1 deletion tests/cloudformation/resources/issue114/template_tagged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ Resources:
Value: !Ref EnvironmentName
- Key: new_tag
Value: new_value
- Key: yor_trace
Value: 9bdd3ec5-335e-4a09-98f8-b4770da7d339
InternetGateway:
Type: AWS::EC2::InternetGateway
Properties:
Tags:
- Key: Name
Value: !Ref EnvironmentName
- Key: new_tag
Value: new_value
Value: new_value
- Key: yor_trace
Value: ab3c400b-3e4e-4082-99de-413665e8ac57
18 changes: 18 additions & 0 deletions tests/cloudformation/resources/json/SingleENIwithMultipleEIPs.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@
"EIP1": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "b158b763-d5e8-43c5-8e19-7466ebb92c35"
}
],
"Domain": "VPC"
}
},
"EIP2": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "1671c9f6-a550-421a-9911-235a7cd07480"
}
],
"Domain": "VPC"
}
},
Expand Down Expand Up @@ -45,6 +57,12 @@
{
"Type" : "AWS::EC2::NetworkInterface",
"Properties" : {
"Tags": [
{
"Key": "yor_trace",
"Value": "81928d4b-6096-41d8-915e-86d01e1197f1"
}
],
"SecondaryPrivateIpAddressCount" : 2,
"SourceDestCheck" : true,
"SubnetId" : { "Fn::Select" : [ "0", {"Ref" : "Subnet"} ] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "132afdd6-e1dd-4565-9aef-fe6cf63cd1a8"
}
],
"Domain": "VPC"
Expand All @@ -28,6 +32,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "bb39e03f-1e1a-46dd-b406-0d5b12c054bd"
}
],
"Domain": "VPC"
Expand Down Expand Up @@ -61,6 +69,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "5edddaa9-0952-4591-bc0b-88150a57a181"
}
],
"SecondaryPrivateIpAddressCount" : 2,
Expand Down
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/json/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{
"Key": "old_tag",
"Value": "old_value"
},
{
"Key": "yor_trace",
"Value": "c67fcc99-b6c7-43e5-8613-675b9716d94d"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/json/base_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
{
"Key": "another_tag",
"Value": "another_val"
},
{
"Key": "yor_trace",
"Value": "4cc1ad76-71a3-44c1-b898-ee15bf8fe71f"
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions tests/cloudformation/resources/no_tags/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"S3Bucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "09348f8d-34ba-4392-a459-d38245588f4c"
}
],
"AccessControl": "PublicRead",
"WebsiteConfiguration": {
"IndexDocument": "index.html",
Expand Down
3 changes: 3 additions & 0 deletions tests/cloudformation/resources/no_tags/base.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ Resources:
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: error.html
Tags:
- Key: yor_trace
Value: e892cc08-054f-4960-9f9b-7ada7495af5d
DeletionPolicy: Retain
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/no_tags/base_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
{
"Key": "another_tag",
"Value": "another_val"
},
{
"Key": "yor_trace",
"Value": "95e4b8c0-ba12-4bb4-a288-2220176ddabf"
}
],
"AccessControl": "PublicRead",
Expand Down
14 changes: 14 additions & 0 deletions tests/cloudformation/resources/onlyType/ecs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@
"NewVolume": {
"Type": "AWS::EC2::Volume",
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "98b49581-d8b4-4751-8cef-e35650f2e871"
}
],
"Encrypted": true,
"AvailabilityZone": "us-west-2a"
}
},
"ECSCluster": {
"Properties": {
"Tags": [
{
"Key": "yor_trace",
"Value": "77aa9d2e-9de4-419e-99f3-0591d9c87088"
}
]
},
"Type": "AWS::ECS::Cluster"
}
}
Expand Down
8 changes: 8 additions & 0 deletions tests/cloudformation/resources/onlyType/ecs_tagged.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "40d96e9e-16a6-420c-b3e0-86ab74facd2e"
}
],
"Encrypted": true,
Expand All @@ -21,6 +25,10 @@
{
"Key": "new_tag",
"Value": "new_value"
},
{
"Key": "yor_trace",
"Value": "37f54ce6-29ab-42b7-9224-d1c028a5a769"
}
]
},
Expand Down
11 changes: 10 additions & 1 deletion tests/cloudformation/resources/parsing_spacial_cases/cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,26 @@ Resources:
Environment:
Variables:
BROKEN_FIND_IN_MAP: !FindInMap [ Mappings, MyMap, Key ]
Tags:
- Key: yor_trace
Value: db768199-93f6-4980-8f3c-2c067166ea0b
ExampleInt:
Type: AWS::Lambda::Function
Properties:
Description: An example template
Environment:
Variables:
BROKEN_INT: 10
Tags:
- Key: yor_trace
Value: 289c9956-7519-4182-a4bd-3b9e417de7ec
ExampleJoin:
Type: AWS::Lambda::Function
Properties:
Description: An example template
Environment:
Variables:
BROKEN_JOIN: !Join [ '-', [ 'a', 'b', 'c' ] ]
BROKEN_JOIN: !Join [ '-', [ 'a', 'b', 'c' ] ]
Tags:
- Key: yor_trace
Value: 3389c236-2a3c-4ff1-90f3-43005457b14d
6 changes: 5 additions & 1 deletion tests/cloudformation/resources/single_line/cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
},
"Tags": [
{ "Key": "old_tag1", "Value": "old_val1" },
{ "Key": "old_tag2", "Value": "old_val2" }
{ "Key": "old_tag2", "Value": "old_val2" },
{
"Key": "yor_trace",
"Value": "0238c321-ed7c-43e4-8e90-873dac3eaa96"
}
]
}
}
Expand Down
4 changes: 4 additions & 0 deletions tests/cloudformation/resources/single_line/cfn_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
{
"Key": "another_tag",
"Value": "another_val"
},
{
"Key": "yor_trace",
"Value": "e31ff48d-8c23-462a-893a-fd26a78d55df"
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions tests/cloudformation/resources/special_tags/cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ Resources:
Tags:
- Key: "isSpecial"
Value: "true"
- Key: yor_trace
Value: 6dc518a5-79b3-41c8-b879-7b33e6163e26
ResourceType: AWS::ElasticLoadBalancingV2::LoadBalancer
Loading