its(:instance_id) { should eq 'i-ec12345a' } its(:instance_type) { should eq ’t2.small' } its(:public_ip_address) { should eq '123.0.456.789' } it { should have_security_group('my-sg-name') } it { should belong_to_vpc('my-vpc') } it { should belong_to_subnet('subnet-1234a567') } it { should have_eip('123.0.456.789') } it { should be_disabled_api_termination } end 12 JAWS Festa 2016
its(:resource_record_set_count) { should eq 5 } it { should have_record_set('example.com.').a('123.456.7.890') } it { should have_record_set('example.com.').mx('10 mail.example.com') } it { should have_record_set('mail.example.com.').a('123.456.7.890').ttl(3600) } ns = 'ns-123.awsdns-45.net. ns-6789.awsdns-01.org. ns-2345.awsdns-67.co.uk. ns-890.awsdns-12.com.' it { should have_record_set('example.com.').ns(ns) } it { should have_record_set('s3.example.com.').alias('s3-website-us- east-1.amazonaws.com.', 'Z2ABCDEFGHIJKL') } end 13 JAWS Festa 2016
JAWS Festa 2016 Network Interfaceリソースでもタグの保持をできるよ うにする修正 #191 PR by mdolian describe network_interface(’eni-12ab3cde') do it { should have_tag('Name').value('my-eni') } end
Security Groupの「このポートだけオープンしている こと」をテストするマッチャの追加 #121 PR by ceaess describe security_group('my-sg') do its(:outbound) do should be_opened_only(50_000) .protocol('tcp') .for(%w(100.456.789.012/32 200.567.890.123/32)) end end
EC2にイベント(再起動イベントなど)があるか確認 するマッチャの追加 #131 PR by k1LoW describe ec2('my-ec2') do it { should have_event('system-reboot') } end describe ec2(’other-ec2') do it { should_not have_events } end
ているかどうかを確認するマッチャの追加 #150 PR by matsuzj describe ec2('my-classic-ec2') do it { should have_classiclink_security_group('sg-2a3b4cd5') } it { should have_classiclink_security_group('my-vpc-security- group-name') } end
its(:resource) { should be_an_instance_of(Awspec::ResourceReader) } its('resource.route_tables.first.route_table_id') { should eq 'rtb-a12bcd34' } its('route_tables.first.route_table_id') { should eq 'rtb-a12bcd34' } end 82 JAWS Festa 2016