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 6 JAWS-‐‑‒UG福岡:3度度⽬目の濃い⽬目にAWSの話をしてみよう
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 7 JAWS-‐‑‒UG福岡:3度度⽬目の濃い⽬目にAWSの話をしてみよう
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 28 JAWS-‐‑‒UG福岡:3度度⽬目の濃い⽬目にAWSの話をしてみよう