awspec 1.24.3 → 1.25.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +67 -0
- data/.github/workflows/doc.yml +29 -0
- data/.rubocop.yml +76 -27
- data/Gemfile +4 -0
- data/README.md +1 -3
- data/Rakefile +5 -4
- data/awspec.gemspec +5 -5
- data/bin/console +1 -0
- data/bin/toolbox +1 -0
- data/doc/_resource_types/cloudwatch_logs.md +9 -0
- data/doc/_resource_types/eks_nodegroup.md +53 -0
- data/doc/resource_types.md +76 -23
- data/exe/awspec +1 -0
- data/lib/awspec/cli.rb +2 -0
- data/lib/awspec/command/generate.rb +11 -9
- data/lib/awspec/config.rb +2 -0
- data/lib/awspec/error.rb +4 -0
- data/lib/awspec/ext/array.rb +5 -2
- data/lib/awspec/ext/hash.rb +5 -2
- data/lib/awspec/ext/string.rb +2 -0
- data/lib/awspec/ext/struct.rb +2 -0
- data/lib/awspec/ext.rb +2 -0
- data/lib/awspec/generator/doc/type/account.rb +4 -4
- data/lib/awspec/generator/doc/type/account_attribute.rb +4 -4
- data/lib/awspec/generator/doc/type/account_attribute_base.rb +3 -2
- data/lib/awspec/generator/doc/type/acm.rb +4 -2
- data/lib/awspec/generator/doc/type/alb.rb +5 -3
- data/lib/awspec/generator/doc/type/alb_listener.rb +3 -1
- data/lib/awspec/generator/doc/type/alb_target_group.rb +3 -1
- data/lib/awspec/generator/doc/type/ami.rb +4 -2
- data/lib/awspec/generator/doc/type/apigateway.rb +2 -0
- data/lib/awspec/generator/doc/type/autoscaling_group.rb +2 -0
- data/lib/awspec/generator/doc/type/base.rb +11 -8
- data/lib/awspec/generator/doc/type/batch_compute_environment.rb +6 -4
- data/lib/awspec/generator/doc/type/batch_job_definition.rb +2 -0
- data/lib/awspec/generator/doc/type/batch_job_queue.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudformation_stack.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudfront_distribution.rb +4 -2
- data/lib/awspec/generator/doc/type/cloudtrail.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudwatch_alarm.rb +3 -1
- data/lib/awspec/generator/doc/type/cloudwatch_event.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudwatch_logs.rb +2 -0
- data/lib/awspec/generator/doc/type/codebuild.rb +2 -0
- data/lib/awspec/generator/doc/type/codedeploy.rb +2 -0
- data/lib/awspec/generator/doc/type/codedeploy_deployment_group.rb +2 -0
- data/lib/awspec/generator/doc/type/cognito_identity_pool.rb +2 -0
- data/lib/awspec/generator/doc/type/cognito_user_pool.rb +2 -0
- data/lib/awspec/generator/doc/type/customer_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/directconnect_virtual_interface.rb +4 -2
- data/lib/awspec/generator/doc/type/dynamodb_table.rb +4 -2
- data/lib/awspec/generator/doc/type/ebs.rb +4 -2
- data/lib/awspec/generator/doc/type/ec2.rb +4 -2
- data/lib/awspec/generator/doc/type/ec2_account_attributes.rb +2 -0
- data/lib/awspec/generator/doc/type/ecr_repository.rb +2 -0
- data/lib/awspec/generator/doc/type/ecs_cluster.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_container_instance.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_service.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_task_definition.rb +4 -2
- data/lib/awspec/generator/doc/type/efs.rb +2 -0
- data/lib/awspec/generator/doc/type/eip.rb +2 -0
- data/lib/awspec/generator/doc/type/eks.rb +4 -2
- data/lib/awspec/generator/doc/type/eks_nodegroup.rb +4 -2
- data/lib/awspec/generator/doc/type/elasticache.rb +4 -2
- data/lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/elasticsearch.rb +2 -0
- data/lib/awspec/generator/doc/type/elastictranscoder_pipeline.rb +4 -2
- data/lib/awspec/generator/doc/type/elb.rb +5 -3
- data/lib/awspec/generator/doc/type/emr.rb +4 -2
- data/lib/awspec/generator/doc/type/firehose.rb +2 -0
- data/lib/awspec/generator/doc/type/iam_group.rb +3 -1
- data/lib/awspec/generator/doc/type/iam_policy.rb +2 -0
- data/lib/awspec/generator/doc/type/iam_role.rb +3 -1
- data/lib/awspec/generator/doc/type/iam_user.rb +3 -1
- data/lib/awspec/generator/doc/type/internet_gateway.rb +2 -0
- data/lib/awspec/generator/doc/type/kinesis.rb +2 -0
- data/lib/awspec/generator/doc/type/kms.rb +2 -0
- data/lib/awspec/generator/doc/type/lambda.rb +3 -1
- data/lib/awspec/generator/doc/type/lambda_account_settings.rb +2 -0
- data/lib/awspec/generator/doc/type/launch_configuration.rb +2 -0
- data/lib/awspec/generator/doc/type/launch_template.rb +2 -0
- data/lib/awspec/generator/doc/type/mq.rb +5 -3
- data/lib/awspec/generator/doc/type/msk.rb +2 -0
- data/lib/awspec/generator/doc/type/nat_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/network_acl.rb +4 -2
- data/lib/awspec/generator/doc/type/network_interface.rb +4 -2
- data/lib/awspec/generator/doc/type/nlb.rb +4 -2
- data/lib/awspec/generator/doc/type/nlb_listener.rb +3 -1
- data/lib/awspec/generator/doc/type/nlb_target_group.rb +3 -1
- data/lib/awspec/generator/doc/type/rds.rb +5 -3
- data/lib/awspec/generator/doc/type/rds_account_attributes.rb +2 -0
- data/lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/rds_db_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/redshift.rb +5 -3
- data/lib/awspec/generator/doc/type/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/route53_hosted_zone.rb +2 -0
- data/lib/awspec/generator/doc/type/route_table.rb +2 -0
- data/lib/awspec/generator/doc/type/s3_bucket.rb +3 -1
- data/lib/awspec/generator/doc/type/secretsmanager.rb +2 -0
- data/lib/awspec/generator/doc/type/security_group.rb +4 -2
- data/lib/awspec/generator/doc/type/ses_identity.rb +4 -2
- data/lib/awspec/generator/doc/type/ses_send_quota.rb +2 -0
- data/lib/awspec/generator/doc/type/sns_topic.rb +5 -3
- data/lib/awspec/generator/doc/type/sqs.rb +2 -0
- data/lib/awspec/generator/doc/type/ssm_parameter.rb +2 -0
- data/lib/awspec/generator/doc/type/subnet.rb +4 -2
- data/lib/awspec/generator/doc/type/transit_gateway.rb +2 -0
- data/lib/awspec/generator/doc/type/vpc.rb +4 -2
- data/lib/awspec/generator/doc/type/vpc_endpoints.rb +2 -0
- data/lib/awspec/generator/doc/type/vpn_connection.rb +4 -2
- data/lib/awspec/generator/doc/type/vpn_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/waf_web_acl.rb +3 -1
- data/lib/awspec/generator/doc/type/wafregional_web_acl.rb +3 -1
- data/lib/awspec/generator/doc/type.rb +5 -3
- data/lib/awspec/generator/spec/acm.rb +4 -2
- data/lib/awspec/generator/spec/alb.rb +6 -4
- data/lib/awspec/generator/spec/alb_listener.rb +6 -4
- data/lib/awspec/generator/spec/autoscaling_group.rb +6 -4
- data/lib/awspec/generator/spec/cloudwatch_alarm.rb +4 -2
- data/lib/awspec/generator/spec/cloudwatch_event.rb +4 -2
- data/lib/awspec/generator/spec/cloudwatch_logs.rb +9 -3
- data/lib/awspec/generator/spec/codebuild.rb +4 -2
- data/lib/awspec/generator/spec/directconnect.rb +4 -2
- data/lib/awspec/generator/spec/ebs.rb +5 -4
- data/lib/awspec/generator/spec/ec2.rb +5 -2
- data/lib/awspec/generator/spec/efs.rb +4 -2
- data/lib/awspec/generator/spec/eip.rb +4 -2
- data/lib/awspec/generator/spec/elasticache.rb +5 -2
- data/lib/awspec/generator/spec/elasticsearch.rb +4 -2
- data/lib/awspec/generator/spec/elb.rb +8 -6
- data/lib/awspec/generator/spec/iam_group.rb +4 -2
- data/lib/awspec/generator/spec/iam_policy.rb +3 -0
- data/lib/awspec/generator/spec/iam_role.rb +4 -2
- data/lib/awspec/generator/spec/iam_user.rb +4 -2
- data/lib/awspec/generator/spec/internet_gateway.rb +6 -4
- data/lib/awspec/generator/spec/kms.rb +4 -2
- data/lib/awspec/generator/spec/lambda.rb +4 -2
- data/lib/awspec/generator/spec/nat_gateway.rb +6 -4
- data/lib/awspec/generator/spec/network_acl.rb +15 -13
- data/lib/awspec/generator/spec/network_interface.rb +13 -10
- data/lib/awspec/generator/spec/nlb.rb +6 -4
- data/lib/awspec/generator/spec/nlb_listener.rb +6 -4
- data/lib/awspec/generator/spec/rds.rb +5 -2
- data/lib/awspec/generator/spec/rds_db_cluster_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/rds_db_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/redshift.rb +5 -2
- data/lib/awspec/generator/spec/redshift_cluster_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/route53_hosted_zone.rb +4 -2
- data/lib/awspec/generator/spec/route_table.rb +12 -14
- data/lib/awspec/generator/spec/s3_bucket.rb +9 -6
- data/lib/awspec/generator/spec/security_group.rb +9 -8
- data/lib/awspec/generator/spec/subnet.rb +6 -4
- data/lib/awspec/generator/spec/vpc.rb +5 -2
- data/lib/awspec/generator/template.rb +17 -15
- data/lib/awspec/generator.rb +4 -2
- data/lib/awspec/helper/client_wrap.rb +5 -1
- data/lib/awspec/helper/color.rb +2 -0
- data/lib/awspec/helper/finder/account_attributes.rb +8 -6
- data/lib/awspec/helper/finder/acm.rb +4 -0
- data/lib/awspec/helper/finder/alb.rb +7 -5
- data/lib/awspec/helper/finder/ami.rb +4 -0
- data/lib/awspec/helper/finder/apigateway.rb +2 -0
- data/lib/awspec/helper/finder/autoscaling.rb +3 -0
- data/lib/awspec/helper/finder/batch.rb +2 -0
- data/lib/awspec/helper/finder/cloudformation.rb +2 -0
- data/lib/awspec/helper/finder/cloudfront.rb +3 -0
- data/lib/awspec/helper/finder/cloudtrail.rb +2 -0
- data/lib/awspec/helper/finder/cloudwatch.rb +3 -0
- data/lib/awspec/helper/finder/cloudwatch_event.rb +2 -0
- data/lib/awspec/helper/finder/cloudwatch_logs.rb +10 -5
- data/lib/awspec/helper/finder/codebuild.rb +3 -0
- data/lib/awspec/helper/finder/codedeploy.rb +2 -0
- data/lib/awspec/helper/finder/cognito_identity_pool.rb +2 -0
- data/lib/awspec/helper/finder/cognito_user_pool.rb +2 -0
- data/lib/awspec/helper/finder/directconnect.rb +2 -0
- data/lib/awspec/helper/finder/dynamodb.rb +2 -0
- data/lib/awspec/helper/finder/ebs.rb +5 -0
- data/lib/awspec/helper/finder/ec2.rb +56 -26
- data/lib/awspec/helper/finder/ecr.rb +2 -0
- data/lib/awspec/helper/finder/ecs.rb +5 -2
- data/lib/awspec/helper/finder/efs.rb +5 -4
- data/lib/awspec/helper/finder/eks.rb +2 -0
- data/lib/awspec/helper/finder/elasticache.rb +3 -1
- data/lib/awspec/helper/finder/elasticsearch.rb +3 -1
- data/lib/awspec/helper/finder/elastictranscoder.rb +3 -0
- data/lib/awspec/helper/finder/elb.rb +6 -4
- data/lib/awspec/helper/finder/emr.rb +2 -0
- data/lib/awspec/helper/finder/firehose.rb +2 -0
- data/lib/awspec/helper/finder/iam.rb +16 -12
- data/lib/awspec/helper/finder/kinesis.rb +2 -0
- data/lib/awspec/helper/finder/kms.rb +3 -1
- data/lib/awspec/helper/finder/lambda.rb +3 -0
- data/lib/awspec/helper/finder/mq.rb +3 -1
- data/lib/awspec/helper/finder/msk.rb +2 -0
- data/lib/awspec/helper/finder/nlb.rb +11 -8
- data/lib/awspec/helper/finder/rds.rb +4 -1
- data/lib/awspec/helper/finder/redshift.rb +4 -1
- data/lib/awspec/helper/finder/route53.rb +4 -1
- data/lib/awspec/helper/finder/s3.rb +4 -2
- data/lib/awspec/helper/finder/secretsmanager.rb +2 -0
- data/lib/awspec/helper/finder/security_group.rb +2 -0
- data/lib/awspec/helper/finder/ses.rb +2 -0
- data/lib/awspec/helper/finder/sns_topic.rb +5 -3
- data/lib/awspec/helper/finder/sqs.rb +2 -0
- data/lib/awspec/helper/finder/ssm_parameter.rb +4 -1
- data/lib/awspec/helper/finder/subnet.rb +126 -20
- data/lib/awspec/helper/finder/vpc.rb +12 -6
- data/lib/awspec/helper/finder/vpc_endpoints.rb +2 -0
- data/lib/awspec/helper/finder/waf.rb +5 -0
- data/lib/awspec/helper/finder/wafregional.rb +5 -0
- data/lib/awspec/helper/finder.rb +3 -1
- data/lib/awspec/helper/states.rb +4 -2
- data/lib/awspec/helper/type.rb +8 -4
- data/lib/awspec/helper.rb +2 -0
- data/lib/awspec/matcher/be_allowed.rb +2 -0
- data/lib/awspec/matcher/be_allowed_action.rb +2 -0
- data/lib/awspec/matcher/be_attached_to.rb +3 -0
- data/lib/awspec/matcher/be_connected_to_vpc.rb +2 -0
- data/lib/awspec/matcher/be_denied.rb +2 -0
- data/lib/awspec/matcher/be_opened.rb +2 -0
- data/lib/awspec/matcher/be_opened_only.rb +2 -0
- data/lib/awspec/matcher/belong_to_alb.rb +4 -0
- data/lib/awspec/matcher/belong_to_cache_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_cluster_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_db_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_domain.rb +2 -0
- data/lib/awspec/matcher/belong_to_iam_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_metric.rb +2 -0
- data/lib/awspec/matcher/belong_to_nlb.rb +4 -0
- data/lib/awspec/matcher/belong_to_replication_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_subnet.rb +5 -0
- data/lib/awspec/matcher/belong_to_subnets.rb +16 -0
- data/lib/awspec/matcher/belong_to_vpc.rb +4 -0
- data/lib/awspec/matcher/have_attribute_definition.rb +2 -0
- data/lib/awspec/matcher/have_cluster_parameter_group.rb +2 -0
- data/lib/awspec/matcher/have_custom_response_error_code.rb +3 -2
- data/lib/awspec/matcher/have_db_parameter_group.rb +2 -0
- data/lib/awspec/matcher/have_env_var.rb +2 -0
- data/lib/awspec/matcher/have_env_var_value.rb +2 -0
- data/lib/awspec/matcher/have_env_vars.rb +2 -0
- data/lib/awspec/matcher/have_inline_policy.rb +2 -0
- data/lib/awspec/matcher/have_key_policy.rb +2 -0
- data/lib/awspec/matcher/have_key_schema.rb +2 -0
- data/lib/awspec/matcher/have_metric_filter.rb +11 -0
- data/lib/awspec/matcher/have_network_interface.rb +2 -0
- data/lib/awspec/matcher/have_option_group.rb +2 -0
- data/lib/awspec/matcher/have_origin.rb +3 -2
- data/lib/awspec/matcher/have_private_ip_address.rb +2 -0
- data/lib/awspec/matcher/have_record_set.rb +3 -1
- data/lib/awspec/matcher/have_route.rb +5 -3
- data/lib/awspec/matcher/have_rule.rb +3 -0
- data/lib/awspec/matcher/have_subscription_attributes.rb +3 -0
- data/lib/awspec/matcher/have_subscription_filter.rb +2 -0
- data/lib/awspec/matcher/have_tag.rb +2 -0
- data/lib/awspec/matcher/have_vpc_peering_connection.rb +2 -0
- data/lib/awspec/matcher/include_subscribed.rb +2 -0
- data/lib/awspec/matcher.rb +6 -0
- data/lib/awspec/resource_reader.rb +3 -0
- data/lib/awspec/setup.rb +7 -5
- data/lib/awspec/shared_context.rb +3 -0
- data/lib/awspec/stub/account.rb +2 -0
- data/lib/awspec/stub/acm.rb +2 -0
- data/lib/awspec/stub/alb.rb +3 -1
- data/lib/awspec/stub/alb_listener.rb +4 -3
- data/lib/awspec/stub/alb_target_group.rb +3 -1
- data/lib/awspec/stub/ami.rb +2 -0
- data/lib/awspec/stub/apigateway.rb +2 -0
- data/lib/awspec/stub/autoscaling_group.rb +6 -4
- data/lib/awspec/stub/batch_compute_environment.rb +2 -0
- data/lib/awspec/stub/batch_job_definition.rb +2 -0
- data/lib/awspec/stub/batch_job_queue.rb +2 -0
- data/lib/awspec/stub/cloudformation_stack.rb +4 -2
- data/lib/awspec/stub/cloudfront_distribution.rb +6 -4
- data/lib/awspec/stub/cloudtrail.rb +2 -0
- data/lib/awspec/stub/cloudwatch_logs.rb +4 -1
- data/lib/awspec/stub/codebuild.rb +5 -3
- data/lib/awspec/stub/codedeploy.rb +2 -0
- data/lib/awspec/stub/codedeploy_deployment_group.rb +2 -0
- data/lib/awspec/stub/cognito_identity_pool.rb +2 -0
- data/lib/awspec/stub/cognito_user_pool.rb +2 -0
- data/lib/awspec/stub/directconnect_virtual_interface.rb +2 -0
- data/lib/awspec/stub/duplicated_resource_type.rb +2 -0
- data/lib/awspec/stub/dynamodb_table.rb +2 -0
- data/lib/awspec/stub/ebs.rb +2 -0
- data/lib/awspec/stub/ec2.rb +2 -0
- data/lib/awspec/stub/ec2_has_multi_security_groups.rb +2 -0
- data/lib/awspec/stub/ec2_non_existing.rb +2 -0
- data/lib/awspec/stub/ecr_repository.rb +2 -0
- data/lib/awspec/stub/ecs.rb +13 -22
- data/lib/awspec/stub/ecs_cluster.rb +4 -4
- data/lib/awspec/stub/ecs_container_instance.rb +3 -2
- data/lib/awspec/stub/ecs_service.rb +4 -4
- data/lib/awspec/stub/ecs_task_definition.rb +9 -14
- data/lib/awspec/stub/efs.rb +2 -0
- data/lib/awspec/stub/eip.rb +2 -0
- data/lib/awspec/stub/eks.rb +5 -3
- data/lib/awspec/stub/eks_nodegroup.rb +63 -1
- data/lib/awspec/stub/elasticache.rb +2 -0
- data/lib/awspec/stub/elasticache_cache_parameter_group.rb +2 -0
- data/lib/awspec/stub/elasticsearch.rb +1 -0
- data/lib/awspec/stub/elastictranscoder_pipeline.rb +2 -0
- data/lib/awspec/stub/elb.rb +2 -0
- data/lib/awspec/stub/emr.rb +2 -0
- data/lib/awspec/stub/firehose.rb +2 -0
- data/lib/awspec/stub/iam_group.rb +3 -2
- data/lib/awspec/stub/iam_policy.rb +2 -0
- data/lib/awspec/stub/iam_role.rb +3 -2
- data/lib/awspec/stub/iam_user.rb +3 -2
- data/lib/awspec/stub/internet_gateway.rb +2 -0
- data/lib/awspec/stub/kinesis.rb +8 -6
- data/lib/awspec/stub/kms.rb +2 -0
- data/lib/awspec/stub/lambda.rb +2 -0
- data/lib/awspec/stub/launch_configuration.rb +2 -0
- data/lib/awspec/stub/launch_template.rb +2 -0
- data/lib/awspec/stub/mq.rb +5 -3
- data/lib/awspec/stub/msk.rb +5 -3
- data/lib/awspec/stub/nat_gateway.rb +2 -0
- data/lib/awspec/stub/network_acl.rb +2 -0
- data/lib/awspec/stub/network_interface.rb +2 -0
- data/lib/awspec/stub/nlb.rb +3 -1
- data/lib/awspec/stub/nlb_listener.rb +4 -3
- data/lib/awspec/stub/nlb_target_group.rb +3 -1
- data/lib/awspec/stub/rds.rb +2 -0
- data/lib/awspec/stub/rds_db_cluster_parameter_group.rb +2 -0
- data/lib/awspec/stub/rds_db_parameter_group.rb +10 -0
- data/lib/awspec/stub/redshift.rb +2 -0
- data/lib/awspec/stub/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/stub/route53_hosted_zone.rb +2 -0
- data/lib/awspec/stub/route_table.rb +2 -0
- data/lib/awspec/stub/s3_bucket.rb +2 -0
- data/lib/awspec/stub/secretsmanager.rb +2 -0
- data/lib/awspec/stub/security_group.rb +2 -0
- data/lib/awspec/stub/ses_identity.rb +2 -0
- data/lib/awspec/stub/sns_topic.rb +18 -9
- data/lib/awspec/stub/sns_topic_error.rb +17 -0
- data/lib/awspec/stub/sqs.rb +2 -0
- data/lib/awspec/stub/ssm_parameter.rb +2 -0
- data/lib/awspec/stub/subnet.rb +2 -0
- data/lib/awspec/stub/transit_gateway.rb +2 -0
- data/lib/awspec/stub/vpc.rb +2 -0
- data/lib/awspec/stub/vpc_endpoints.rb +2 -0
- data/lib/awspec/stub/waf_web_acl.rb +2 -0
- data/lib/awspec/stub/wafregional_web_acl.rb +2 -0
- data/lib/awspec/stub.rb +3 -1
- data/lib/awspec/toolbox.rb +2 -0
- data/lib/awspec/type/account.rb +4 -2
- data/lib/awspec/type/account_attribute.rb +5 -2
- data/lib/awspec/type/account_attribute_base.rb +2 -0
- data/lib/awspec/type/acm.rb +8 -6
- data/lib/awspec/type/alb.rb +8 -3
- data/lib/awspec/type/alb_listener.rb +4 -0
- data/lib/awspec/type/alb_target_group.rb +3 -0
- data/lib/awspec/type/ami.rb +5 -3
- data/lib/awspec/type/apigateway.rb +9 -3
- data/lib/awspec/type/autoscaling_group.rb +3 -0
- data/lib/awspec/type/base.rb +6 -3
- data/lib/awspec/type/batch_compute_environment.rb +6 -4
- data/lib/awspec/type/batch_job_definition.rb +2 -0
- data/lib/awspec/type/batch_job_queue.rb +4 -2
- data/lib/awspec/type/cloudformation_stack.rb +2 -0
- data/lib/awspec/type/cloudfront_distribution.rb +11 -5
- data/lib/awspec/type/cloudtrail.rb +2 -0
- data/lib/awspec/type/cloudwatch_alarm.rb +2 -0
- data/lib/awspec/type/cloudwatch_event.rb +2 -0
- data/lib/awspec/type/cloudwatch_logs.rb +10 -3
- data/lib/awspec/type/codebuild.rb +2 -0
- data/lib/awspec/type/codedeploy.rb +2 -0
- data/lib/awspec/type/codedeploy_deployment_group.rb +4 -0
- data/lib/awspec/type/cognito_identity_pool.rb +2 -0
- data/lib/awspec/type/cognito_user_pool.rb +2 -0
- data/lib/awspec/type/customer_gateway.rb +5 -3
- data/lib/awspec/type/directconnect_virtual_interface.rb +5 -3
- data/lib/awspec/type/dynamodb_table.rb +5 -3
- data/lib/awspec/type/ebs.rb +6 -3
- data/lib/awspec/type/ec2.rb +10 -0
- data/lib/awspec/type/ec2_account_attributes.rb +2 -0
- data/lib/awspec/type/ecr_repository.rb +2 -0
- data/lib/awspec/type/ecs_cluster.rb +5 -2
- data/lib/awspec/type/ecs_container_instance.rb +4 -2
- data/lib/awspec/type/ecs_service.rb +5 -2
- data/lib/awspec/type/ecs_task_definition.rb +4 -2
- data/lib/awspec/type/efs.rb +3 -0
- data/lib/awspec/type/eip.rb +3 -0
- data/lib/awspec/type/eks.rb +4 -2
- data/lib/awspec/type/eks_nodegroup.rb +109 -2
- data/lib/awspec/type/elasticache.rb +7 -3
- data/lib/awspec/type/elasticache_cache_parameter_group.rb +3 -0
- data/lib/awspec/type/elasticsearch.rb +2 -0
- data/lib/awspec/type/elastictranscoder_pipeline.rb +5 -3
- data/lib/awspec/type/elb.rb +11 -3
- data/lib/awspec/type/emr.rb +8 -6
- data/lib/awspec/type/firehose.rb +4 -2
- data/lib/awspec/type/iam_group.rb +4 -0
- data/lib/awspec/type/iam_policy.rb +5 -0
- data/lib/awspec/type/iam_role.rb +3 -0
- data/lib/awspec/type/iam_user.rb +3 -0
- data/lib/awspec/type/internet_gateway.rb +2 -0
- data/lib/awspec/type/kinesis.rb +3 -0
- data/lib/awspec/type/kms.rb +3 -0
- data/lib/awspec/type/lambda.rb +2 -0
- data/lib/awspec/type/lambda_account_settings.rb +2 -0
- data/lib/awspec/type/launch_configuration.rb +3 -0
- data/lib/awspec/type/launch_template.rb +3 -0
- data/lib/awspec/type/mq.rb +7 -3
- data/lib/awspec/type/msk.rb +5 -3
- data/lib/awspec/type/nat_gateway.rb +5 -3
- data/lib/awspec/type/network_acl.rb +9 -2
- data/lib/awspec/type/network_interface.rb +9 -3
- data/lib/awspec/type/nlb.rb +6 -3
- data/lib/awspec/type/nlb_listener.rb +4 -0
- data/lib/awspec/type/nlb_target_group.rb +3 -0
- data/lib/awspec/type/rds.rb +7 -3
- data/lib/awspec/type/rds_account_attributes.rb +2 -0
- data/lib/awspec/type/rds_db_cluster_parameter_group.rb +3 -0
- data/lib/awspec/type/rds_db_parameter_group.rb +58 -0
- data/lib/awspec/type/redshift.rb +7 -3
- data/lib/awspec/type/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/type/resource_base.rb +2 -0
- data/lib/awspec/type/route53_hosted_zone.rb +7 -2
- data/lib/awspec/type/route_table.rb +12 -0
- data/lib/awspec/type/s3_bucket.rb +7 -4
- data/lib/awspec/type/secretsmanager.rb +2 -0
- data/lib/awspec/type/security_group.rb +14 -2
- data/lib/awspec/type/ses_identity.rb +8 -6
- data/lib/awspec/type/ses_send_quota.rb +2 -0
- data/lib/awspec/type/sns_topic.rb +4 -0
- data/lib/awspec/type/sqs.rb +4 -0
- data/lib/awspec/type/ssm_parameter.rb +3 -0
- data/lib/awspec/type/subnet.rb +6 -3
- data/lib/awspec/type/transit_gateway.rb +2 -0
- data/lib/awspec/type/vpc.rb +7 -3
- data/lib/awspec/type/vpc_endpoints.rb +5 -3
- data/lib/awspec/type/vpn_connection.rb +5 -3
- data/lib/awspec/type/vpn_gateway.rb +5 -3
- data/lib/awspec/type/waf_web_acl.rb +3 -0
- data/lib/awspec/type/wafregional_web_acl.rb +3 -0
- data/lib/awspec/version.rb +3 -1
- data/lib/awspec.rb +2 -0
- metadata +31 -28
- data/.tachikoma.yml +0 -1
- data/.travis.yml +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02cc903214e73de4d0d6ed6bee30b9bf987e9f5ef11387b17686ecb92675aae8
|
4
|
+
data.tar.gz: e890b372efb87f544a31a91caa358a6a313293edebb7fb66a24dd29fa636b34e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db38f329352a2488a4fafc1c3f324f6653addb8e05585c90cf0644cacb64e75712cb14ac9095f7ca85c465606e9460f262e2438613ff844d99a5aaee79d3b3d8
|
7
|
+
data.tar.gz: 4655fa571461a651b73c6afd85aabff2c26ccdad639609b6f51a12df3fe09f8df3330d7b7909a67cfafc5c3dd8a89d85be118e17cf2c13ed4d575c95c54ba0de
|
@@ -0,0 +1,67 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
lint:
|
10
|
+
name: Lint
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 3.1
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: Run rubocop
|
24
|
+
uses: reviewdog/action-rubocop@v1
|
25
|
+
with:
|
26
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
27
|
+
reporter: github-pr-review
|
28
|
+
fail_on_error: true
|
29
|
+
|
30
|
+
test:
|
31
|
+
name: Test
|
32
|
+
needs: [ lint ]
|
33
|
+
strategy:
|
34
|
+
fail-fast: false
|
35
|
+
matrix:
|
36
|
+
ruby-version:
|
37
|
+
- '2.1'
|
38
|
+
- '2.2'
|
39
|
+
- '2.3'
|
40
|
+
- '2.4'
|
41
|
+
- '2.5'
|
42
|
+
- '2.6'
|
43
|
+
- '2.7'
|
44
|
+
- '3.0'
|
45
|
+
- '3.1'
|
46
|
+
runs-on: ubuntu-latest
|
47
|
+
env:
|
48
|
+
DISABLE_AWS_CLIENT_CHECK: true
|
49
|
+
|
50
|
+
steps:
|
51
|
+
- name: Checkout
|
52
|
+
uses: actions/checkout@v2
|
53
|
+
|
54
|
+
- name: Set up Ruby
|
55
|
+
uses: ruby/setup-ruby@v1
|
56
|
+
with:
|
57
|
+
ruby-version: ${{ matrix.ruby-version }}
|
58
|
+
bundler-cache: true
|
59
|
+
|
60
|
+
- name: Show Ruby version
|
61
|
+
run: ruby -v
|
62
|
+
|
63
|
+
- name: Generate document
|
64
|
+
run: bundle exec bin/toolbox docgen > doc/resource_types.md
|
65
|
+
|
66
|
+
- name: Run tests
|
67
|
+
run: bundle exec rake spec
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Doc
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: '0 0 * * 0'
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
doc:
|
9
|
+
name: Document
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
env:
|
12
|
+
DISABLE_AWS_CLIENT_CHECK: true
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: '2.7'
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: Generate document
|
24
|
+
run: bundle exec bin/toolbox docgen > doc/resource_types.md
|
25
|
+
|
26
|
+
- uses: EndBug/add-and-commit@v7
|
27
|
+
with:
|
28
|
+
default_author: github_actions
|
29
|
+
add: 'doc/resource_types.md'
|
data/.rubocop.yml
CHANGED
@@ -1,23 +1,53 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
2
|
+
SuggestExtensions: false
|
3
3
|
|
4
|
-
Layout/
|
4
|
+
Layout/ClosingHeredocIndentation:
|
5
5
|
Enabled: false
|
6
6
|
|
7
|
-
Layout/
|
7
|
+
Layout/HashAlignment:
|
8
8
|
Enabled: false
|
9
9
|
|
10
|
-
Layout/
|
10
|
+
Layout/HeredocIndentation:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Gemspec/RequiredRubyVersion:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Lint/DuplicateMethods:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/awspec/type/codedeploy_deployment_group.rb'
|
19
|
+
- 'lib/awspec/type/ecs_container_instance.rb'
|
20
|
+
- 'lib/awspec/type/ecs_service.rb'
|
21
|
+
- 'lib/awspec/type/eks_nodegroup.rb'
|
22
|
+
- 'lib/awspec/type/resource_base.rb'
|
23
|
+
|
24
|
+
Lint/ErbNewArguments:
|
11
25
|
Enabled: false
|
12
26
|
|
13
|
-
Lint/
|
27
|
+
Lint/MissingCopEnableDirective:
|
14
28
|
Enabled: false
|
15
29
|
|
30
|
+
Lint/MissingSuper:
|
31
|
+
Exclude:
|
32
|
+
- 'lib/awspec/generator/doc/type/account_attribute.rb'
|
33
|
+
- 'lib/awspec/generator/doc/type/account_attribute_base.rb'
|
34
|
+
- 'lib/awspec/type/account_attribute.rb'
|
35
|
+
- 'lib/awspec/type/resource_base.rb'
|
36
|
+
|
37
|
+
Lint/SuppressedException:
|
38
|
+
Exclude:
|
39
|
+
- 'Rakefile'
|
40
|
+
|
41
|
+
Lint/UnreachableLoop:
|
42
|
+
Exclude:
|
43
|
+
- 'lib/awspec/type/nat_gateway.rb'
|
44
|
+
- 'lib/awspec/type/route53_hosted_zone.rb'
|
45
|
+
|
16
46
|
Lint/UselessAssignment:
|
17
47
|
Enabled: false
|
18
48
|
|
19
49
|
Metrics/AbcSize:
|
20
|
-
Max:
|
50
|
+
Max: 60
|
21
51
|
|
22
52
|
Metrics/BlockLength:
|
23
53
|
Max: 60
|
@@ -26,48 +56,72 @@ Metrics/ClassLength:
|
|
26
56
|
Max: 130
|
27
57
|
|
28
58
|
Metrics/CyclomaticComplexity:
|
29
|
-
Max:
|
30
|
-
|
31
|
-
Metrics/LineLength:
|
32
|
-
Max: 120
|
59
|
+
Max: 30
|
33
60
|
|
34
61
|
Metrics/MethodLength:
|
35
62
|
Max: 30
|
36
63
|
|
37
64
|
Metrics/ModuleLength:
|
38
|
-
CountComments: false
|
39
65
|
Max: 200
|
40
66
|
|
67
|
+
Metrics/ParameterLists:
|
68
|
+
MaxOptionalParameters: 4
|
69
|
+
|
41
70
|
Metrics/PerceivedComplexity:
|
42
|
-
Max:
|
71
|
+
Max: 30
|
72
|
+
|
73
|
+
Naming/HeredocDelimiterNaming:
|
74
|
+
Enabled: false
|
75
|
+
|
76
|
+
Naming/MethodParameterName:
|
77
|
+
Exclude:
|
78
|
+
- 'lib/awspec/generator/spec/security_group.rb'
|
79
|
+
- 'lib/awspec/helper/client_wrap.rb'
|
80
|
+
- 'lib/awspec/type/network_acl.rb'
|
43
81
|
|
44
|
-
|
82
|
+
Naming/PredicateName:
|
45
83
|
Enabled: false
|
46
84
|
|
47
|
-
|
85
|
+
Naming/VariableNumber:
|
48
86
|
Enabled: false
|
49
87
|
|
50
88
|
Security/Eval:
|
89
|
+
Exclude:
|
90
|
+
- 'lib/awspec/command/generate.rb'
|
91
|
+
- 'lib/awspec/generator/doc/type.rb'
|
92
|
+
- 'lib/awspec/helper/type.rb'
|
93
|
+
- 'lib/awspec/type/account.rb'
|
94
|
+
- 'lib/awspec/type/account_attribute.rb'
|
95
|
+
- 'spec/generator/doc/type_spec.rb'
|
96
|
+
|
97
|
+
Style/CaseLikeIf:
|
51
98
|
Enabled: false
|
52
99
|
|
53
|
-
Style/
|
100
|
+
Style/ClassAndModuleChildren:
|
54
101
|
Enabled: false
|
55
102
|
|
56
|
-
Style/
|
103
|
+
Style/Documentation:
|
57
104
|
Enabled: false
|
58
105
|
|
59
|
-
Style/
|
106
|
+
Style/EvalWithLocation:
|
60
107
|
Enabled: false
|
61
108
|
|
62
|
-
Style/
|
109
|
+
Style/HashSyntax:
|
63
110
|
Enabled: false
|
64
111
|
|
65
|
-
Style/
|
112
|
+
Style/HashTransformKeys:
|
66
113
|
Enabled: false
|
67
114
|
|
68
|
-
Style/
|
115
|
+
Style/IfUnlessModifier:
|
69
116
|
Enabled: false
|
70
117
|
|
118
|
+
Style/MissingRespondToMissing:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
Style/MixinUsage:
|
122
|
+
Exclude:
|
123
|
+
- 'lib/awspec/helper.rb'
|
124
|
+
|
71
125
|
Style/MutableConstant:
|
72
126
|
Enabled: false
|
73
127
|
|
@@ -77,17 +131,12 @@ Style/NumericLiteralPrefix:
|
|
77
131
|
Style/NumericPredicate:
|
78
132
|
Enabled: false
|
79
133
|
|
80
|
-
Style/
|
134
|
+
Style/SafeNavigation:
|
81
135
|
Enabled: false
|
82
136
|
|
83
|
-
Style/
|
84
|
-
Enabled: false
|
85
|
-
|
86
|
-
Style/RedundantSelf:
|
137
|
+
Style/SoleNestedConditional:
|
87
138
|
Enabled: false
|
88
139
|
|
89
140
|
Style/SymbolProc:
|
90
141
|
Enabled: false
|
91
142
|
|
92
|
-
Style/YodaCondition:
|
93
|
-
Enabled: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# awspec [![Gem](https://img.shields.io/gem/v/awspec.svg)](https://rubygems.org/gems/awspec) [![
|
1
|
+
# awspec [![Gem](https://img.shields.io/gem/v/awspec.svg)](https://rubygems.org/gems/awspec) [![CI](https://github.com/k1LoW/awspec/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/awspec/actions)
|
2
2
|
|
3
3
|
![Logo](./awspec-logo.png)
|
4
4
|
|
5
5
|
RSpec tests for your AWS resources.
|
6
6
|
|
7
|
-
[![Join the chat at https://gitter.im/k1LoW/awspec](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/k1LoW/awspec?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
8
|
-
|
9
7
|
[Resource Types](doc/resource_types.md) | [Contributing](doc/contributing.md)
|
10
8
|
|
11
9
|
## Installation
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
|
3
5
|
begin
|
@@ -12,7 +14,7 @@ end
|
|
12
14
|
require 'awspec'
|
13
15
|
|
14
16
|
types = Awspec::Helper::Type::TYPES.map do |type|
|
15
|
-
|
17
|
+
"spec:#{type}"
|
16
18
|
end
|
17
19
|
|
18
20
|
if defined?(RSpec)
|
@@ -23,14 +25,13 @@ if defined?(RSpec)
|
|
23
25
|
'spec:core',
|
24
26
|
'spec:generator_spec',
|
25
27
|
'spec:generator_doc',
|
26
|
-
'spec:rubocop',
|
27
28
|
'spec:helper']
|
28
29
|
|
29
30
|
task type: types
|
30
31
|
|
31
32
|
Awspec::Helper::Type::TYPES.map do |type|
|
32
33
|
RSpec::Core::RakeTask.new(type) do |t|
|
33
|
-
t.pattern =
|
34
|
+
t.pattern = "spec/type/#{type}_spec.rb"
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -60,5 +61,5 @@ end
|
|
60
61
|
|
61
62
|
task :generate_docs do
|
62
63
|
docs = Awspec::Generator::Doc::Type.generate_doc
|
63
|
-
File.write('doc/resource_types.md', docs
|
64
|
+
File.write('doc/resource_types.md', "#{docs}\n")
|
64
65
|
end
|
data/awspec.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'awspec/version'
|
6
6
|
|
@@ -21,18 +21,18 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
23
|
spec.required_ruby_version = '>= 2.1'
|
24
|
-
spec.add_runtime_dependency '
|
24
|
+
spec.add_runtime_dependency 'addressable'
|
25
25
|
spec.add_runtime_dependency 'awsecrets', '~> 1'
|
26
|
+
spec.add_runtime_dependency 'aws-sdk', '~> 3'
|
26
27
|
spec.add_runtime_dependency 'dry-inflector'
|
27
28
|
spec.add_runtime_dependency 'ipaddress'
|
28
29
|
spec.add_runtime_dependency 'rspec', '~> 3.0'
|
29
30
|
spec.add_runtime_dependency 'rspec-its'
|
30
31
|
spec.add_runtime_dependency 'term-ansicolor'
|
31
32
|
spec.add_runtime_dependency 'thor'
|
32
|
-
spec.add_runtime_dependency 'addressable'
|
33
33
|
spec.add_development_dependency 'bundler', '>= 1.9', '< 3.0'
|
34
34
|
spec.add_development_dependency 'octorelease'
|
35
35
|
spec.add_development_dependency 'pry'
|
36
36
|
spec.add_development_dependency 'rake', '~> 12.0'
|
37
|
-
spec.add_development_dependency 'rubocop'
|
37
|
+
spec.add_development_dependency 'rubocop'
|
38
38
|
end
|
data/bin/console
CHANGED
data/bin/toolbox
CHANGED
@@ -21,6 +21,15 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
|
21
21
|
it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
|
22
22
|
end
|
23
23
|
```
|
24
|
+
or
|
25
|
+
```ruby
|
26
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
27
|
+
it do
|
28
|
+
should have_metric_filter('my-cloudwatch-logs-metric-filter')
|
29
|
+
.filter_pattern('[date, error]')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
```
|
24
33
|
|
25
34
|
### have_subscription_filter
|
26
35
|
|
@@ -5,6 +5,25 @@ describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
|
5
5
|
it { should exist }
|
6
6
|
end
|
7
7
|
```
|
8
|
+
|
9
|
+
### have_security_group
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
13
|
+
it { should have_security_group('sg-1a2b3cd4') }
|
14
|
+
end
|
15
|
+
```
|
16
|
+
|
17
|
+
### scaling_config
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
21
|
+
its('scaling_config.min_size') { should eq 1 }
|
22
|
+
its('scaling_config.desired_size') { should eq 2 }
|
23
|
+
its('scaling_config.max_size') { should eq 3 }
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
8
27
|
### be_active, be_creating
|
9
28
|
|
10
29
|
```ruby
|
@@ -12,3 +31,37 @@ describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
|
12
31
|
it { should be_active }
|
13
32
|
end
|
14
33
|
```
|
34
|
+
|
35
|
+
### be_ready
|
36
|
+
|
37
|
+
This matcher *might* not be exactly you are expecting: it is different from what
|
38
|
+
you can see when looking at the AWS console at the Node Groups configuration
|
39
|
+
and check if the nodes Status is "Ready".
|
40
|
+
|
41
|
+
What you seeing over there is
|
42
|
+
[actually the same thing](https://aws.amazon.com/premiumsupport/knowledge-center/eks-node-status-ready/)
|
43
|
+
you would if using `kubectl`.
|
44
|
+
|
45
|
+
This matcher cannot do the same because it would involve using the Kubernetes
|
46
|
+
API: the AWS Ruby SDK currently doesn't expose this information.
|
47
|
+
|
48
|
+
What you can get from `be_ready` matcher is asserting that you have **at least**
|
49
|
+
the number of EC2 instances (the nodes in your EKS Node Group) are actually
|
50
|
+
in running state. It doesn't mean everything is fine, the node (EC2 instance)
|
51
|
+
can be running but without communication with the cluster or any order issue
|
52
|
+
regarding the Kubernetes configuration.
|
53
|
+
|
54
|
+
Although it might look an incomplete assertion, definitely the Node Group
|
55
|
+
"Status" won't be "Active" if the EC2 instances associated with it are not
|
56
|
+
running.
|
57
|
+
|
58
|
+
So, using this assertion like the sample below:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
62
|
+
it { should be_ready }
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
Will pass if at least the minimum expected (see `scaling_config`) number of EC2
|
67
|
+
instances are running.
|