awspec 1.25.0 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +8 -9
  3. data/.rubocop.yml +66 -62
  4. data/Gemfile +3 -1
  5. data/Rakefile +19 -4
  6. data/awspec.gemspec +5 -2
  7. data/bin/console +1 -0
  8. data/bin/toolbox +1 -0
  9. data/doc/_resource_types/transfer_server.md +23 -0
  10. data/doc/resource_types.md +57 -25
  11. data/exe/awspec +1 -0
  12. data/lib/awspec/cli.rb +2 -0
  13. data/lib/awspec/command/generate.rb +11 -9
  14. data/lib/awspec/config.rb +2 -0
  15. data/lib/awspec/error.rb +4 -0
  16. data/lib/awspec/ext/array.rb +5 -2
  17. data/lib/awspec/ext/hash.rb +5 -2
  18. data/lib/awspec/ext/string.rb +2 -0
  19. data/lib/awspec/ext/struct.rb +2 -0
  20. data/lib/awspec/ext.rb +2 -0
  21. data/lib/awspec/generator/doc/type/account.rb +4 -4
  22. data/lib/awspec/generator/doc/type/account_attribute.rb +4 -4
  23. data/lib/awspec/generator/doc/type/account_attribute_base.rb +3 -2
  24. data/lib/awspec/generator/doc/type/acm.rb +4 -2
  25. data/lib/awspec/generator/doc/type/alb.rb +5 -3
  26. data/lib/awspec/generator/doc/type/alb_listener.rb +3 -1
  27. data/lib/awspec/generator/doc/type/alb_target_group.rb +3 -1
  28. data/lib/awspec/generator/doc/type/ami.rb +4 -2
  29. data/lib/awspec/generator/doc/type/apigateway.rb +2 -0
  30. data/lib/awspec/generator/doc/type/autoscaling_group.rb +2 -0
  31. data/lib/awspec/generator/doc/type/base.rb +11 -8
  32. data/lib/awspec/generator/doc/type/batch_compute_environment.rb +6 -4
  33. data/lib/awspec/generator/doc/type/batch_job_definition.rb +2 -0
  34. data/lib/awspec/generator/doc/type/batch_job_queue.rb +2 -0
  35. data/lib/awspec/generator/doc/type/cloudformation_stack.rb +2 -0
  36. data/lib/awspec/generator/doc/type/cloudfront_distribution.rb +4 -2
  37. data/lib/awspec/generator/doc/type/cloudtrail.rb +2 -0
  38. data/lib/awspec/generator/doc/type/cloudwatch_alarm.rb +3 -1
  39. data/lib/awspec/generator/doc/type/cloudwatch_event.rb +2 -0
  40. data/lib/awspec/generator/doc/type/cloudwatch_logs.rb +2 -0
  41. data/lib/awspec/generator/doc/type/codebuild.rb +2 -0
  42. data/lib/awspec/generator/doc/type/codedeploy.rb +2 -0
  43. data/lib/awspec/generator/doc/type/codedeploy_deployment_group.rb +2 -0
  44. data/lib/awspec/generator/doc/type/cognito_identity_pool.rb +2 -0
  45. data/lib/awspec/generator/doc/type/cognito_user_pool.rb +2 -0
  46. data/lib/awspec/generator/doc/type/customer_gateway.rb +4 -2
  47. data/lib/awspec/generator/doc/type/directconnect_virtual_interface.rb +4 -2
  48. data/lib/awspec/generator/doc/type/dynamodb_table.rb +4 -2
  49. data/lib/awspec/generator/doc/type/ebs.rb +4 -2
  50. data/lib/awspec/generator/doc/type/ec2.rb +4 -2
  51. data/lib/awspec/generator/doc/type/ec2_account_attributes.rb +2 -0
  52. data/lib/awspec/generator/doc/type/ecr_repository.rb +2 -0
  53. data/lib/awspec/generator/doc/type/ecs_cluster.rb +4 -2
  54. data/lib/awspec/generator/doc/type/ecs_container_instance.rb +4 -2
  55. data/lib/awspec/generator/doc/type/ecs_service.rb +4 -2
  56. data/lib/awspec/generator/doc/type/ecs_task_definition.rb +4 -2
  57. data/lib/awspec/generator/doc/type/efs.rb +2 -0
  58. data/lib/awspec/generator/doc/type/eip.rb +2 -0
  59. data/lib/awspec/generator/doc/type/eks.rb +4 -2
  60. data/lib/awspec/generator/doc/type/eks_nodegroup.rb +4 -2
  61. data/lib/awspec/generator/doc/type/elasticache.rb +4 -2
  62. data/lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb +2 -0
  63. data/lib/awspec/generator/doc/type/elasticsearch.rb +2 -0
  64. data/lib/awspec/generator/doc/type/elastictranscoder_pipeline.rb +4 -2
  65. data/lib/awspec/generator/doc/type/elb.rb +5 -3
  66. data/lib/awspec/generator/doc/type/emr.rb +4 -2
  67. data/lib/awspec/generator/doc/type/firehose.rb +2 -0
  68. data/lib/awspec/generator/doc/type/iam_group.rb +3 -1
  69. data/lib/awspec/generator/doc/type/iam_policy.rb +2 -0
  70. data/lib/awspec/generator/doc/type/iam_role.rb +3 -1
  71. data/lib/awspec/generator/doc/type/iam_user.rb +3 -1
  72. data/lib/awspec/generator/doc/type/internet_gateway.rb +2 -0
  73. data/lib/awspec/generator/doc/type/kinesis.rb +2 -0
  74. data/lib/awspec/generator/doc/type/kms.rb +2 -0
  75. data/lib/awspec/generator/doc/type/lambda.rb +3 -1
  76. data/lib/awspec/generator/doc/type/lambda_account_settings.rb +2 -0
  77. data/lib/awspec/generator/doc/type/launch_configuration.rb +2 -0
  78. data/lib/awspec/generator/doc/type/launch_template.rb +2 -0
  79. data/lib/awspec/generator/doc/type/mq.rb +5 -3
  80. data/lib/awspec/generator/doc/type/msk.rb +2 -0
  81. data/lib/awspec/generator/doc/type/nat_gateway.rb +4 -2
  82. data/lib/awspec/generator/doc/type/network_acl.rb +4 -2
  83. data/lib/awspec/generator/doc/type/network_interface.rb +4 -2
  84. data/lib/awspec/generator/doc/type/nlb.rb +4 -2
  85. data/lib/awspec/generator/doc/type/nlb_listener.rb +3 -1
  86. data/lib/awspec/generator/doc/type/nlb_target_group.rb +3 -1
  87. data/lib/awspec/generator/doc/type/rds.rb +5 -3
  88. data/lib/awspec/generator/doc/type/rds_account_attributes.rb +2 -0
  89. data/lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb +2 -0
  90. data/lib/awspec/generator/doc/type/rds_db_parameter_group.rb +2 -0
  91. data/lib/awspec/generator/doc/type/redshift.rb +5 -3
  92. data/lib/awspec/generator/doc/type/redshift_cluster_parameter_group.rb +2 -0
  93. data/lib/awspec/generator/doc/type/route53_hosted_zone.rb +2 -0
  94. data/lib/awspec/generator/doc/type/route_table.rb +2 -0
  95. data/lib/awspec/generator/doc/type/s3_bucket.rb +3 -1
  96. data/lib/awspec/generator/doc/type/secretsmanager.rb +2 -0
  97. data/lib/awspec/generator/doc/type/security_group.rb +4 -2
  98. data/lib/awspec/generator/doc/type/ses_identity.rb +4 -2
  99. data/lib/awspec/generator/doc/type/ses_send_quota.rb +2 -0
  100. data/lib/awspec/generator/doc/type/sns_topic.rb +5 -3
  101. data/lib/awspec/generator/doc/type/sqs.rb +2 -0
  102. data/lib/awspec/generator/doc/type/ssm_parameter.rb +2 -0
  103. data/lib/awspec/generator/doc/type/subnet.rb +4 -2
  104. data/lib/awspec/generator/doc/type/transfer_server.rb +21 -0
  105. data/lib/awspec/generator/doc/type/transit_gateway.rb +2 -0
  106. data/lib/awspec/generator/doc/type/vpc.rb +4 -2
  107. data/lib/awspec/generator/doc/type/vpc_endpoints.rb +2 -0
  108. data/lib/awspec/generator/doc/type/vpn_connection.rb +4 -2
  109. data/lib/awspec/generator/doc/type/vpn_gateway.rb +4 -2
  110. data/lib/awspec/generator/doc/type/waf_web_acl.rb +3 -1
  111. data/lib/awspec/generator/doc/type/wafregional_web_acl.rb +3 -1
  112. data/lib/awspec/generator/doc/type.rb +5 -3
  113. data/lib/awspec/generator/spec/acm.rb +4 -2
  114. data/lib/awspec/generator/spec/alb.rb +6 -4
  115. data/lib/awspec/generator/spec/alb_listener.rb +6 -4
  116. data/lib/awspec/generator/spec/autoscaling_group.rb +6 -4
  117. data/lib/awspec/generator/spec/cloudwatch_alarm.rb +4 -2
  118. data/lib/awspec/generator/spec/cloudwatch_event.rb +4 -2
  119. data/lib/awspec/generator/spec/cloudwatch_logs.rb +4 -2
  120. data/lib/awspec/generator/spec/codebuild.rb +4 -2
  121. data/lib/awspec/generator/spec/directconnect.rb +4 -2
  122. data/lib/awspec/generator/spec/ebs.rb +5 -4
  123. data/lib/awspec/generator/spec/ec2.rb +5 -2
  124. data/lib/awspec/generator/spec/efs.rb +4 -2
  125. data/lib/awspec/generator/spec/eip.rb +4 -2
  126. data/lib/awspec/generator/spec/elasticache.rb +5 -2
  127. data/lib/awspec/generator/spec/elasticsearch.rb +4 -2
  128. data/lib/awspec/generator/spec/elb.rb +8 -6
  129. data/lib/awspec/generator/spec/iam_group.rb +4 -2
  130. data/lib/awspec/generator/spec/iam_policy.rb +3 -0
  131. data/lib/awspec/generator/spec/iam_role.rb +4 -2
  132. data/lib/awspec/generator/spec/iam_user.rb +4 -2
  133. data/lib/awspec/generator/spec/internet_gateway.rb +6 -4
  134. data/lib/awspec/generator/spec/kms.rb +4 -2
  135. data/lib/awspec/generator/spec/lambda.rb +4 -2
  136. data/lib/awspec/generator/spec/nat_gateway.rb +6 -4
  137. data/lib/awspec/generator/spec/network_acl.rb +15 -13
  138. data/lib/awspec/generator/spec/network_interface.rb +13 -10
  139. data/lib/awspec/generator/spec/nlb.rb +6 -4
  140. data/lib/awspec/generator/spec/nlb_listener.rb +6 -4
  141. data/lib/awspec/generator/spec/rds.rb +5 -2
  142. data/lib/awspec/generator/spec/rds_db_cluster_parameter_group.rb +3 -2
  143. data/lib/awspec/generator/spec/rds_db_parameter_group.rb +3 -2
  144. data/lib/awspec/generator/spec/redshift.rb +5 -2
  145. data/lib/awspec/generator/spec/redshift_cluster_parameter_group.rb +3 -2
  146. data/lib/awspec/generator/spec/route53_hosted_zone.rb +4 -2
  147. data/lib/awspec/generator/spec/route_table.rb +12 -14
  148. data/lib/awspec/generator/spec/s3_bucket.rb +9 -6
  149. data/lib/awspec/generator/spec/security_group.rb +9 -8
  150. data/lib/awspec/generator/spec/subnet.rb +6 -4
  151. data/lib/awspec/generator/spec/vpc.rb +5 -2
  152. data/lib/awspec/generator/template.rb +17 -15
  153. data/lib/awspec/generator.rb +4 -2
  154. data/lib/awspec/helper/client_wrap.rb +5 -1
  155. data/lib/awspec/helper/color.rb +2 -0
  156. data/lib/awspec/helper/finder/account_attributes.rb +8 -6
  157. data/lib/awspec/helper/finder/acm.rb +4 -0
  158. data/lib/awspec/helper/finder/alb.rb +7 -5
  159. data/lib/awspec/helper/finder/ami.rb +4 -0
  160. data/lib/awspec/helper/finder/apigateway.rb +2 -0
  161. data/lib/awspec/helper/finder/autoscaling.rb +3 -0
  162. data/lib/awspec/helper/finder/batch.rb +2 -0
  163. data/lib/awspec/helper/finder/cloudformation.rb +2 -0
  164. data/lib/awspec/helper/finder/cloudfront.rb +3 -0
  165. data/lib/awspec/helper/finder/cloudtrail.rb +2 -0
  166. data/lib/awspec/helper/finder/cloudwatch.rb +3 -0
  167. data/lib/awspec/helper/finder/cloudwatch_event.rb +2 -0
  168. data/lib/awspec/helper/finder/cloudwatch_logs.rb +10 -5
  169. data/lib/awspec/helper/finder/codebuild.rb +3 -0
  170. data/lib/awspec/helper/finder/codedeploy.rb +2 -0
  171. data/lib/awspec/helper/finder/cognito_identity_pool.rb +2 -0
  172. data/lib/awspec/helper/finder/cognito_user_pool.rb +2 -0
  173. data/lib/awspec/helper/finder/directconnect.rb +2 -0
  174. data/lib/awspec/helper/finder/dynamodb.rb +2 -0
  175. data/lib/awspec/helper/finder/ebs.rb +5 -0
  176. data/lib/awspec/helper/finder/ec2.rb +16 -10
  177. data/lib/awspec/helper/finder/ecr.rb +2 -0
  178. data/lib/awspec/helper/finder/ecs.rb +5 -2
  179. data/lib/awspec/helper/finder/efs.rb +5 -4
  180. data/lib/awspec/helper/finder/eks.rb +2 -0
  181. data/lib/awspec/helper/finder/elasticache.rb +3 -1
  182. data/lib/awspec/helper/finder/elasticsearch.rb +3 -1
  183. data/lib/awspec/helper/finder/elastictranscoder.rb +3 -0
  184. data/lib/awspec/helper/finder/elb.rb +6 -4
  185. data/lib/awspec/helper/finder/emr.rb +2 -0
  186. data/lib/awspec/helper/finder/firehose.rb +2 -0
  187. data/lib/awspec/helper/finder/iam.rb +16 -12
  188. data/lib/awspec/helper/finder/kinesis.rb +2 -0
  189. data/lib/awspec/helper/finder/kms.rb +3 -1
  190. data/lib/awspec/helper/finder/lambda.rb +3 -0
  191. data/lib/awspec/helper/finder/mq.rb +3 -1
  192. data/lib/awspec/helper/finder/msk.rb +2 -0
  193. data/lib/awspec/helper/finder/nlb.rb +11 -8
  194. data/lib/awspec/helper/finder/rds.rb +4 -1
  195. data/lib/awspec/helper/finder/redshift.rb +4 -1
  196. data/lib/awspec/helper/finder/route53.rb +4 -1
  197. data/lib/awspec/helper/finder/s3.rb +4 -2
  198. data/lib/awspec/helper/finder/secretsmanager.rb +2 -0
  199. data/lib/awspec/helper/finder/security_group.rb +2 -0
  200. data/lib/awspec/helper/finder/ses.rb +2 -0
  201. data/lib/awspec/helper/finder/sns_topic.rb +5 -3
  202. data/lib/awspec/helper/finder/sqs.rb +2 -0
  203. data/lib/awspec/helper/finder/ssm_parameter.rb +4 -1
  204. data/lib/awspec/helper/finder/subnet.rb +9 -1
  205. data/lib/awspec/helper/finder/transfer.rb +12 -0
  206. data/lib/awspec/helper/finder/vpc.rb +12 -6
  207. data/lib/awspec/helper/finder/vpc_endpoints.rb +18 -1
  208. data/lib/awspec/helper/finder/waf.rb +5 -0
  209. data/lib/awspec/helper/finder/wafregional.rb +5 -0
  210. data/lib/awspec/helper/finder.rb +7 -2
  211. data/lib/awspec/helper/states.rb +4 -2
  212. data/lib/awspec/helper/type.rb +9 -4
  213. data/lib/awspec/helper.rb +2 -0
  214. data/lib/awspec/matcher/be_allowed.rb +2 -0
  215. data/lib/awspec/matcher/be_allowed_action.rb +2 -0
  216. data/lib/awspec/matcher/be_attached_to.rb +3 -0
  217. data/lib/awspec/matcher/be_connected_to_vpc.rb +2 -0
  218. data/lib/awspec/matcher/be_denied.rb +2 -0
  219. data/lib/awspec/matcher/be_opened.rb +2 -0
  220. data/lib/awspec/matcher/be_opened_only.rb +2 -0
  221. data/lib/awspec/matcher/belong_to_alb.rb +4 -0
  222. data/lib/awspec/matcher/belong_to_cache_subnet_group.rb +2 -0
  223. data/lib/awspec/matcher/belong_to_cluster_subnet_group.rb +2 -0
  224. data/lib/awspec/matcher/belong_to_db_subnet_group.rb +2 -0
  225. data/lib/awspec/matcher/belong_to_domain.rb +2 -0
  226. data/lib/awspec/matcher/belong_to_iam_group.rb +2 -0
  227. data/lib/awspec/matcher/belong_to_metric.rb +2 -0
  228. data/lib/awspec/matcher/belong_to_nlb.rb +4 -0
  229. data/lib/awspec/matcher/belong_to_replication_group.rb +2 -0
  230. data/lib/awspec/matcher/belong_to_subnet.rb +5 -0
  231. data/lib/awspec/matcher/belong_to_subnets.rb +2 -0
  232. data/lib/awspec/matcher/belong_to_vpc.rb +4 -0
  233. data/lib/awspec/matcher/have_attribute_definition.rb +2 -0
  234. data/lib/awspec/matcher/have_cluster_parameter_group.rb +2 -0
  235. data/lib/awspec/matcher/have_custom_response_error_code.rb +3 -2
  236. data/lib/awspec/matcher/have_db_parameter_group.rb +2 -0
  237. data/lib/awspec/matcher/have_env_var.rb +2 -0
  238. data/lib/awspec/matcher/have_env_var_value.rb +2 -0
  239. data/lib/awspec/matcher/have_env_vars.rb +2 -0
  240. data/lib/awspec/matcher/have_inline_policy.rb +2 -0
  241. data/lib/awspec/matcher/have_key_policy.rb +2 -0
  242. data/lib/awspec/matcher/have_key_schema.rb +2 -0
  243. data/lib/awspec/matcher/have_metric_filter.rb +2 -0
  244. data/lib/awspec/matcher/have_network_interface.rb +2 -0
  245. data/lib/awspec/matcher/have_option_group.rb +2 -0
  246. data/lib/awspec/matcher/have_origin.rb +3 -2
  247. data/lib/awspec/matcher/have_private_ip_address.rb +2 -0
  248. data/lib/awspec/matcher/have_record_set.rb +3 -1
  249. data/lib/awspec/matcher/have_route.rb +5 -3
  250. data/lib/awspec/matcher/have_rule.rb +3 -0
  251. data/lib/awspec/matcher/have_subscription_attributes.rb +3 -0
  252. data/lib/awspec/matcher/have_subscription_filter.rb +2 -0
  253. data/lib/awspec/matcher/have_tag.rb +2 -0
  254. data/lib/awspec/matcher/have_vpc_peering_connection.rb +2 -0
  255. data/lib/awspec/matcher/include_subscribed.rb +2 -0
  256. data/lib/awspec/matcher.rb +2 -0
  257. data/lib/awspec/resource_reader.rb +3 -0
  258. data/lib/awspec/setup.rb +7 -5
  259. data/lib/awspec/shared_context.rb +3 -0
  260. data/lib/awspec/stub/account.rb +2 -0
  261. data/lib/awspec/stub/acm.rb +2 -0
  262. data/lib/awspec/stub/alb.rb +3 -1
  263. data/lib/awspec/stub/alb_listener.rb +4 -3
  264. data/lib/awspec/stub/alb_target_group.rb +3 -1
  265. data/lib/awspec/stub/ami.rb +2 -0
  266. data/lib/awspec/stub/apigateway.rb +2 -0
  267. data/lib/awspec/stub/autoscaling_group.rb +6 -4
  268. data/lib/awspec/stub/batch_compute_environment.rb +2 -0
  269. data/lib/awspec/stub/batch_job_definition.rb +2 -0
  270. data/lib/awspec/stub/batch_job_queue.rb +2 -0
  271. data/lib/awspec/stub/cloudformation_stack.rb +4 -2
  272. data/lib/awspec/stub/cloudfront_distribution.rb +6 -4
  273. data/lib/awspec/stub/cloudtrail.rb +2 -0
  274. data/lib/awspec/stub/cloudwatch_logs.rb +2 -0
  275. data/lib/awspec/stub/codebuild.rb +5 -3
  276. data/lib/awspec/stub/codedeploy.rb +2 -0
  277. data/lib/awspec/stub/codedeploy_deployment_group.rb +2 -0
  278. data/lib/awspec/stub/cognito_identity_pool.rb +2 -0
  279. data/lib/awspec/stub/cognito_user_pool.rb +2 -0
  280. data/lib/awspec/stub/directconnect_virtual_interface.rb +2 -0
  281. data/lib/awspec/stub/duplicated_resource_type.rb +2 -0
  282. data/lib/awspec/stub/dynamodb_table.rb +2 -0
  283. data/lib/awspec/stub/ebs.rb +2 -0
  284. data/lib/awspec/stub/ec2.rb +2 -0
  285. data/lib/awspec/stub/ec2_has_multi_security_groups.rb +2 -0
  286. data/lib/awspec/stub/ec2_non_existing.rb +2 -0
  287. data/lib/awspec/stub/ecr_repository.rb +2 -0
  288. data/lib/awspec/stub/ecs.rb +13 -22
  289. data/lib/awspec/stub/ecs_cluster.rb +4 -4
  290. data/lib/awspec/stub/ecs_container_instance.rb +3 -2
  291. data/lib/awspec/stub/ecs_service.rb +4 -4
  292. data/lib/awspec/stub/ecs_task_definition.rb +9 -14
  293. data/lib/awspec/stub/efs.rb +2 -0
  294. data/lib/awspec/stub/eip.rb +2 -0
  295. data/lib/awspec/stub/eks.rb +5 -3
  296. data/lib/awspec/stub/eks_nodegroup.rb +2 -0
  297. data/lib/awspec/stub/elasticache.rb +2 -0
  298. data/lib/awspec/stub/elasticache_cache_parameter_group.rb +2 -0
  299. data/lib/awspec/stub/elasticsearch.rb +2 -0
  300. data/lib/awspec/stub/elastictranscoder_pipeline.rb +2 -0
  301. data/lib/awspec/stub/elb.rb +2 -0
  302. data/lib/awspec/stub/emr.rb +2 -0
  303. data/lib/awspec/stub/firehose.rb +2 -0
  304. data/lib/awspec/stub/iam_group.rb +3 -2
  305. data/lib/awspec/stub/iam_policy.rb +2 -0
  306. data/lib/awspec/stub/iam_role.rb +3 -2
  307. data/lib/awspec/stub/iam_user.rb +3 -2
  308. data/lib/awspec/stub/internet_gateway.rb +2 -0
  309. data/lib/awspec/stub/kinesis.rb +8 -6
  310. data/lib/awspec/stub/kms.rb +2 -0
  311. data/lib/awspec/stub/lambda.rb +2 -0
  312. data/lib/awspec/stub/launch_configuration.rb +2 -0
  313. data/lib/awspec/stub/launch_template.rb +2 -0
  314. data/lib/awspec/stub/mq.rb +5 -3
  315. data/lib/awspec/stub/msk.rb +5 -3
  316. data/lib/awspec/stub/nat_gateway.rb +2 -0
  317. data/lib/awspec/stub/network_acl.rb +2 -0
  318. data/lib/awspec/stub/network_interface.rb +2 -0
  319. data/lib/awspec/stub/nlb.rb +3 -1
  320. data/lib/awspec/stub/nlb_listener.rb +4 -3
  321. data/lib/awspec/stub/nlb_target_group.rb +3 -1
  322. data/lib/awspec/stub/rds.rb +2 -0
  323. data/lib/awspec/stub/rds_db_cluster_parameter_group.rb +2 -0
  324. data/lib/awspec/stub/rds_db_parameter_group.rb +2 -0
  325. data/lib/awspec/stub/redshift.rb +2 -0
  326. data/lib/awspec/stub/redshift_cluster_parameter_group.rb +2 -0
  327. data/lib/awspec/stub/route53_hosted_zone.rb +2 -0
  328. data/lib/awspec/stub/route_table.rb +2 -0
  329. data/lib/awspec/stub/s3_bucket.rb +2 -0
  330. data/lib/awspec/stub/secretsmanager.rb +2 -0
  331. data/lib/awspec/stub/security_group.rb +2 -0
  332. data/lib/awspec/stub/ses_identity.rb +2 -0
  333. data/lib/awspec/stub/sns_topic.rb +3 -1
  334. data/lib/awspec/stub/sns_topic_error.rb +6 -2
  335. data/lib/awspec/stub/sqs.rb +2 -0
  336. data/lib/awspec/stub/ssm_parameter.rb +2 -0
  337. data/lib/awspec/stub/subnet.rb +2 -0
  338. data/lib/awspec/stub/transfer_server.rb +41 -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 +2 -0
  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 +4 -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 +5 -1
  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 +6 -3
  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/transfer_server.rb +28 -0
  431. data/lib/awspec/type/transit_gateway.rb +2 -0
  432. data/lib/awspec/type/vpc.rb +7 -3
  433. data/lib/awspec/type/vpc_endpoints.rb +10 -3
  434. data/lib/awspec/type/vpn_connection.rb +5 -3
  435. data/lib/awspec/type/vpn_gateway.rb +5 -3
  436. data/lib/awspec/type/waf_web_acl.rb +3 -0
  437. data/lib/awspec/type/wafregional_web_acl.rb +3 -0
  438. data/lib/awspec/version.rb +3 -1
  439. data/lib/awspec.rb +2 -0
  440. metadata +35 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5880815a36bbfbccb02df8a4977451509f8f44cbc641a844d07ac1b4d78b40d4
4
- data.tar.gz: d85fa09ae26d042910cbb72faa602db6266dbe370af1e62b9fa06519ce77aa58
3
+ metadata.gz: 2b09fcc32e566dab95cb91a15aeebfc830f78e251faa9d35301cf6f9ee1bdbed
4
+ data.tar.gz: 716542189697ce5194df4fb4ea4089a4a04ab673dd9e55a301e13f5811559dea
5
5
  SHA512:
6
- metadata.gz: 98528081727304b98a323c7469a79bd7876d185def31d3cfcf03b9ebc138df42d6126abe794cdaf00b138289209540b5a96a092ccd37c5482a579da95ae1a78c
7
- data.tar.gz: 014e0bcfe3c67c4da754e2405e8545b0ed8d9544f1f9916f2adacb2c1cf7ec56b8f4d1227062d43ab4c44a942b9fcf1f6538930b84f694522ac2ad16e555a322
6
+ metadata.gz: 74e05e9c7fa42a71b976303d3bca7ce40b4f09a405c90154eef6bca0bb0414b8f0e2f11d1365fa4804b236b5cae9c94c8db2230dba9f6f66c33078655028ffb6
7
+ data.tar.gz: a93291cfbe411970f28e3d51a73bb13b68955194a35f4ac8c51def81ad25ceb9609fe99247024ff6e1212294d6b795e649b59ff65a886ee315e507fd8c31deed
@@ -2,7 +2,8 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches:
6
+ - master
6
7
  pull_request:
7
8
 
8
9
  jobs:
@@ -17,14 +18,12 @@ jobs:
17
18
  - name: Set up Ruby
18
19
  uses: ruby/setup-ruby@v1
19
20
  with:
20
- ruby-version: 2.7
21
+ ruby-version: 3.1
21
22
  bundler-cache: true
22
23
 
23
24
  - name: Run rubocop
24
25
  uses: reviewdog/action-rubocop@v1
25
26
  with:
26
- rubocop_version: 0.57.2
27
- rubocop_extensions: rubocop:0.57.2
28
27
  github_token: ${{ secrets.GITHUB_TOKEN }}
29
28
  reporter: github-pr-review
30
29
  fail_on_error: true
@@ -43,7 +42,8 @@ jobs:
43
42
  - '2.5'
44
43
  - '2.6'
45
44
  - '2.7'
46
- # - '3.0'
45
+ - '3.0'
46
+ - '3.1'
47
47
  runs-on: ubuntu-latest
48
48
  env:
49
49
  DISABLE_AWS_CLIENT_CHECK: true
@@ -58,12 +58,11 @@ jobs:
58
58
  ruby-version: ${{ matrix.ruby-version }}
59
59
  bundler-cache: true
60
60
 
61
- - name: Install xml lib
62
- run: gem install ox
63
- if: matrix.ruby-version == '3.0'
61
+ - name: Show Ruby version
62
+ run: ruby -v
64
63
 
65
64
  - name: Generate document
66
65
  run: bundle exec bin/toolbox docgen > doc/resource_types.md
67
66
 
68
67
  - name: Run tests
69
- run: bundle exec rake spec
68
+ run: bundle exec rake spec:parallel
data/.rubocop.yml CHANGED
@@ -1,35 +1,53 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.1
2
+ SuggestExtensions: false
3
3
 
4
- Layout/IndentHeredoc:
4
+ Layout/ClosingHeredocIndentation:
5
5
  Enabled: false
6
6
 
7
- Layout/MultilineOperationIndentation:
7
+ Layout/HashAlignment:
8
8
  Enabled: false
9
9
 
10
- Layout/MultilineMethodCallBraceLayout:
10
+ Layout/HeredocIndentation:
11
11
  Enabled: false
12
-
13
- Layout/ClosingHeredocIndentation:
12
+
13
+ Gemspec/RequiredRubyVersion:
14
14
  Enabled: false
15
15
 
16
- Layout/SpaceInsideArrayLiteralBrackets:
17
- Enabled: false
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'
18
23
 
19
- Lint/HandleExceptions:
24
+ Lint/ErbNewArguments:
20
25
  Enabled: false
21
26
 
22
- Lint/UselessAssignment:
27
+ Lint/MissingCopEnableDirective:
23
28
  Enabled: false
24
29
 
25
- Lint/DuplicateMethods:
26
- Enabled: false
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'
27
36
 
28
- Lint/MissingCopEnableDirective:
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
+
46
+ Lint/UselessAssignment:
29
47
  Enabled: false
30
48
 
31
49
  Metrics/AbcSize:
32
- Max: 50
50
+ Max: 60
33
51
 
34
52
  Metrics/BlockLength:
35
53
  Max: 60
@@ -38,57 +56,72 @@ Metrics/ClassLength:
38
56
  Max: 130
39
57
 
40
58
  Metrics/CyclomaticComplexity:
41
- Max: 15
42
-
43
- Metrics/LineLength:
44
- Max: 120
59
+ Max: 30
45
60
 
46
61
  Metrics/MethodLength:
47
62
  Max: 30
48
63
 
49
64
  Metrics/ModuleLength:
50
- CountComments: false
51
65
  Max: 200
52
66
 
67
+ Metrics/ParameterLists:
68
+ MaxOptionalParameters: 4
69
+
53
70
  Metrics/PerceivedComplexity:
54
- Max: 15
71
+ Max: 30
55
72
 
56
- Naming/UncommunicativeMethodParamName:
73
+ Naming/HeredocDelimiterNaming:
57
74
  Enabled: false
58
75
 
59
- Naming/PredicateName:
60
- Enabled: false
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'
61
81
 
62
- Naming/HeredocDelimiterNaming:
82
+ Naming/PredicateName:
63
83
  Enabled: false
64
84
 
65
- Performance/StringReplacement:
85
+ Naming/VariableNumber:
66
86
  Enabled: false
67
87
 
68
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:
69
98
  Enabled: false
70
99
 
71
- Style/Alias:
100
+ Style/ClassAndModuleChildren:
72
101
  Enabled: false
73
102
 
74
- Style/BarePercentLiterals:
103
+ Style/Documentation:
75
104
  Enabled: false
76
105
 
77
- Style/BracesAroundHashParameters:
106
+ Style/EvalWithLocation:
78
107
  Enabled: false
79
108
 
80
- Style/ClassAndModuleChildren:
109
+ Style/HashSyntax:
81
110
  Enabled: false
82
111
 
83
- Style/Documentation:
112
+ Style/HashTransformKeys:
84
113
  Enabled: false
85
114
 
86
- Style/MethodMissingSuper:
115
+ Style/IfUnlessModifier:
87
116
  Enabled: false
88
117
 
89
118
  Style/MissingRespondToMissing:
90
119
  Enabled: false
91
120
 
121
+ Style/MixinUsage:
122
+ Exclude:
123
+ - 'lib/awspec/helper.rb'
124
+
92
125
  Style/MutableConstant:
93
126
  Enabled: false
94
127
 
@@ -98,41 +131,12 @@ Style/NumericLiteralPrefix:
98
131
  Style/NumericPredicate:
99
132
  Enabled: false
100
133
 
101
- Style/StabbyLambdaParentheses:
102
- Enabled: false
103
-
104
- Style/PercentLiteralDelimiters:
134
+ Style/SafeNavigation:
105
135
  Enabled: false
106
136
 
107
- Style/RedundantSelf:
137
+ Style/SoleNestedConditional:
108
138
  Enabled: false
109
139
 
110
140
  Style/SymbolProc:
111
141
  Enabled: false
112
142
 
113
- Style/YodaCondition:
114
- Enabled: false
115
-
116
- Style/RescueStandardError:
117
- Enabled: false
118
-
119
- Style/RedundantReturn:
120
- Enabled: false
121
-
122
- Style/ConditionalAssignment:
123
- Enabled: false
124
-
125
- Style/EvalWithLocation:
126
- Enabled: false
127
-
128
- Style/MixinUsage:
129
- Exclude:
130
- - 'lib/awspec/helper.rb'
131
-
132
- Style/StderrPuts:
133
- Exclude:
134
- - 'lib/awspec/generator/template.rb'
135
- - 'lib/awspec/setup.rb'
136
-
137
- Style/IfUnlessModifier:
138
- Enabled: false
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in awspec.gemspec
4
6
  gemspec
5
7
 
6
- # gem 'ox' if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('3.0.0')
8
+ gem 'ox' if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('3.0.0')
data/Rakefile CHANGED
@@ -1,10 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
  begin
4
6
  require 'rspec'
5
7
  require 'rspec/core'
6
8
  require 'rspec/core/rake_task'
7
- require 'octorelease'
9
+ require 'octorelease' unless ENV['CI']
10
+ require 'parallel'
8
11
  require 'rubocop/rake_task'
9
12
  rescue LoadError
10
13
  end
@@ -12,12 +15,24 @@ end
12
15
  require 'awspec'
13
16
 
14
17
  types = Awspec::Helper::Type::TYPES.map do |type|
15
- 'spec:' + type
18
+ "spec:#{type}"
16
19
  end
17
20
 
18
21
  if defined?(RSpec)
19
22
  task spec: 'spec:all'
20
23
  namespace :spec do
24
+ task :parallel do
25
+ Parallel.each(types.concat([
26
+ 'spec:account',
27
+ 'spec:core',
28
+ 'spec:generator_spec',
29
+ 'spec:generator_doc',
30
+ 'spec:helper'
31
+ ])) do |t|
32
+ puts ''
33
+ Rake::Task[t].execute
34
+ end
35
+ end
21
36
  task all: ['spec:type',
22
37
  'spec:account',
23
38
  'spec:core',
@@ -29,7 +44,7 @@ if defined?(RSpec)
29
44
 
30
45
  Awspec::Helper::Type::TYPES.map do |type|
31
46
  RSpec::Core::RakeTask.new(type) do |t|
32
- t.pattern = 'spec/type/' + type + '_spec.rb'
47
+ t.pattern = "spec/type/#{type}_spec.rb"
33
48
  end
34
49
  end
35
50
 
@@ -59,5 +74,5 @@ end
59
74
 
60
75
  task :generate_docs do
61
76
  docs = Awspec::Generator::Doc::Type.generate_doc
62
- File.write('doc/resource_types.md', docs + "\n")
77
+ File.write('doc/resource_types.md', "#{docs}\n")
63
78
  end
data/awspec.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'awspec/version'
@@ -20,8 +22,8 @@ Gem::Specification.new do |spec|
20
22
 
21
23
  spec.required_ruby_version = '>= 2.1'
22
24
  spec.add_runtime_dependency 'addressable'
23
- spec.add_runtime_dependency 'aws-sdk', '~> 3'
24
25
  spec.add_runtime_dependency 'awsecrets', '~> 1'
26
+ spec.add_runtime_dependency 'aws-sdk', '~> 3'
25
27
  spec.add_runtime_dependency 'dry-inflector'
26
28
  spec.add_runtime_dependency 'ipaddress'
27
29
  spec.add_runtime_dependency 'rspec', '~> 3.0'
@@ -30,7 +32,8 @@ Gem::Specification.new do |spec|
30
32
  spec.add_runtime_dependency 'thor'
31
33
  spec.add_development_dependency 'bundler', '>= 1.9', '< 3.0'
32
34
  spec.add_development_dependency 'octorelease'
35
+ spec.add_development_dependency 'parallel'
33
36
  spec.add_development_dependency 'pry'
34
37
  spec.add_development_dependency 'rake', '~> 12.0'
35
- spec.add_development_dependency 'rubocop', '~> 0.57.0'
38
+ spec.add_development_dependency 'rubocop'
36
39
  end
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'awspec'
data/bin/toolbox CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'awspec'
4
5
 
@@ -0,0 +1,23 @@
1
+ ### exist
2
+
3
+ ```ruby
4
+ describe transfer_server('s-4dc0a424f0154fa89') do
5
+ it { should exist }
6
+ end
7
+ ```
8
+
9
+ ### be_offline, be_online, be_starting, be_stopping, be_start_failed, be_stop_failed
10
+
11
+ ```ruby
12
+ describe transfer_server('s-4dc0a424f0154fa89') do
13
+ it { should be_online }
14
+ end
15
+ ```
16
+
17
+ ### have_tag
18
+ ```
19
+ describe transfer_server('s-4dc0a424f0154fa89') do
20
+ it { should have_tag('env').value('dev') }
21
+ end
22
+ ```
23
+