File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
from aws_cdk import App , Environment
3
- from aws_cdk .assertions import Template
4
- # from aws_cdk.assertions import Capture, Match
3
+ from aws_cdk .assertions import Template , Match
4
+ # from aws_cdk.assertions import Capture
5
5
6
6
from app .ec2_instance_stack import EC2InstanceStack
7
7
@@ -30,3 +30,20 @@ def test_vpc():
30
30
"Value" : "ec2-instance/VPC" }]
31
31
}
32
32
)
33
+
34
+
35
+ def test_ec2 ():
36
+ template .has_resource_properties (
37
+ "AWS::EC2::Instance" ,
38
+ {"InstanceType" : Match .string_like_regexp ("t2.small" )}
39
+ )
40
+
41
+ template .has_resource_properties (
42
+ "AWS::EC2::Instance" ,
43
+ {"AvailabilityZone" : Match .string_like_regexp ("dummy1a" )}
44
+ )
45
+
46
+ template .has_resource_properties (
47
+ "AWS::EC2::Instance" ,
48
+ {"ImageId" : Match .string_like_regexp ("ami-" )}
49
+ )
You can’t perform that action at this time.
0 commit comments