awspec 1.24.3 → 1.25.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (441) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +67 -0
  3. data/.github/workflows/doc.yml +29 -0
  4. data/.rubocop.yml +76 -27
  5. data/Gemfile +4 -0
  6. data/README.md +1 -3
  7. data/Rakefile +5 -4
  8. data/awspec.gemspec +5 -5
  9. data/bin/console +1 -0
  10. data/bin/toolbox +1 -0
  11. data/doc/_resource_types/cloudwatch_logs.md +9 -0
  12. data/doc/_resource_types/eks_nodegroup.md +53 -0
  13. data/doc/resource_types.md +76 -23
  14. data/exe/awspec +1 -0
  15. data/lib/awspec/cli.rb +2 -0
  16. data/lib/awspec/command/generate.rb +11 -9
  17. data/lib/awspec/config.rb +2 -0
  18. data/lib/awspec/error.rb +4 -0
  19. data/lib/awspec/ext/array.rb +5 -2
  20. data/lib/awspec/ext/hash.rb +5 -2
  21. data/lib/awspec/ext/string.rb +2 -0
  22. data/lib/awspec/ext/struct.rb +2 -0
  23. data/lib/awspec/ext.rb +2 -0
  24. data/lib/awspec/generator/doc/type/account.rb +4 -4
  25. data/lib/awspec/generator/doc/type/account_attribute.rb +4 -4
  26. data/lib/awspec/generator/doc/type/account_attribute_base.rb +3 -2
  27. data/lib/awspec/generator/doc/type/acm.rb +4 -2
  28. data/lib/awspec/generator/doc/type/alb.rb +5 -3
  29. data/lib/awspec/generator/doc/type/alb_listener.rb +3 -1
  30. data/lib/awspec/generator/doc/type/alb_target_group.rb +3 -1
  31. data/lib/awspec/generator/doc/type/ami.rb +4 -2
  32. data/lib/awspec/generator/doc/type/apigateway.rb +2 -0
  33. data/lib/awspec/generator/doc/type/autoscaling_group.rb +2 -0
  34. data/lib/awspec/generator/doc/type/base.rb +11 -8
  35. data/lib/awspec/generator/doc/type/batch_compute_environment.rb +6 -4
  36. data/lib/awspec/generator/doc/type/batch_job_definition.rb +2 -0
  37. data/lib/awspec/generator/doc/type/batch_job_queue.rb +2 -0
  38. data/lib/awspec/generator/doc/type/cloudformation_stack.rb +2 -0
  39. data/lib/awspec/generator/doc/type/cloudfront_distribution.rb +4 -2
  40. data/lib/awspec/generator/doc/type/cloudtrail.rb +2 -0
  41. data/lib/awspec/generator/doc/type/cloudwatch_alarm.rb +3 -1
  42. data/lib/awspec/generator/doc/type/cloudwatch_event.rb +2 -0
  43. data/lib/awspec/generator/doc/type/cloudwatch_logs.rb +2 -0
  44. data/lib/awspec/generator/doc/type/codebuild.rb +2 -0
  45. data/lib/awspec/generator/doc/type/codedeploy.rb +2 -0
  46. data/lib/awspec/generator/doc/type/codedeploy_deployment_group.rb +2 -0
  47. data/lib/awspec/generator/doc/type/cognito_identity_pool.rb +2 -0
  48. data/lib/awspec/generator/doc/type/cognito_user_pool.rb +2 -0
  49. data/lib/awspec/generator/doc/type/customer_gateway.rb +4 -2
  50. data/lib/awspec/generator/doc/type/directconnect_virtual_interface.rb +4 -2
  51. data/lib/awspec/generator/doc/type/dynamodb_table.rb +4 -2
  52. data/lib/awspec/generator/doc/type/ebs.rb +4 -2
  53. data/lib/awspec/generator/doc/type/ec2.rb +4 -2
  54. data/lib/awspec/generator/doc/type/ec2_account_attributes.rb +2 -0
  55. data/lib/awspec/generator/doc/type/ecr_repository.rb +2 -0
  56. data/lib/awspec/generator/doc/type/ecs_cluster.rb +4 -2
  57. data/lib/awspec/generator/doc/type/ecs_container_instance.rb +4 -2
  58. data/lib/awspec/generator/doc/type/ecs_service.rb +4 -2
  59. data/lib/awspec/generator/doc/type/ecs_task_definition.rb +4 -2
  60. data/lib/awspec/generator/doc/type/efs.rb +2 -0
  61. data/lib/awspec/generator/doc/type/eip.rb +2 -0
  62. data/lib/awspec/generator/doc/type/eks.rb +4 -2
  63. data/lib/awspec/generator/doc/type/eks_nodegroup.rb +4 -2
  64. data/lib/awspec/generator/doc/type/elasticache.rb +4 -2
  65. data/lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb +2 -0
  66. data/lib/awspec/generator/doc/type/elasticsearch.rb +2 -0
  67. data/lib/awspec/generator/doc/type/elastictranscoder_pipeline.rb +4 -2
  68. data/lib/awspec/generator/doc/type/elb.rb +5 -3
  69. data/lib/awspec/generator/doc/type/emr.rb +4 -2
  70. data/lib/awspec/generator/doc/type/firehose.rb +2 -0
  71. data/lib/awspec/generator/doc/type/iam_group.rb +3 -1
  72. data/lib/awspec/generator/doc/type/iam_policy.rb +2 -0
  73. data/lib/awspec/generator/doc/type/iam_role.rb +3 -1
  74. data/lib/awspec/generator/doc/type/iam_user.rb +3 -1
  75. data/lib/awspec/generator/doc/type/internet_gateway.rb +2 -0
  76. data/lib/awspec/generator/doc/type/kinesis.rb +2 -0
  77. data/lib/awspec/generator/doc/type/kms.rb +2 -0
  78. data/lib/awspec/generator/doc/type/lambda.rb +3 -1
  79. data/lib/awspec/generator/doc/type/lambda_account_settings.rb +2 -0
  80. data/lib/awspec/generator/doc/type/launch_configuration.rb +2 -0
  81. data/lib/awspec/generator/doc/type/launch_template.rb +2 -0
  82. data/lib/awspec/generator/doc/type/mq.rb +5 -3
  83. data/lib/awspec/generator/doc/type/msk.rb +2 -0
  84. data/lib/awspec/generator/doc/type/nat_gateway.rb +4 -2
  85. data/lib/awspec/generator/doc/type/network_acl.rb +4 -2
  86. data/lib/awspec/generator/doc/type/network_interface.rb +4 -2
  87. data/lib/awspec/generator/doc/type/nlb.rb +4 -2
  88. data/lib/awspec/generator/doc/type/nlb_listener.rb +3 -1
  89. data/lib/awspec/generator/doc/type/nlb_target_group.rb +3 -1
  90. data/lib/awspec/generator/doc/type/rds.rb +5 -3
  91. data/lib/awspec/generator/doc/type/rds_account_attributes.rb +2 -0
  92. data/lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb +2 -0
  93. data/lib/awspec/generator/doc/type/rds_db_parameter_group.rb +2 -0
  94. data/lib/awspec/generator/doc/type/redshift.rb +5 -3
  95. data/lib/awspec/generator/doc/type/redshift_cluster_parameter_group.rb +2 -0
  96. data/lib/awspec/generator/doc/type/route53_hosted_zone.rb +2 -0
  97. data/lib/awspec/generator/doc/type/route_table.rb +2 -0
  98. data/lib/awspec/generator/doc/type/s3_bucket.rb +3 -1
  99. data/lib/awspec/generator/doc/type/secretsmanager.rb +2 -0
  100. data/lib/awspec/generator/doc/type/security_group.rb +4 -2
  101. data/lib/awspec/generator/doc/type/ses_identity.rb +4 -2
  102. data/lib/awspec/generator/doc/type/ses_send_quota.rb +2 -0
  103. data/lib/awspec/generator/doc/type/sns_topic.rb +5 -3
  104. data/lib/awspec/generator/doc/type/sqs.rb +2 -0
  105. data/lib/awspec/generator/doc/type/ssm_parameter.rb +2 -0
  106. data/lib/awspec/generator/doc/type/subnet.rb +4 -2
  107. data/lib/awspec/generator/doc/type/transit_gateway.rb +2 -0
  108. data/lib/awspec/generator/doc/type/vpc.rb +4 -2
  109. data/lib/awspec/generator/doc/type/vpc_endpoints.rb +2 -0
  110. data/lib/awspec/generator/doc/type/vpn_connection.rb +4 -2
  111. data/lib/awspec/generator/doc/type/vpn_gateway.rb +4 -2
  112. data/lib/awspec/generator/doc/type/waf_web_acl.rb +3 -1
  113. data/lib/awspec/generator/doc/type/wafregional_web_acl.rb +3 -1
  114. data/lib/awspec/generator/doc/type.rb +5 -3
  115. data/lib/awspec/generator/spec/acm.rb +4 -2
  116. data/lib/awspec/generator/spec/alb.rb +6 -4
  117. data/lib/awspec/generator/spec/alb_listener.rb +6 -4
  118. data/lib/awspec/generator/spec/autoscaling_group.rb +6 -4
  119. data/lib/awspec/generator/spec/cloudwatch_alarm.rb +4 -2
  120. data/lib/awspec/generator/spec/cloudwatch_event.rb +4 -2
  121. data/lib/awspec/generator/spec/cloudwatch_logs.rb +9 -3
  122. data/lib/awspec/generator/spec/codebuild.rb +4 -2
  123. data/lib/awspec/generator/spec/directconnect.rb +4 -2
  124. data/lib/awspec/generator/spec/ebs.rb +5 -4
  125. data/lib/awspec/generator/spec/ec2.rb +5 -2
  126. data/lib/awspec/generator/spec/efs.rb +4 -2
  127. data/lib/awspec/generator/spec/eip.rb +4 -2
  128. data/lib/awspec/generator/spec/elasticache.rb +5 -2
  129. data/lib/awspec/generator/spec/elasticsearch.rb +4 -2
  130. data/lib/awspec/generator/spec/elb.rb +8 -6
  131. data/lib/awspec/generator/spec/iam_group.rb +4 -2
  132. data/lib/awspec/generator/spec/iam_policy.rb +3 -0
  133. data/lib/awspec/generator/spec/iam_role.rb +4 -2
  134. data/lib/awspec/generator/spec/iam_user.rb +4 -2
  135. data/lib/awspec/generator/spec/internet_gateway.rb +6 -4
  136. data/lib/awspec/generator/spec/kms.rb +4 -2
  137. data/lib/awspec/generator/spec/lambda.rb +4 -2
  138. data/lib/awspec/generator/spec/nat_gateway.rb +6 -4
  139. data/lib/awspec/generator/spec/network_acl.rb +15 -13
  140. data/lib/awspec/generator/spec/network_interface.rb +13 -10
  141. data/lib/awspec/generator/spec/nlb.rb +6 -4
  142. data/lib/awspec/generator/spec/nlb_listener.rb +6 -4
  143. data/lib/awspec/generator/spec/rds.rb +5 -2
  144. data/lib/awspec/generator/spec/rds_db_cluster_parameter_group.rb +3 -2
  145. data/lib/awspec/generator/spec/rds_db_parameter_group.rb +3 -2
  146. data/lib/awspec/generator/spec/redshift.rb +5 -2
  147. data/lib/awspec/generator/spec/redshift_cluster_parameter_group.rb +3 -2
  148. data/lib/awspec/generator/spec/route53_hosted_zone.rb +4 -2
  149. data/lib/awspec/generator/spec/route_table.rb +12 -14
  150. data/lib/awspec/generator/spec/s3_bucket.rb +9 -6
  151. data/lib/awspec/generator/spec/security_group.rb +9 -8
  152. data/lib/awspec/generator/spec/subnet.rb +6 -4
  153. data/lib/awspec/generator/spec/vpc.rb +5 -2
  154. data/lib/awspec/generator/template.rb +17 -15
  155. data/lib/awspec/generator.rb +4 -2
  156. data/lib/awspec/helper/client_wrap.rb +5 -1
  157. data/lib/awspec/helper/color.rb +2 -0
  158. data/lib/awspec/helper/finder/account_attributes.rb +8 -6
  159. data/lib/awspec/helper/finder/acm.rb +4 -0
  160. data/lib/awspec/helper/finder/alb.rb +7 -5
  161. data/lib/awspec/helper/finder/ami.rb +4 -0
  162. data/lib/awspec/helper/finder/apigateway.rb +2 -0
  163. data/lib/awspec/helper/finder/autoscaling.rb +3 -0
  164. data/lib/awspec/helper/finder/batch.rb +2 -0
  165. data/lib/awspec/helper/finder/cloudformation.rb +2 -0
  166. data/lib/awspec/helper/finder/cloudfront.rb +3 -0
  167. data/lib/awspec/helper/finder/cloudtrail.rb +2 -0
  168. data/lib/awspec/helper/finder/cloudwatch.rb +3 -0
  169. data/lib/awspec/helper/finder/cloudwatch_event.rb +2 -0
  170. data/lib/awspec/helper/finder/cloudwatch_logs.rb +10 -5
  171. data/lib/awspec/helper/finder/codebuild.rb +3 -0
  172. data/lib/awspec/helper/finder/codedeploy.rb +2 -0
  173. data/lib/awspec/helper/finder/cognito_identity_pool.rb +2 -0
  174. data/lib/awspec/helper/finder/cognito_user_pool.rb +2 -0
  175. data/lib/awspec/helper/finder/directconnect.rb +2 -0
  176. data/lib/awspec/helper/finder/dynamodb.rb +2 -0
  177. data/lib/awspec/helper/finder/ebs.rb +5 -0
  178. data/lib/awspec/helper/finder/ec2.rb +56 -26
  179. data/lib/awspec/helper/finder/ecr.rb +2 -0
  180. data/lib/awspec/helper/finder/ecs.rb +5 -2
  181. data/lib/awspec/helper/finder/efs.rb +5 -4
  182. data/lib/awspec/helper/finder/eks.rb +2 -0
  183. data/lib/awspec/helper/finder/elasticache.rb +3 -1
  184. data/lib/awspec/helper/finder/elasticsearch.rb +3 -1
  185. data/lib/awspec/helper/finder/elastictranscoder.rb +3 -0
  186. data/lib/awspec/helper/finder/elb.rb +6 -4
  187. data/lib/awspec/helper/finder/emr.rb +2 -0
  188. data/lib/awspec/helper/finder/firehose.rb +2 -0
  189. data/lib/awspec/helper/finder/iam.rb +16 -12
  190. data/lib/awspec/helper/finder/kinesis.rb +2 -0
  191. data/lib/awspec/helper/finder/kms.rb +3 -1
  192. data/lib/awspec/helper/finder/lambda.rb +3 -0
  193. data/lib/awspec/helper/finder/mq.rb +3 -1
  194. data/lib/awspec/helper/finder/msk.rb +2 -0
  195. data/lib/awspec/helper/finder/nlb.rb +11 -8
  196. data/lib/awspec/helper/finder/rds.rb +4 -1
  197. data/lib/awspec/helper/finder/redshift.rb +4 -1
  198. data/lib/awspec/helper/finder/route53.rb +4 -1
  199. data/lib/awspec/helper/finder/s3.rb +4 -2
  200. data/lib/awspec/helper/finder/secretsmanager.rb +2 -0
  201. data/lib/awspec/helper/finder/security_group.rb +2 -0
  202. data/lib/awspec/helper/finder/ses.rb +2 -0
  203. data/lib/awspec/helper/finder/sns_topic.rb +5 -3
  204. data/lib/awspec/helper/finder/sqs.rb +2 -0
  205. data/lib/awspec/helper/finder/ssm_parameter.rb +4 -1
  206. data/lib/awspec/helper/finder/subnet.rb +126 -20
  207. data/lib/awspec/helper/finder/vpc.rb +12 -6
  208. data/lib/awspec/helper/finder/vpc_endpoints.rb +2 -0
  209. data/lib/awspec/helper/finder/waf.rb +5 -0
  210. data/lib/awspec/helper/finder/wafregional.rb +5 -0
  211. data/lib/awspec/helper/finder.rb +3 -1
  212. data/lib/awspec/helper/states.rb +4 -2
  213. data/lib/awspec/helper/type.rb +8 -4
  214. data/lib/awspec/helper.rb +2 -0
  215. data/lib/awspec/matcher/be_allowed.rb +2 -0
  216. data/lib/awspec/matcher/be_allowed_action.rb +2 -0
  217. data/lib/awspec/matcher/be_attached_to.rb +3 -0
  218. data/lib/awspec/matcher/be_connected_to_vpc.rb +2 -0
  219. data/lib/awspec/matcher/be_denied.rb +2 -0
  220. data/lib/awspec/matcher/be_opened.rb +2 -0
  221. data/lib/awspec/matcher/be_opened_only.rb +2 -0
  222. data/lib/awspec/matcher/belong_to_alb.rb +4 -0
  223. data/lib/awspec/matcher/belong_to_cache_subnet_group.rb +2 -0
  224. data/lib/awspec/matcher/belong_to_cluster_subnet_group.rb +2 -0
  225. data/lib/awspec/matcher/belong_to_db_subnet_group.rb +2 -0
  226. data/lib/awspec/matcher/belong_to_domain.rb +2 -0
  227. data/lib/awspec/matcher/belong_to_iam_group.rb +2 -0
  228. data/lib/awspec/matcher/belong_to_metric.rb +2 -0
  229. data/lib/awspec/matcher/belong_to_nlb.rb +4 -0
  230. data/lib/awspec/matcher/belong_to_replication_group.rb +2 -0
  231. data/lib/awspec/matcher/belong_to_subnet.rb +5 -0
  232. data/lib/awspec/matcher/belong_to_subnets.rb +16 -0
  233. data/lib/awspec/matcher/belong_to_vpc.rb +4 -0
  234. data/lib/awspec/matcher/have_attribute_definition.rb +2 -0
  235. data/lib/awspec/matcher/have_cluster_parameter_group.rb +2 -0
  236. data/lib/awspec/matcher/have_custom_response_error_code.rb +3 -2
  237. data/lib/awspec/matcher/have_db_parameter_group.rb +2 -0
  238. data/lib/awspec/matcher/have_env_var.rb +2 -0
  239. data/lib/awspec/matcher/have_env_var_value.rb +2 -0
  240. data/lib/awspec/matcher/have_env_vars.rb +2 -0
  241. data/lib/awspec/matcher/have_inline_policy.rb +2 -0
  242. data/lib/awspec/matcher/have_key_policy.rb +2 -0
  243. data/lib/awspec/matcher/have_key_schema.rb +2 -0
  244. data/lib/awspec/matcher/have_metric_filter.rb +11 -0
  245. data/lib/awspec/matcher/have_network_interface.rb +2 -0
  246. data/lib/awspec/matcher/have_option_group.rb +2 -0
  247. data/lib/awspec/matcher/have_origin.rb +3 -2
  248. data/lib/awspec/matcher/have_private_ip_address.rb +2 -0
  249. data/lib/awspec/matcher/have_record_set.rb +3 -1
  250. data/lib/awspec/matcher/have_route.rb +5 -3
  251. data/lib/awspec/matcher/have_rule.rb +3 -0
  252. data/lib/awspec/matcher/have_subscription_attributes.rb +3 -0
  253. data/lib/awspec/matcher/have_subscription_filter.rb +2 -0
  254. data/lib/awspec/matcher/have_tag.rb +2 -0
  255. data/lib/awspec/matcher/have_vpc_peering_connection.rb +2 -0
  256. data/lib/awspec/matcher/include_subscribed.rb +2 -0
  257. data/lib/awspec/matcher.rb +6 -0
  258. data/lib/awspec/resource_reader.rb +3 -0
  259. data/lib/awspec/setup.rb +7 -5
  260. data/lib/awspec/shared_context.rb +3 -0
  261. data/lib/awspec/stub/account.rb +2 -0
  262. data/lib/awspec/stub/acm.rb +2 -0
  263. data/lib/awspec/stub/alb.rb +3 -1
  264. data/lib/awspec/stub/alb_listener.rb +4 -3
  265. data/lib/awspec/stub/alb_target_group.rb +3 -1
  266. data/lib/awspec/stub/ami.rb +2 -0
  267. data/lib/awspec/stub/apigateway.rb +2 -0
  268. data/lib/awspec/stub/autoscaling_group.rb +6 -4
  269. data/lib/awspec/stub/batch_compute_environment.rb +2 -0
  270. data/lib/awspec/stub/batch_job_definition.rb +2 -0
  271. data/lib/awspec/stub/batch_job_queue.rb +2 -0
  272. data/lib/awspec/stub/cloudformation_stack.rb +4 -2
  273. data/lib/awspec/stub/cloudfront_distribution.rb +6 -4
  274. data/lib/awspec/stub/cloudtrail.rb +2 -0
  275. data/lib/awspec/stub/cloudwatch_logs.rb +4 -1
  276. data/lib/awspec/stub/codebuild.rb +5 -3
  277. data/lib/awspec/stub/codedeploy.rb +2 -0
  278. data/lib/awspec/stub/codedeploy_deployment_group.rb +2 -0
  279. data/lib/awspec/stub/cognito_identity_pool.rb +2 -0
  280. data/lib/awspec/stub/cognito_user_pool.rb +2 -0
  281. data/lib/awspec/stub/directconnect_virtual_interface.rb +2 -0
  282. data/lib/awspec/stub/duplicated_resource_type.rb +2 -0
  283. data/lib/awspec/stub/dynamodb_table.rb +2 -0
  284. data/lib/awspec/stub/ebs.rb +2 -0
  285. data/lib/awspec/stub/ec2.rb +2 -0
  286. data/lib/awspec/stub/ec2_has_multi_security_groups.rb +2 -0
  287. data/lib/awspec/stub/ec2_non_existing.rb +2 -0
  288. data/lib/awspec/stub/ecr_repository.rb +2 -0
  289. data/lib/awspec/stub/ecs.rb +13 -22
  290. data/lib/awspec/stub/ecs_cluster.rb +4 -4
  291. data/lib/awspec/stub/ecs_container_instance.rb +3 -2
  292. data/lib/awspec/stub/ecs_service.rb +4 -4
  293. data/lib/awspec/stub/ecs_task_definition.rb +9 -14
  294. data/lib/awspec/stub/efs.rb +2 -0
  295. data/lib/awspec/stub/eip.rb +2 -0
  296. data/lib/awspec/stub/eks.rb +5 -3
  297. data/lib/awspec/stub/eks_nodegroup.rb +63 -1
  298. data/lib/awspec/stub/elasticache.rb +2 -0
  299. data/lib/awspec/stub/elasticache_cache_parameter_group.rb +2 -0
  300. data/lib/awspec/stub/elasticsearch.rb +1 -0
  301. data/lib/awspec/stub/elastictranscoder_pipeline.rb +2 -0
  302. data/lib/awspec/stub/elb.rb +2 -0
  303. data/lib/awspec/stub/emr.rb +2 -0
  304. data/lib/awspec/stub/firehose.rb +2 -0
  305. data/lib/awspec/stub/iam_group.rb +3 -2
  306. data/lib/awspec/stub/iam_policy.rb +2 -0
  307. data/lib/awspec/stub/iam_role.rb +3 -2
  308. data/lib/awspec/stub/iam_user.rb +3 -2
  309. data/lib/awspec/stub/internet_gateway.rb +2 -0
  310. data/lib/awspec/stub/kinesis.rb +8 -6
  311. data/lib/awspec/stub/kms.rb +2 -0
  312. data/lib/awspec/stub/lambda.rb +2 -0
  313. data/lib/awspec/stub/launch_configuration.rb +2 -0
  314. data/lib/awspec/stub/launch_template.rb +2 -0
  315. data/lib/awspec/stub/mq.rb +5 -3
  316. data/lib/awspec/stub/msk.rb +5 -3
  317. data/lib/awspec/stub/nat_gateway.rb +2 -0
  318. data/lib/awspec/stub/network_acl.rb +2 -0
  319. data/lib/awspec/stub/network_interface.rb +2 -0
  320. data/lib/awspec/stub/nlb.rb +3 -1
  321. data/lib/awspec/stub/nlb_listener.rb +4 -3
  322. data/lib/awspec/stub/nlb_target_group.rb +3 -1
  323. data/lib/awspec/stub/rds.rb +2 -0
  324. data/lib/awspec/stub/rds_db_cluster_parameter_group.rb +2 -0
  325. data/lib/awspec/stub/rds_db_parameter_group.rb +10 -0
  326. data/lib/awspec/stub/redshift.rb +2 -0
  327. data/lib/awspec/stub/redshift_cluster_parameter_group.rb +2 -0
  328. data/lib/awspec/stub/route53_hosted_zone.rb +2 -0
  329. data/lib/awspec/stub/route_table.rb +2 -0
  330. data/lib/awspec/stub/s3_bucket.rb +2 -0
  331. data/lib/awspec/stub/secretsmanager.rb +2 -0
  332. data/lib/awspec/stub/security_group.rb +2 -0
  333. data/lib/awspec/stub/ses_identity.rb +2 -0
  334. data/lib/awspec/stub/sns_topic.rb +18 -9
  335. data/lib/awspec/stub/sns_topic_error.rb +17 -0
  336. data/lib/awspec/stub/sqs.rb +2 -0
  337. data/lib/awspec/stub/ssm_parameter.rb +2 -0
  338. data/lib/awspec/stub/subnet.rb +2 -0
  339. data/lib/awspec/stub/transit_gateway.rb +2 -0
  340. data/lib/awspec/stub/vpc.rb +2 -0
  341. data/lib/awspec/stub/vpc_endpoints.rb +2 -0
  342. data/lib/awspec/stub/waf_web_acl.rb +2 -0
  343. data/lib/awspec/stub/wafregional_web_acl.rb +2 -0
  344. data/lib/awspec/stub.rb +3 -1
  345. data/lib/awspec/toolbox.rb +2 -0
  346. data/lib/awspec/type/account.rb +4 -2
  347. data/lib/awspec/type/account_attribute.rb +5 -2
  348. data/lib/awspec/type/account_attribute_base.rb +2 -0
  349. data/lib/awspec/type/acm.rb +8 -6
  350. data/lib/awspec/type/alb.rb +8 -3
  351. data/lib/awspec/type/alb_listener.rb +4 -0
  352. data/lib/awspec/type/alb_target_group.rb +3 -0
  353. data/lib/awspec/type/ami.rb +5 -3
  354. data/lib/awspec/type/apigateway.rb +9 -3
  355. data/lib/awspec/type/autoscaling_group.rb +3 -0
  356. data/lib/awspec/type/base.rb +6 -3
  357. data/lib/awspec/type/batch_compute_environment.rb +6 -4
  358. data/lib/awspec/type/batch_job_definition.rb +2 -0
  359. data/lib/awspec/type/batch_job_queue.rb +4 -2
  360. data/lib/awspec/type/cloudformation_stack.rb +2 -0
  361. data/lib/awspec/type/cloudfront_distribution.rb +11 -5
  362. data/lib/awspec/type/cloudtrail.rb +2 -0
  363. data/lib/awspec/type/cloudwatch_alarm.rb +2 -0
  364. data/lib/awspec/type/cloudwatch_event.rb +2 -0
  365. data/lib/awspec/type/cloudwatch_logs.rb +10 -3
  366. data/lib/awspec/type/codebuild.rb +2 -0
  367. data/lib/awspec/type/codedeploy.rb +2 -0
  368. data/lib/awspec/type/codedeploy_deployment_group.rb +4 -0
  369. data/lib/awspec/type/cognito_identity_pool.rb +2 -0
  370. data/lib/awspec/type/cognito_user_pool.rb +2 -0
  371. data/lib/awspec/type/customer_gateway.rb +5 -3
  372. data/lib/awspec/type/directconnect_virtual_interface.rb +5 -3
  373. data/lib/awspec/type/dynamodb_table.rb +5 -3
  374. data/lib/awspec/type/ebs.rb +6 -3
  375. data/lib/awspec/type/ec2.rb +10 -0
  376. data/lib/awspec/type/ec2_account_attributes.rb +2 -0
  377. data/lib/awspec/type/ecr_repository.rb +2 -0
  378. data/lib/awspec/type/ecs_cluster.rb +5 -2
  379. data/lib/awspec/type/ecs_container_instance.rb +4 -2
  380. data/lib/awspec/type/ecs_service.rb +5 -2
  381. data/lib/awspec/type/ecs_task_definition.rb +4 -2
  382. data/lib/awspec/type/efs.rb +3 -0
  383. data/lib/awspec/type/eip.rb +3 -0
  384. data/lib/awspec/type/eks.rb +4 -2
  385. data/lib/awspec/type/eks_nodegroup.rb +109 -2
  386. data/lib/awspec/type/elasticache.rb +7 -3
  387. data/lib/awspec/type/elasticache_cache_parameter_group.rb +3 -0
  388. data/lib/awspec/type/elasticsearch.rb +2 -0
  389. data/lib/awspec/type/elastictranscoder_pipeline.rb +5 -3
  390. data/lib/awspec/type/elb.rb +11 -3
  391. data/lib/awspec/type/emr.rb +8 -6
  392. data/lib/awspec/type/firehose.rb +4 -2
  393. data/lib/awspec/type/iam_group.rb +4 -0
  394. data/lib/awspec/type/iam_policy.rb +5 -0
  395. data/lib/awspec/type/iam_role.rb +3 -0
  396. data/lib/awspec/type/iam_user.rb +3 -0
  397. data/lib/awspec/type/internet_gateway.rb +2 -0
  398. data/lib/awspec/type/kinesis.rb +3 -0
  399. data/lib/awspec/type/kms.rb +3 -0
  400. data/lib/awspec/type/lambda.rb +2 -0
  401. data/lib/awspec/type/lambda_account_settings.rb +2 -0
  402. data/lib/awspec/type/launch_configuration.rb +3 -0
  403. data/lib/awspec/type/launch_template.rb +3 -0
  404. data/lib/awspec/type/mq.rb +7 -3
  405. data/lib/awspec/type/msk.rb +5 -3
  406. data/lib/awspec/type/nat_gateway.rb +5 -3
  407. data/lib/awspec/type/network_acl.rb +9 -2
  408. data/lib/awspec/type/network_interface.rb +9 -3
  409. data/lib/awspec/type/nlb.rb +6 -3
  410. data/lib/awspec/type/nlb_listener.rb +4 -0
  411. data/lib/awspec/type/nlb_target_group.rb +3 -0
  412. data/lib/awspec/type/rds.rb +7 -3
  413. data/lib/awspec/type/rds_account_attributes.rb +2 -0
  414. data/lib/awspec/type/rds_db_cluster_parameter_group.rb +3 -0
  415. data/lib/awspec/type/rds_db_parameter_group.rb +58 -0
  416. data/lib/awspec/type/redshift.rb +7 -3
  417. data/lib/awspec/type/redshift_cluster_parameter_group.rb +2 -0
  418. data/lib/awspec/type/resource_base.rb +2 -0
  419. data/lib/awspec/type/route53_hosted_zone.rb +7 -2
  420. data/lib/awspec/type/route_table.rb +12 -0
  421. data/lib/awspec/type/s3_bucket.rb +7 -4
  422. data/lib/awspec/type/secretsmanager.rb +2 -0
  423. data/lib/awspec/type/security_group.rb +14 -2
  424. data/lib/awspec/type/ses_identity.rb +8 -6
  425. data/lib/awspec/type/ses_send_quota.rb +2 -0
  426. data/lib/awspec/type/sns_topic.rb +4 -0
  427. data/lib/awspec/type/sqs.rb +4 -0
  428. data/lib/awspec/type/ssm_parameter.rb +3 -0
  429. data/lib/awspec/type/subnet.rb +6 -3
  430. data/lib/awspec/type/transit_gateway.rb +2 -0
  431. data/lib/awspec/type/vpc.rb +7 -3
  432. data/lib/awspec/type/vpc_endpoints.rb +5 -3
  433. data/lib/awspec/type/vpn_connection.rb +5 -3
  434. data/lib/awspec/type/vpn_gateway.rb +5 -3
  435. data/lib/awspec/type/waf_web_acl.rb +3 -0
  436. data/lib/awspec/type/wafregional_web_acl.rb +3 -0
  437. data/lib/awspec/version.rb +3 -1
  438. data/lib/awspec.rb +2 -0
  439. metadata +31 -28
  440. data/.tachikoma.yml +0 -1
  441. data/.travis.yml +0 -27
@@ -248,7 +248,7 @@ end
248
248
  ```
249
249
 
250
250
 
251
- ### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_enabled), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns), its(:target_type), its(:protocol_version)
251
+ ### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_enabled), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns), its(:target_type), its(:protocol_version), its(:ip_address_type)
252
252
  ## <a name="ami">ami</a>
253
253
 
254
254
  AMI resource type.
@@ -360,7 +360,7 @@ describe autoscaling_group('my-auto-scaling-group') do
360
360
  end
361
361
  ```
362
362
 
363
- ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:predicted_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size), its(:context)
363
+ ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:predicted_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size), its(:context), its(:desired_capacity_type)
364
364
  ## <a name="batch_compute_environment">batch_compute_environment</a>
365
365
 
366
366
  BatchComputeEnvironment resource type.
@@ -399,7 +399,7 @@ end
399
399
 
400
400
  ### be_unmanaged
401
401
 
402
- ### its(:compute_environment_name), its(:compute_environment_arn), its(:ecs_cluster_arn), its(:tags), its(:type), its(:state), its(:status), its(:status_reason), its(:service_role)
402
+ ### its(:compute_environment_name), its(:compute_environment_arn), its(:unmanagedv_cpus), its(:ecs_cluster_arn), its(:tags), its(:type), its(:state), its(:status), its(:status_reason), its(:service_role)
403
403
  ## <a name="batch_job_definition">batch_job_definition</a>
404
404
 
405
405
  BatchJobDefinition resource type.
@@ -412,7 +412,7 @@ describe batch_job_definition('my-batch-job-definition') do
412
412
  end
413
413
  ```
414
414
 
415
- ### its(:job_definition_name), its(:job_definition_arn), its(:revision), its(:status), its(:type), its(:parameters), its(:retry_strategy), its(:timeout), its(:node_properties), its(:tags), its(:propagate_tags), its(:platform_capabilities)
415
+ ### its(:job_definition_name), its(:job_definition_arn), its(:revision), its(:status), its(:type), its(:scheduling_priority), its(:parameters), its(:retry_strategy), its(:timeout), its(:node_properties), its(:tags), its(:propagate_tags), its(:platform_capabilities)
416
416
  ## <a name="batch_job_queue">batch_job_queue</a>
417
417
 
418
418
  BatchJobQueue resource type.
@@ -438,7 +438,7 @@ describe batch_job_queue('my-batch-job-queue') do
438
438
  end
439
439
  ```
440
440
 
441
- ### its(:job_queue_name), its(:job_queue_arn), its(:state), its(:status), its(:status_reason), its(:priority), its(:tags)
441
+ ### its(:job_queue_name), its(:job_queue_arn), its(:state), its(:scheduling_policy_arn), its(:status), its(:status_reason), its(:priority), its(:tags)
442
442
  ## <a name="cloudformation_stack">cloudformation_stack</a>
443
443
 
444
444
  CloudformationStack resource type.
@@ -678,6 +678,15 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
678
678
  it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
679
679
  end
680
680
  ```
681
+ or
682
+ ```ruby
683
+ describe cloudwatch_logs('my-cloudwatch-logs-group') do
684
+ it do
685
+ should have_metric_filter('my-cloudwatch-logs-metric-filter')
686
+ .filter_pattern('[date, error]')
687
+ end
688
+ end
689
+ ```
681
690
 
682
691
 
683
692
  ### have_subscription_filter
@@ -836,7 +845,7 @@ describe directconnect_virtual_interface('my-directconnect-virtual-interface') d
836
845
  end
837
846
  ```
838
847
 
839
- ### its(:owner_account), its(:virtual_interface_id), its(:location), its(:connection_id), its(:virtual_interface_type), its(:virtual_interface_name), its(:vlan), its(:asn), its(:amazon_side_asn), its(:auth_key), its(:amazon_address), its(:customer_address), its(:address_family), its(:virtual_interface_state), its(:customer_router_config), its(:mtu), its(:jumbo_frame_capable), its(:virtual_gateway_id), its(:direct_connect_gateway_id), its(:route_filter_prefixes), its(:bgp_peers), its(:region), its(:aws_device_v2), its(:tags)
848
+ ### its(:owner_account), its(:virtual_interface_id), its(:location), its(:connection_id), its(:virtual_interface_type), its(:virtual_interface_name), its(:vlan), its(:asn), its(:amazon_side_asn), its(:auth_key), its(:amazon_address), its(:customer_address), its(:address_family), its(:virtual_interface_state), its(:customer_router_config), its(:mtu), its(:jumbo_frame_capable), its(:virtual_gateway_id), its(:direct_connect_gateway_id), its(:route_filter_prefixes), its(:bgp_peers), its(:region), its(:aws_device_v2), its(:aws_logical_device_id), its(:tags), its(:site_link_enabled)
840
849
  ## <a name="dynamodb_table">dynamodb_table</a>
841
850
 
842
851
  DynamodbTable resource type.
@@ -872,7 +881,7 @@ end
872
881
  ```
873
882
 
874
883
 
875
- ### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:table_id), its(:billing_mode_summary), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn), its(:global_table_version), its(:replicas), its(:restore_summary), its(:sse_description), its(:archival_summary)
884
+ ### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:table_id), its(:billing_mode_summary), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn), its(:global_table_version), its(:replicas), its(:restore_summary), its(:sse_description), its(:archival_summary), its(:table_class_summary)
876
885
  ### :unlock: Advanced use
877
886
 
878
887
  `dynamodb_table` can use `Aws::DynamoDB::Table` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/DynamoDB/Table.html).
@@ -1118,7 +1127,7 @@ end
1118
1127
  ```
1119
1128
 
1120
1129
 
1121
- ### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:elastic_gpu_associations), its(:elastic_inference_accelerator_associations), its(:outpost_arn), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:cpu_options), its(:capacity_reservation_id), its(:capacity_reservation_specification), its(:hibernation_options), its(:licenses), its(:metadata_options), its(:enclave_options), its(:boot_mode)
1130
+ ### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:elastic_gpu_associations), its(:elastic_inference_accelerator_associations), its(:outpost_arn), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:cpu_options), its(:capacity_reservation_id), its(:capacity_reservation_specification), its(:hibernation_options), its(:licenses), its(:metadata_options), its(:enclave_options), its(:boot_mode), its(:platform_details), its(:usage_operation), its(:usage_operation_update_time), its(:private_dns_name_options), its(:ipv_6_address)
1122
1131
  ### :unlock: Advanced use
1123
1132
 
1124
1133
  `ec2` can use `Aws::EC2::Instance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Instance.html).
@@ -1239,7 +1248,7 @@ end
1239
1248
  ```
1240
1249
 
1241
1250
 
1242
- ### its(:container_instance_arn), its(:ec2_instance_id), its(:capacity_provider_name), its(:version), its(:version_info), its(:status), its(:status_reason), its(:agent_connected), its(:running_tasks_count), its(:pending_tasks_count), its(:agent_update_status), its(:attributes), its(:registered_at), its(:attachments), its(:tags)
1251
+ ### its(:container_instance_arn), its(:ec2_instance_id), its(:capacity_provider_name), its(:version), its(:version_info), its(:status), its(:status_reason), its(:agent_connected), its(:running_tasks_count), its(:pending_tasks_count), its(:agent_update_status), its(:attributes), its(:registered_at), its(:attachments), its(:tags), its(:health_status)
1243
1252
  ## <a name="ecs_service">ecs_service</a>
1244
1253
 
1245
1254
  ECS Service resource type.
@@ -1261,7 +1270,7 @@ describe ecs_service('my-ecs-service') do
1261
1270
  end
1262
1271
  ```
1263
1272
 
1264
- ### its(:service_arn), its(:service_name), its(:cluster_arn), its(:load_balancers), its(:service_registries), its(:status), its(:desired_count), its(:running_count), its(:pending_count), its(:launch_type), its(:capacity_provider_strategy), its(:platform_version), its(:task_definition), its(:task_sets), its(:role_arn), its(:created_at), its(:placement_constraints), its(:placement_strategy), its(:network_configuration), its(:health_check_grace_period_seconds), its(:scheduling_strategy), its(:deployment_controller), its(:tags), its(:created_by), its(:enable_ecs_managed_tags), its(:propagate_tags), its(:enable_execute_command)
1273
+ ### its(:service_arn), its(:service_name), its(:cluster_arn), its(:load_balancers), its(:service_registries), its(:status), its(:desired_count), its(:running_count), its(:pending_count), its(:launch_type), its(:capacity_provider_strategy), its(:platform_version), its(:platform_family), its(:task_definition), its(:task_sets), its(:role_arn), its(:created_at), its(:placement_constraints), its(:placement_strategy), its(:network_configuration), its(:health_check_grace_period_seconds), its(:scheduling_strategy), its(:deployment_controller), its(:tags), its(:created_by), its(:enable_ecs_managed_tags), its(:propagate_tags), its(:enable_execute_command)
1265
1274
  ## <a name="ecs_task_definition">ecs_task_definition</a>
1266
1275
 
1267
1276
  ECS Task Definition resource type.
@@ -1283,7 +1292,7 @@ describe ecs_task_definition('my-ecs-task-definition') do
1283
1292
  end
1284
1293
  ```
1285
1294
 
1286
- ### its(:task_definition_arn), its(:family), its(:task_role_arn), its(:execution_role_arn), its(:network_mode), its(:revision), its(:volumes), its(:status), its(:requires_attributes), its(:placement_constraints), its(:compatibilities), its(:requires_compatibilities), its(:cpu), its(:memory), its(:inference_accelerators), its(:pid_mode), its(:ipc_mode), its(:proxy_configuration), its(:registered_at), its(:deregistered_at), its(:registered_by), its(:ephemeral_storage)
1295
+ ### its(:task_definition_arn), its(:family), its(:task_role_arn), its(:execution_role_arn), its(:network_mode), its(:revision), its(:volumes), its(:status), its(:requires_attributes), its(:placement_constraints), its(:compatibilities), its(:runtime_platform), its(:requires_compatibilities), its(:cpu), its(:memory), its(:inference_accelerators), its(:pid_mode), its(:ipc_mode), its(:proxy_configuration), its(:registered_at), its(:deregistered_at), its(:registered_by), its(:ephemeral_storage)
1287
1296
  ## <a name="efs">efs</a>
1288
1297
 
1289
1298
  EFS resource type.
@@ -1357,7 +1366,7 @@ describe eks('my-eks') do
1357
1366
  end
1358
1367
  ```
1359
1368
 
1360
- ### its(:name), its(:arn), its(:created_at), its(:version), its(:endpoint), its(:role_arn), its(:kubernetes_network_config), its(:logging), its(:identity), its(:status), its(:client_request_token), its(:platform_version), its(:tags), its(:encryption_config)
1369
+ ### its(:name), its(:arn), its(:created_at), its(:version), its(:endpoint), its(:role_arn), its(:kubernetes_network_config), its(:logging), its(:identity), its(:status), its(:client_request_token), its(:platform_version), its(:tags), its(:encryption_config), its(:connector_config)
1361
1370
  ## <a name="eks_nodegroup">eks_nodegroup</a>
1362
1371
 
1363
1372
  EksNodegroup resource type.
@@ -1370,9 +1379,53 @@ describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
1370
1379
  end
1371
1380
  ```
1372
1381
 
1382
+
1373
1383
  ### be_active, be_inactive
1374
1384
 
1375
- ### its(:nodegroup_name), its(:nodegroup_arn), its(:cluster_name), its(:version), its(:release_version), its(:created_at), its(:modified_at), its(:status), its(:capacity_type), its(:scaling_config), its(:instance_types), its(:subnets), its(:remote_access), its(:ami_type), its(:node_role), its(:labels), its(:taints), its(:resources), its(:disk_size), its(:health), its(:update_config), its(:launch_template), its(:tags)
1385
+ ### be_ready
1386
+
1387
+ This matcher *might* not be exactly you are expecting: it is different from what
1388
+ you can see when looking at the AWS console at the Node Groups configuration
1389
+ and check if the nodes Status is "Ready".
1390
+
1391
+ What you seeing over there is
1392
+ [actually the same thing](https://aws.amazon.com/premiumsupport/knowledge-center/eks-node-status-ready/)
1393
+ you would if using `kubectl`.
1394
+
1395
+ This matcher cannot do the same because it would involve using the Kubernetes
1396
+ API: the AWS Ruby SDK currently doesn't expose this information.
1397
+
1398
+ What you can get from `be_ready` matcher is asserting that you have **at least**
1399
+ the number of EC2 instances (the nodes in your EKS Node Group) are actually
1400
+ in running state. It doesn't mean everything is fine, the node (EC2 instance)
1401
+ can be running but without communication with the cluster or any order issue
1402
+ regarding the Kubernetes configuration.
1403
+
1404
+ Although it might look an incomplete assertion, definitely the Node Group
1405
+ "Status" won't be "Active" if the EC2 instances associated with it are not
1406
+ running.
1407
+
1408
+ So, using this assertion like the sample below:
1409
+
1410
+ ```ruby
1411
+ describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
1412
+ it { should be_ready }
1413
+ end
1414
+ ```
1415
+
1416
+ Will pass if at least the minimum expected (see `scaling_config`) number of EC2
1417
+ instances are running.
1418
+
1419
+ ### have_security_group
1420
+
1421
+ ```ruby
1422
+ describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
1423
+ it { should have_security_group('sg-1a2b3cd4') }
1424
+ end
1425
+ ```
1426
+
1427
+
1428
+ ### its(:nodegroup_name), its(:nodegroup_arn), its(:cluster_name), its(:version), its(:release_version), its(:created_at), its(:modified_at), its(:status), its(:capacity_type), its(:instance_types), its(:subnets), its(:remote_access), its(:ami_type), its(:node_role), its(:labels), its(:taints), its(:resources), its(:disk_size), its(:health), its(:update_config), its(:launch_template), its(:tags)
1376
1429
  ## <a name="elasticache">elasticache</a>
1377
1430
 
1378
1431
  Elasticache resource type.
@@ -2100,7 +2153,7 @@ describe kinesis('my-kinesis') do
2100
2153
  end
2101
2154
  ```
2102
2155
 
2103
- ### its(:stream_name), its(:stream_arn), its(:stream_status), its(:retention_period_hours), its(:stream_creation_timestamp), its(:encryption_type), its(:key_id), its(:open_shard_count), its(:consumer_count)
2156
+ ### its(:stream_name), its(:stream_arn), its(:stream_status), its(:stream_mode_details), its(:retention_period_hours), its(:stream_creation_timestamp), its(:encryption_type), its(:key_id), its(:open_shard_count), its(:consumer_count)
2104
2157
  ## <a name="kms">kms</a>
2105
2158
 
2106
2159
  Kms resource type.
@@ -2178,7 +2231,7 @@ DOC
2178
2231
  end
2179
2232
  ```
2180
2233
 
2181
- ### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:encryption_algorithms), its(:signing_algorithms), its(:multi_region), its(:multi_region_configuration), its(:pending_deletion_window_in_days)
2234
+ ### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:key_spec), its(:encryption_algorithms), its(:signing_algorithms), its(:multi_region), its(:multi_region_configuration), its(:pending_deletion_window_in_days)
2182
2235
  ## <a name="lambda">lambda</a>
2183
2236
 
2184
2237
  Lambda resource type.
@@ -2227,7 +2280,7 @@ end
2227
2280
 
2228
2281
  This matcher does not support Amazon S3 event sources ([see SDK doc](http://docs.aws.amazon.com/sdkforruby/api/Aws/Lambda/Client.html#list_event_source_mappings-instance_method)).
2229
2282
 
2230
- ### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:kms_key_arn), its(:master_arn), its(:revision_id), its(:layers), its(:state), its(:state_reason), its(:state_reason_code), its(:last_update_status), its(:last_update_status_reason), its(:last_update_status_reason_code), its(:file_system_configs), its(:package_type), its(:image_config_response), its(:signing_profile_version_arn), its(:signing_job_arn)
2283
+ ### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:kms_key_arn), its(:master_arn), its(:revision_id), its(:layers), its(:state), its(:state_reason), its(:state_reason_code), its(:last_update_status), its(:last_update_status_reason), its(:last_update_status_reason_code), its(:file_system_configs), its(:package_type), its(:image_config_response), its(:signing_profile_version_arn), its(:signing_job_arn), its(:architectures)
2231
2284
  ## <a name="launch_configuration">launch_configuration</a>
2232
2285
 
2233
2286
  LaunchConfiguration resource type.
@@ -2373,7 +2426,7 @@ end
2373
2426
 
2374
2427
  ### be_updating
2375
2428
 
2376
- ### its(:active_operation_arn), its(:client_authentication), its(:cluster_arn), its(:cluster_name), its(:creation_time), its(:current_version), its(:enhanced_monitoring), its(:number_of_broker_nodes), its(:state), its(:zookeeper_connect_string), its(:zookeeper_connect_string_tls)
2429
+ ### its(:active_operation_arn), its(:client_authentication), its(:cluster_arn), its(:cluster_name), its(:creation_time), its(:current_version), its(:enhanced_monitoring), its(:number_of_broker_nodes), its(:state), its(:state_info), its(:zookeeper_connect_string), its(:zookeeper_connect_string_tls)
2377
2430
  ## <a name="nat_gateway">nat_gateway</a>
2378
2431
 
2379
2432
  NatGateway resource type.
@@ -2573,7 +2626,7 @@ describe network_interface('eni-12ab3cde') do
2573
2626
  end
2574
2627
  ```
2575
2628
 
2576
- ### its(:association), its(:availability_zone), its(:description), its(:interface_type), its(:ipv_6_addresses), its(:mac_address), its(:network_interface_id), its(:outpost_arn), its(:owner_id), its(:private_dns_name), its(:private_ip_address), its(:requester_id), its(:requester_managed), its(:source_dest_check), its(:status), its(:subnet_id), its(:vpc_id)
2629
+ ### its(:association), its(:availability_zone), its(:description), its(:interface_type), its(:ipv_6_addresses), its(:mac_address), its(:network_interface_id), its(:outpost_arn), its(:owner_id), its(:private_dns_name), its(:private_ip_address), its(:ipv_4_prefixes), its(:ipv_6_prefixes), its(:requester_id), its(:requester_managed), its(:source_dest_check), its(:status), its(:subnet_id), its(:vpc_id), its(:deny_all_igw_traffic), its(:ipv_6_native), its(:ipv_6_address)
2577
2630
  ## <a name="nlb">nlb</a>
2578
2631
 
2579
2632
  NLB resource type.
@@ -2704,7 +2757,7 @@ end
2704
2757
  ```
2705
2758
 
2706
2759
 
2707
- ### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_enabled), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns), its(:target_type), its(:protocol_version)
2760
+ ### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_enabled), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns), its(:target_type), its(:protocol_version), its(:ip_address_type)
2708
2761
  ## <a name="rds">rds</a>
2709
2762
 
2710
2763
  RDS resource type.
@@ -2801,7 +2854,7 @@ end
2801
2854
  ```
2802
2855
 
2803
2856
 
2804
- ### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:activity_stream_mode), its(:activity_stream_engine_native_audit_fields_included)
2857
+ ### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:automatic_restart_time), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:activity_stream_mode), its(:activity_stream_engine_native_audit_fields_included), its(:automation_mode), its(:resume_full_automation_mode_time), its(:custom_iam_instance_profile), its(:backup_target)
2805
2858
  ### :unlock: Advanced use
2806
2859
 
2807
2860
  `rds` can use `Aws::RDS::DBInstance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/RDS/DBInstance.html).
@@ -2933,7 +2986,7 @@ describe redshift('my-redshift') do
2933
2986
  end
2934
2987
  ```
2935
2988
 
2936
- ### its(:vpc_id), its(:cluster_identifier), its(:node_type), its(:cluster_status), its(:cluster_availability_status), its(:modify_status), its(:master_username), its(:db_name), its(:endpoint), its(:cluster_create_time), its(:automated_snapshot_retention_period), its(:manual_snapshot_retention_period), its(:cluster_security_groups), its(:cluster_subnet_group_name), its(:vpc_id), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:cluster_version), its(:allow_version_upgrade), its(:number_of_nodes), its(:publicly_accessible), its(:encrypted), its(:restore_status), its(:data_transfer_progress), its(:hsm_status), its(:cluster_snapshot_copy_status), its(:cluster_public_key), its(:cluster_nodes), its(:elastic_ip_status), its(:cluster_revision_number), its(:kms_key_id), its(:enhanced_vpc_routing), its(:iam_roles), its(:pending_actions), its(:maintenance_track_name), its(:elastic_resize_number_of_node_options), its(:deferred_maintenance_windows), its(:snapshot_schedule_identifier), its(:snapshot_schedule_state), its(:expected_next_snapshot_schedule_time), its(:expected_next_snapshot_schedule_time_status), its(:next_maintenance_window_start_time), its(:resize_info), its(:availability_zone_relocation_status), its(:cluster_namespace_arn), its(:total_storage_capacity_in_mega_bytes), its(:aqua_configuration)
2989
+ ### its(:vpc_id), its(:cluster_identifier), its(:node_type), its(:cluster_status), its(:cluster_availability_status), its(:modify_status), its(:master_username), its(:db_name), its(:endpoint), its(:cluster_create_time), its(:automated_snapshot_retention_period), its(:manual_snapshot_retention_period), its(:cluster_security_groups), its(:cluster_subnet_group_name), its(:vpc_id), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:cluster_version), its(:allow_version_upgrade), its(:number_of_nodes), its(:publicly_accessible), its(:encrypted), its(:restore_status), its(:data_transfer_progress), its(:hsm_status), its(:cluster_snapshot_copy_status), its(:cluster_public_key), its(:cluster_nodes), its(:elastic_ip_status), its(:cluster_revision_number), its(:kms_key_id), its(:enhanced_vpc_routing), its(:iam_roles), its(:pending_actions), its(:maintenance_track_name), its(:elastic_resize_number_of_node_options), its(:deferred_maintenance_windows), its(:snapshot_schedule_identifier), its(:snapshot_schedule_state), its(:expected_next_snapshot_schedule_time), its(:expected_next_snapshot_schedule_time_status), its(:next_maintenance_window_start_time), its(:resize_info), its(:availability_zone_relocation_status), its(:cluster_namespace_arn), its(:total_storage_capacity_in_mega_bytes), its(:aqua_configuration), its(:default_iam_role_arn), its(:reserved_node_exchange_status)
2937
2990
  ## <a name="redshift_cluster_parameter_group">redshift_cluster_parameter_group</a>
2938
2991
 
2939
2992
  RedshiftClusterParameterGroup resource type.
@@ -3515,7 +3568,7 @@ end
3515
3568
  ```
3516
3569
 
3517
3570
 
3518
- ### its(:availability_zone), its(:availability_zone_id), its(:available_ip_address_count), its(:cidr_block), its(:default_for_az), its(:map_public_ip_on_launch), its(:map_customer_owned_ip_on_launch), its(:customer_owned_ipv_4_pool), its(:state), its(:subnet_id), its(:vpc_id), its(:owner_id), its(:assign_ipv_6_address_on_creation), its(:ipv_6_cidr_block_association_set), its(:subnet_arn), its(:outpost_arn)
3571
+
3519
3572
  ### :unlock: Advanced use
3520
3573
 
3521
3574
  `subnet` can use `Aws::EC2::Subnet` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Subnet.html).
@@ -3781,7 +3834,7 @@ end
3781
3834
  ```
3782
3835
 
3783
3836
 
3784
- ### its(:customer_gateway_configuration), its(:customer_gateway_id), its(:category), its(:state), its(:type), its(:vpn_connection_id), its(:vpn_gateway_id), its(:transit_gateway_id), its(:options), its(:routes), its(:vgw_telemetry)
3837
+ ### its(:customer_gateway_configuration), its(:customer_gateway_id), its(:category), its(:state), its(:type), its(:vpn_connection_id), its(:vpn_gateway_id), its(:transit_gateway_id), its(:core_network_arn), its(:core_network_attachment_arn), its(:gateway_association_state), its(:options), its(:routes), its(:vgw_telemetry)
3785
3838
  ## <a name="vpn_gateway">vpn_gateway</a>
3786
3839
 
3787
3840
  VpnGateway resource type.
data/exe/awspec CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'awspec'
4
5
 
data/lib/awspec/cli.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thor'
2
4
  require 'awspec/setup'
3
5
  require 'awspec/command/generate'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thor'
2
4
  require 'awspec/setup'
3
5
 
@@ -7,13 +9,13 @@ module Awspec
7
9
  class_option :region
8
10
  class_option :secrets_path
9
11
 
10
- types = %w(
12
+ types = %w[
11
13
  vpc ec2 rds security_group elb network_acl route_table subnet nat_gateway network_interface alb nlb
12
14
  internet_gateway autoscaling_group alb_listener nlb_listener redshift
13
- )
15
+ ]
14
16
 
15
17
  types.each do |type|
16
- desc type + ' [vpc_id]', "Generate #{type} spec from VPC ID (or VPC \"Name\" tag)"
18
+ desc "#{type} [vpc_id]", "Generate #{type} spec from VPC ID (or VPC \"Name\" tag)"
17
19
  define_method type do |_vpc_id|
18
20
  Awsecrets.load(profile: options[:profile], region: options[:region], secrets_path: options[:secrets_path])
19
21
  eval "puts Awspec::Generator::Spec::#{type.camelize}.new.generate_by_vpc_id(_vpc_id)"
@@ -36,26 +38,26 @@ module Awspec
36
38
  end
37
39
  end
38
40
 
39
- types = %w(
41
+ types = %w[
40
42
  rds_db_parameter_group rds_db_cluster_parameter_group redshift_cluster_parameter_group
41
- )
43
+ ]
42
44
 
43
45
  types.each do |type|
44
- desc type + ' [parameter_group_name]', "Generate #{type} spec from parameter group name."
46
+ desc "#{type} [parameter_group_name]", "Generate #{type} spec from parameter group name."
45
47
  define_method type do |_parameter_group_name|
46
48
  Awsecrets.load(profile: options[:profile], region: options[:region], secrets_path: options[:secrets_path])
47
49
  eval "puts Awspec::Generator::Spec::#{type.camelize}.new.generate_by_parameter_group(_parameter_group_name)"
48
50
  end
49
51
  end
50
52
 
51
- types_for_generate_all = %w(
53
+ types_for_generate_all = %w[
52
54
  cloudwatch_alarm cloudwatch_event directconnect ebs efs
53
55
  elasticsearch iam_group iam_policy iam_role iam_user kms lambda
54
56
  acm cloudwatch_logs eip codebuild elasticache
55
- )
57
+ ]
56
58
 
57
59
  types_for_generate_all.each do |type|
58
- if %w(iam_policy ebs).include?(type)
60
+ if %w[iam_policy ebs].include?(type)
59
61
  desc type, "Generate attached #{type} spec"
60
62
  else
61
63
  desc type, "Generate #{type} spec"
data/lib/awspec/config.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'singleton'
2
4
 
3
5
  require 'awspec/error'
data/lib/awspec/error.rb CHANGED
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec
2
4
  class DuplicatedResourceTypeError < StandardError
3
5
  end
6
+
4
7
  class InvalidAccountError < StandardError
5
8
  end
9
+
6
10
  ##
7
11
  # The exception when sending message to a unavailable AWS resource.
8
12
  #
@@ -1,8 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Array
2
4
  def single_resource(id = nil)
3
- if self.count > 1
5
+ if count > 1
4
6
  raise Awspec::DuplicatedResourceTypeError, "Duplicated resource type #{id}"
5
7
  end
6
- self.first if self.count == 1
8
+
9
+ first if count == 1
7
10
  end
8
11
  end
@@ -1,8 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Hash
2
4
  def to_struct
3
- st = Struct.new(*self.keys)
4
- maps = self.values.map do |s|
5
+ st = Struct.new(*keys)
6
+ maps = values.map do |s|
5
7
  next s.to_struct if s.is_a?(Hash)
8
+
6
9
  s
7
10
  end
8
11
  st.new(*maps)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class String
2
4
  def camelize
3
5
  Dry::Inflector.new.camelize(self)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Struct
2
4
  def tag_name
3
5
  tag = self[:tags].find do |t|
data/lib/awspec/ext.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'awspec/ext/array'
2
4
  require 'awspec/ext/hash'
3
5
  require 'awspec/ext/string'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -18,7 +20,7 @@ module Awspec::Generator
18
20
  end
19
21
 
20
22
  def account_spec_template
21
- template = <<-'EOF'
23
+ <<-'EOF'
22
24
  describe account do
23
25
  <% @ret.members.each do |key| %>
24
26
  <%- if @ret[key].is_a?(String) -%>
@@ -41,11 +43,10 @@ describe account do
41
43
  <%- end -%>
42
44
  end
43
45
  EOF
44
- template
45
46
  end
46
47
 
47
48
  def doc_template
48
- template = <<-'EOF'
49
+ <<-'EOF'
49
50
  ## <a name="<%= @type_name.gsub(/ /, '_').underscore %>"><%= @type_name.gsub(/ /, '_').underscore %></a>
50
51
 
51
52
  <%= @type_name %> resource type.
@@ -63,7 +64,6 @@ EOF
63
64
  ### :unlock: Advanced use
64
65
  <%= @descriptions['advanced'] %><%- end -%>
65
66
  EOF
66
- template
67
67
  end
68
68
  end
69
69
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -18,7 +20,7 @@ module Awspec::Generator
18
20
  end
19
21
 
20
22
  def account_attribute_spec_template
21
- template = <<-'EOF'
23
+ <<-'EOF'
22
24
  <% @ret.members.each do |key| %>
23
25
  <%- next if @ret[key].is_a?(String) -%>
24
26
  describe account_attribute('<%= key %>') do
@@ -39,11 +41,10 @@ end
39
41
  <%= ' ' %>
40
42
  <% end %>
41
43
  EOF
42
- template
43
44
  end
44
45
 
45
46
  def doc_template
46
- template = <<-'EOF'
47
+ <<-'EOF'
47
48
  ## <a name="<%= @type_name.gsub(/ /, '_').underscore %>"><%= @type_name.gsub(/ /, '_').underscore %></a>
48
49
 
49
50
  <%= @type_name %> resource type.
@@ -61,7 +62,6 @@ EOF
61
62
  ### :unlock: Advanced use
62
63
  <%= @descriptions['advanced'] %><%- end -%>
63
64
  EOF
64
- template
65
65
  end
66
66
  end
67
67
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -8,7 +10,7 @@ module Awspec::Generator
8
10
  end
9
11
 
10
12
  def doc_template
11
- template = <<-'EOF'
13
+ <<-'EOF'
12
14
  ## <a name="<%= @type_name.gsub(/ /, '_').underscore %>"><%= @type_name.gsub(/ /, '_').underscore %></a>
13
15
 
14
16
  <%= @type_name %> account attributes.
@@ -24,7 +26,6 @@ module Awspec::Generator
24
26
  <%= @descriptions['advanced'] %><%- end -%>
25
27
 
26
28
  EOF
27
- template
28
29
  end
29
30
  end
30
31
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -8,9 +10,9 @@ module Awspec::Generator
8
10
  @type = Awspec::Type::Acm.new('example.jp')
9
11
  @ret = @type.resource_via_client
10
12
  @matchers = [
11
- Awspec::Type::Acm::STATUSES.map { |status| 'be_' + status.downcase }.join(', ')
13
+ Awspec::Type::Acm::STATUSES.map { |status| "be_#{status.downcase}" }.join(', ')
12
14
  ]
13
- @ignore_matchers = Awspec::Type::Acm::STATUSES.map { |status| 'be_' + status.downcase }
15
+ @ignore_matchers = Awspec::Type::Acm::STATUSES.map { |status| "be_#{status.downcase}" }
14
16
  @describes = []
15
17
  end
16
18
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -8,11 +10,11 @@ module Awspec::Generator
8
10
  @type = Awspec::Type::Alb.new('my-alb')
9
11
  @ret = @type.resource_via_client
10
12
  @matchers = [
11
- Awspec::Type::Alb::STATES.map { |state| 'be_' + state }.join(', '),
12
- 'belong_to_vpc',
13
+ Awspec::Type::Alb::STATES.map { |state| "be_#{state}" }.join(', '),
14
+ 'belong_to_vpc'
13
15
  # 'have_tag'
14
16
  ]
15
- @ignore_matchers = Awspec::Type::Alb::STATES.map { |state| 'be_' + state }
17
+ @ignore_matchers = Awspec::Type::Alb::STATES.map { |state| "be_#{state}" }
16
18
  @describes = []
17
19
  end
18
20
  end
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
4
6
  class AlbListener < Base
5
- # rubocop:disable Metrics/LineLength
7
+ # rubocop:disable Layout/LineLength
6
8
  def initialize
7
9
  super
8
10
  @type_name = 'AlbListener'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -7,7 +9,7 @@ module Awspec::Generator
7
9
  @type_name = 'AlbTargetGroup'
8
10
  @type = Awspec::Type::AlbTargetGroup.new('my-alb-target-group')
9
11
  @ret = @type.resource_via_client
10
- @matchers = %w(belong_to_alb belong_to_vpc)
12
+ @matchers = %w[belong_to_alb belong_to_vpc]
11
13
  @ignore_matchers = []
12
14
  @describes = []
13
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -8,9 +10,9 @@ module Awspec::Generator
8
10
  @type = Awspec::Type::Ami.new('my-ami')
9
11
  @ret = @type.resource_via_client
10
12
  @matchers = [
11
- Awspec::Type::Ami::STATES.map { |state| 'be_' + state }.join(', ')
13
+ Awspec::Type::Ami::STATES.map { |state| "be_#{state}" }.join(', ')
12
14
  ]
13
- @ignore_matchers = Awspec::Type::Ami::STATES.map { |state| 'be_' + state.tr('-', '_') }
15
+ @ignore_matchers = Awspec::Type::Ami::STATES.map { |state| "be_#{state.tr('-', '_')}" }
14
16
  @describes = []
15
17
  end
16
18
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Awspec::Generator
2
4
  module Doc
3
5
  module Type