k1LoW / awspec

RSpec tests for your AWS resources.
MIT License
1.17k stars 192 forks source link

Add generator for autoscaling_group #425

Closed htnosm closed 5 years ago

htnosm commented 5 years ago

Add generator for autoscaling_group.

  awspec generate autoscaling_group [vpc_id]                             # Generate autoscaling_group spec from VPC ID (or VPC "Name" tag)
describe autoscaling_group('my-auto-scaling-group') do
  it { should exist }
  its(:auto_scaling_group_name) { should eq 'my-auto-scaling-group' }
  its(:auto_scaling_group_arn) { should eq 'arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:930d940e-891e-4781-a11a-7b0acd480f03:autoScalingGroupName/my-auto-scaling-group' }
  its(:min_size) { should eq 0 }
  its(:max_size) { should eq 1 }
  its(:desired_capacity) { should eq 1 }
  its(:default_cooldown) { should eq 300 }
  its(:availability_zones) { should eq ["us-west-2c"] }
  its(:health_check_type) { should eq 'EC2' }
  its(:health_check_grace_period) { should eq 300 }
  its(:vpc_zone_identifier) { should eq 'subnet-12345678' }
  its(:termination_policies) { should eq ["Default"] }
  its(:new_instances_protected_from_scale_in) { should eq false }
  it { should have_launch_configuration('my-launch-config') }
  it { should have_elb('my-load-balancer') }
end
inokappa commented 5 years ago

Released as v1.12.6.

k1LoW commented 5 years ago

Released as v1.14.0.