awspec 1.29.2 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/awspec.gemspec +1 -1
- data/doc/_resource_types/managed_prefix_list.md +32 -0
- data/doc/_resource_types/transit_gateway.md +22 -0
- data/doc/resource_types.md +89 -26
- data/lib/awspec/command/generate.rb +1 -1
- data/lib/awspec/generator/doc/type/managed_prefix_list.rb +19 -0
- data/lib/awspec/generator/spec/managed_prefix_list.rb +54 -0
- data/lib/awspec/generator.rb +1 -0
- data/lib/awspec/helper/finder/ec2.rb +12 -0
- data/lib/awspec/helper/finder/ssm_parameter.rb +17 -10
- data/lib/awspec/helper/type.rb +1 -1
- data/lib/awspec/matcher/have_cidr.rb +11 -0
- data/lib/awspec/matcher.rb +3 -0
- data/lib/awspec/stub/managed_prefix_list.rb +41 -0
- data/lib/awspec/stub/ssm_parameter.rb +18 -6
- data/lib/awspec/type/managed_prefix_list.rb +34 -0
- data/lib/awspec/type/transit_gateway.rb +15 -3
- data/lib/awspec/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac4e770831b2f9127704f76b94a1f99d2adb29e18eb243fa9fc32f7834c4486
|
4
|
+
data.tar.gz: '088995fff7e66a7892804df42ecaf10488cd1239763f3ce140a4c25a1dfd98ed'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60535094ab52fc898f50c8a8cc161e63b77faf6e4999efd0eaf9ca9f0a42353c65af944031ac5bdc724d0ac2e68c3c97e732b8f2a6402e4c47e821c33bbbd753
|
7
|
+
data.tar.gz: 93e44185ee31546e493e6cd2302832a725975a368a013377a7a48a6f8c6201e6d7d27be14a5750ec6950ad886f4c3b04b6b7a1c1c0825959667c7157797f6bab
|
data/awspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.required_ruby_version = '>= 2.
|
23
|
+
spec.required_ruby_version = '>= 2.3'
|
24
24
|
spec.add_runtime_dependency 'addressable'
|
25
25
|
spec.add_runtime_dependency 'awsecrets', '~> 1'
|
26
26
|
spec.add_runtime_dependency 'aws-sdk', '~> 3'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
### exist
|
2
|
+
|
3
|
+
```ruby
|
4
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
5
|
+
it { should exist }
|
6
|
+
end
|
7
|
+
```
|
8
|
+
|
9
|
+
### have_cidr
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
13
|
+
it { should have_cidr('10.0.0.0/16') }
|
14
|
+
it { should have_cidr('192.168.0.0/24').desc('dev') }
|
15
|
+
end
|
16
|
+
```
|
17
|
+
|
18
|
+
### its(:entries_count)
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
22
|
+
its(:entries_count) { should eq 2 }
|
23
|
+
end
|
24
|
+
```
|
25
|
+
|
26
|
+
### have_tag
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
30
|
+
it { should have_tag('env').value('dev') }
|
31
|
+
end
|
32
|
+
```
|
@@ -22,3 +22,25 @@ describe transit_gateway('my-tgw') do
|
|
22
22
|
its(:transit_gateway_id) { should eq 'tgw-1234567890abcdefg' }
|
23
23
|
end
|
24
24
|
```
|
25
|
+
### have_attachment
|
26
|
+
|
27
|
+
#### using attachment id
|
28
|
+
```ruby
|
29
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
30
|
+
it { should have_attachment('tgw-attach-1234567890abcdefg') }
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
#### using attachment name
|
35
|
+
```ruby
|
36
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
37
|
+
it { should have_attachment('my-prod-tgw-attachment') }
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
#### using regular expression attachment name
|
42
|
+
```ruby
|
43
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
44
|
+
it { should have_attachment(/^my-\w+-tgw-attachment$/) }
|
45
|
+
end
|
46
|
+
```
|
data/doc/resource_types.md
CHANGED
@@ -52,6 +52,7 @@
|
|
52
52
|
| [lambda](#lambda)
|
53
53
|
| [launch_configuration](#launch_configuration)
|
54
54
|
| [launch_template](#launch_template)
|
55
|
+
| [managed_prefix_list](#managed_prefix_list)
|
55
56
|
| [mq](#mq)
|
56
57
|
| [msk](#msk)
|
57
58
|
| [nat_gateway](#nat_gateway)
|
@@ -173,7 +174,7 @@ describe alb('my-alb') do
|
|
173
174
|
end
|
174
175
|
```
|
175
176
|
|
176
|
-
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:type), its(:security_groups), its(:ip_address_type), its(:customer_owned_ipv_4_pool)
|
177
|
+
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:type), its(:security_groups), its(:ip_address_type), its(:customer_owned_ipv_4_pool), its(:enforce_security_group_inbound_rules_on_private_link_traffic)
|
177
178
|
## <a name="alb_listener">alb_listener</a>
|
178
179
|
|
179
180
|
AlbListener resource type.
|
@@ -209,7 +210,7 @@ describe alb_listener('arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:li
|
|
209
210
|
end
|
210
211
|
```
|
211
212
|
|
212
|
-
### its(:listener_arn), its(:load_balancer_arn), its(:port), its(:protocol), its(:certificates), its(:ssl_policy), its(:alpn_policy)
|
213
|
+
### its(:listener_arn), its(:load_balancer_arn), its(:port), its(:protocol), its(:certificates), its(:ssl_policy), its(:alpn_policy), its(:mutual_authentication)
|
213
214
|
## <a name="alb_target_group">alb_target_group</a>
|
214
215
|
|
215
216
|
AlbTargetGroup resource type.
|
@@ -278,7 +279,7 @@ end
|
|
278
279
|
|
279
280
|
### have_tag
|
280
281
|
|
281
|
-
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:boot_mode), its(:tpm_support), its(:deprecation_time), its(:imds_support)
|
282
|
+
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:boot_mode), its(:tpm_support), its(:deprecation_time), its(:imds_support), its(:source_instance_id)
|
282
283
|
### :unlock: Advanced use
|
283
284
|
|
284
285
|
`ami` can use `Aws::EC2::Image` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Image.html).
|
@@ -303,7 +304,7 @@ end
|
|
303
304
|
|
304
305
|
### have_path
|
305
306
|
|
306
|
-
### its(:id), its(:name), its(:description), its(:created_date), its(:version), its(:warnings), its(:binary_media_types), its(:minimum_compression_size), its(:api_key_source), its(:policy), its(:tags), its(:disable_execute_api_endpoint)
|
307
|
+
### its(:id), its(:name), its(:description), its(:created_date), its(:version), its(:warnings), its(:binary_media_types), its(:minimum_compression_size), its(:api_key_source), its(:policy), its(:tags), its(:disable_execute_api_endpoint), its(:root_resource_id)
|
307
308
|
## <a name="autoscaling_group">autoscaling_group</a>
|
308
309
|
|
309
310
|
AutoscalingGroup resource type.
|
@@ -365,7 +366,7 @@ describe autoscaling_group('my-auto-scaling-group') do
|
|
365
366
|
end
|
366
367
|
```
|
367
368
|
|
368
|
-
### 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), its(:default_instance_warmup), its(:traffic_sources)
|
369
|
+
### 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), its(:default_instance_warmup), its(:traffic_sources), its(:instance_maintenance_policy)
|
369
370
|
## <a name="batch_compute_environment">batch_compute_environment</a>
|
370
371
|
|
371
372
|
BatchComputeEnvironment resource type.
|
@@ -417,7 +418,7 @@ describe batch_job_definition('my-batch-job-definition') do
|
|
417
418
|
end
|
418
419
|
```
|
419
420
|
|
420
|
-
### 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), its(:eks_properties), its(:container_orchestration_type)
|
421
|
+
### 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), its(:ecs_properties), its(:eks_properties), its(:container_orchestration_type)
|
421
422
|
## <a name="batch_job_queue">batch_job_queue</a>
|
422
423
|
|
423
424
|
BatchJobQueue resource type.
|
@@ -443,7 +444,7 @@ describe batch_job_queue('my-batch-job-queue') do
|
|
443
444
|
end
|
444
445
|
```
|
445
446
|
|
446
|
-
### its(:job_queue_name), its(:job_queue_arn), its(:state), its(:scheduling_policy_arn), its(:status), its(:status_reason), its(:priority), its(:tags)
|
447
|
+
### its(:job_queue_name), its(:job_queue_arn), its(:state), its(:scheduling_policy_arn), its(:status), its(:status_reason), its(:priority), its(:tags), its(:job_state_time_limit_actions)
|
447
448
|
## <a name="cloudformation_stack">cloudformation_stack</a>
|
448
449
|
|
449
450
|
CloudformationStack resource type.
|
@@ -466,7 +467,7 @@ describe cloudformation_stack('my-cloudformation-stack') do
|
|
466
467
|
end
|
467
468
|
```
|
468
469
|
|
469
|
-
### its(:stack_id), its(:stack_name), its(:change_set_id), its(:description), its(:parameters), its(:creation_time), its(:deletion_time), its(:last_updated_time), its(:rollback_configuration), its(:stack_status), its(:stack_status_reason), its(:disable_rollback), its(:notification_arns), its(:timeout_in_minutes), its(:capabilities), its(:role_arn), its(:enable_termination_protection), its(:parent_id), its(:root_id), its(:drift_information)
|
470
|
+
### its(:stack_id), its(:stack_name), its(:change_set_id), its(:description), its(:parameters), its(:creation_time), its(:deletion_time), its(:last_updated_time), its(:rollback_configuration), its(:stack_status), its(:stack_status_reason), its(:disable_rollback), its(:notification_arns), its(:timeout_in_minutes), its(:capabilities), its(:role_arn), its(:enable_termination_protection), its(:parent_id), its(:root_id), its(:drift_information), its(:retain_except_on_create), its(:detailed_status)
|
470
471
|
## <a name="cloudfront_distribution">cloudfront_distribution</a>
|
471
472
|
|
472
473
|
CloudfrontDistribution resource type.
|
@@ -729,7 +730,7 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
|
729
730
|
end
|
730
731
|
```
|
731
732
|
|
732
|
-
### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes), its(:kms_key_id), its(:data_protection_status)
|
733
|
+
### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes), its(:kms_key_id), its(:data_protection_status), its(:inherited_properties), its(:log_group_class), its(:log_group_arn)
|
733
734
|
## <a name="codebuild">codebuild</a>
|
734
735
|
|
735
736
|
Codebuild resource type.
|
@@ -767,7 +768,7 @@ describe codedeploy_deployment_group('my-codedeploy-deployment-group'), applicat
|
|
767
768
|
end
|
768
769
|
```
|
769
770
|
|
770
|
-
### its(:application_name), its(:deployment_group_id), its(:deployment_group_name), its(:deployment_config_name), its(:on_premises_instance_tag_filters), its(:service_role_arn), its(:target_revision), its(:trigger_configurations), its(:alarm_configuration), its(:deployment_style), its(:outdated_instances_strategy), its(:load_balancer_info), its(:last_successful_deployment), its(:last_attempted_deployment), its(:ec2_tag_set), its(:on_premises_tag_set), its(:compute_platform), its(:ecs_services)
|
771
|
+
### its(:application_name), its(:deployment_group_id), its(:deployment_group_name), its(:deployment_config_name), its(:on_premises_instance_tag_filters), its(:service_role_arn), its(:target_revision), its(:trigger_configurations), its(:alarm_configuration), its(:deployment_style), its(:outdated_instances_strategy), its(:load_balancer_info), its(:last_successful_deployment), its(:last_attempted_deployment), its(:ec2_tag_set), its(:on_premises_tag_set), its(:compute_platform), its(:ecs_services), its(:termination_hook_enabled)
|
771
772
|
## <a name="cognito_identity_pool">cognito_identity_pool</a>
|
772
773
|
|
773
774
|
CognitoIdentityPool resource type.
|
@@ -955,7 +956,7 @@ end
|
|
955
956
|
```
|
956
957
|
|
957
958
|
|
958
|
-
### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored), its(:multi_attach_enabled), its(:throughput)
|
959
|
+
### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored), its(:multi_attach_enabled), its(:throughput), its(:sse_type)
|
959
960
|
### :unlock: Advanced use
|
960
961
|
|
961
962
|
`ebs` can use `Aws::EC2::Volume` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Volume.html).
|
@@ -1336,7 +1337,7 @@ describe efs('my-efs') do
|
|
1336
1337
|
end
|
1337
1338
|
```
|
1338
1339
|
|
1339
|
-
### its(:owner_id), its(:creation_token), its(:file_system_id), its(:file_system_arn), its(:creation_time), its(:life_cycle_state), its(:name), its(:number_of_mount_targets), its(:performance_mode), its(:encrypted), its(:kms_key_id), its(:throughput_mode), its(:provisioned_throughput_in_mibps), its(:availability_zone_name), its(:availability_zone_id)
|
1340
|
+
### its(:owner_id), its(:creation_token), its(:file_system_id), its(:file_system_arn), its(:creation_time), its(:life_cycle_state), its(:name), its(:number_of_mount_targets), its(:performance_mode), its(:encrypted), its(:kms_key_id), its(:throughput_mode), its(:provisioned_throughput_in_mibps), its(:availability_zone_name), its(:availability_zone_id), its(:file_system_protection)
|
1340
1341
|
## <a name="elastic_ip">elastic_ip</a>
|
1341
1342
|
|
1342
1343
|
Elastic IP resource type.
|
@@ -1388,7 +1389,7 @@ describe eks('my-eks') do
|
|
1388
1389
|
end
|
1389
1390
|
```
|
1390
1391
|
|
1391
|
-
### 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), its(:id), its(:health), its(:outpost_config)
|
1392
|
+
### 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), its(:id), its(:health), its(:outpost_config), its(:access_config)
|
1392
1393
|
## <a name="eks_nodegroup">eks_nodegroup</a>
|
1393
1394
|
|
1394
1395
|
EksNodegroup resource type.
|
@@ -1595,7 +1596,7 @@ end
|
|
1595
1596
|
```
|
1596
1597
|
|
1597
1598
|
|
1598
|
-
### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options), its(:advanced_security_options), its(:auto_tune_options), its(:change_progress_details)
|
1599
|
+
### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options), its(:advanced_security_options), its(:auto_tune_options), its(:change_progress_details), its(:domain_processing_status), its(:modifying_properties)
|
1599
1600
|
## <a name="elastictranscoder_pipeline">elastictranscoder_pipeline</a>
|
1600
1601
|
|
1601
1602
|
ElastictranscoderPipeline resource type.
|
@@ -1740,7 +1741,7 @@ describe emr('my-emr') do
|
|
1740
1741
|
end
|
1741
1742
|
```
|
1742
1743
|
|
1743
|
-
### its(:id), its(:name), its(:instance_collection_type), its(:log_uri), its(:log_encryption_kms_key_id), its(:requested_ami_version), its(:running_ami_version), its(:release_label), its(:auto_terminate), its(:termination_protected), its(:visible_to_all_users), its(:service_role), its(:normalized_instance_hours), its(:master_public_dns_name), its(:configurations), its(:security_configuration), its(:auto_scaling_role), its(:scale_down_behavior), its(:custom_ami_id), its(:ebs_root_volume_size), its(:repo_upgrade_on_boot), its(:cluster_arn), its(:outpost_arn), its(:step_concurrency_level), its(:placement_groups), its(:os_release_label)
|
1744
|
+
### its(:id), its(:name), its(:instance_collection_type), its(:log_uri), its(:log_encryption_kms_key_id), its(:requested_ami_version), its(:running_ami_version), its(:release_label), its(:auto_terminate), its(:termination_protected), its(:unhealthy_node_replacement), its(:visible_to_all_users), its(:service_role), its(:normalized_instance_hours), its(:master_public_dns_name), its(:configurations), its(:security_configuration), its(:auto_scaling_role), its(:scale_down_behavior), its(:custom_ami_id), its(:ebs_root_volume_size), its(:repo_upgrade_on_boot), its(:cluster_arn), its(:outpost_arn), its(:step_concurrency_level), its(:placement_groups), its(:os_release_label), its(:ebs_root_volume_iops), its(:ebs_root_volume_throughput)
|
1744
1745
|
## <a name="firehose">firehose</a>
|
1745
1746
|
|
1746
1747
|
Firehose resource type.
|
@@ -2330,7 +2331,7 @@ end
|
|
2330
2331
|
|
2331
2332
|
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)).
|
2332
2333
|
|
2333
|
-
### 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), its(:ephemeral_storage), its(:snap_start), its(:runtime_version_config)
|
2334
|
+
### 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), its(:ephemeral_storage), its(:snap_start), its(:runtime_version_config), its(:logging_config)
|
2334
2335
|
## <a name="launch_configuration">launch_configuration</a>
|
2335
2336
|
|
2336
2337
|
LaunchConfiguration resource type.
|
@@ -2411,6 +2412,47 @@ end
|
|
2411
2412
|
```
|
2412
2413
|
|
2413
2414
|
### its(:launch_template_id), its(:launch_template_name), its(:create_time), its(:created_by), its(:default_version_number), its(:latest_version_number), its(:tags)
|
2415
|
+
## <a name="managed_prefix_list">managed_prefix_list</a>
|
2416
|
+
|
2417
|
+
ManagedPrefixList resource type.
|
2418
|
+
|
2419
|
+
### exist
|
2420
|
+
|
2421
|
+
```ruby
|
2422
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
2423
|
+
it { should exist }
|
2424
|
+
end
|
2425
|
+
```
|
2426
|
+
|
2427
|
+
|
2428
|
+
### have_cidr
|
2429
|
+
|
2430
|
+
```ruby
|
2431
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
2432
|
+
it { should have_cidr('10.0.0.0/16') }
|
2433
|
+
it { should have_cidr('192.168.0.0/24').desc('dev') }
|
2434
|
+
end
|
2435
|
+
```
|
2436
|
+
|
2437
|
+
|
2438
|
+
### have_tag
|
2439
|
+
|
2440
|
+
```ruby
|
2441
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
2442
|
+
it { should have_tag('env').value('dev') }
|
2443
|
+
end
|
2444
|
+
```
|
2445
|
+
|
2446
|
+
### its(:entries_count)
|
2447
|
+
|
2448
|
+
```ruby
|
2449
|
+
describe managed_prefix_list('my-managed-prefix-list') do
|
2450
|
+
its(:entries_count) { should eq 2 }
|
2451
|
+
end
|
2452
|
+
```
|
2453
|
+
|
2454
|
+
|
2455
|
+
### its(:prefix_list_id), its(:address_family), its(:state), its(:state_message), its(:prefix_list_arn), its(:prefix_list_name), its(:max_entries), its(:version), its(:owner_id)
|
2414
2456
|
## <a name="mq">mq</a>
|
2415
2457
|
|
2416
2458
|
MQ resource type.
|
@@ -2452,7 +2494,7 @@ describe mq('my-mq') do
|
|
2452
2494
|
end
|
2453
2495
|
```
|
2454
2496
|
|
2455
|
-
### its(:vpc_id), its(:actions_required), its(:authentication_strategy), its(:auto_minor_version_upgrade), its(:broker_arn), its(:broker_id), its(:broker_name), its(:broker_state), its(:created), its(:deployment_mode), its(:encryption_options), its(:engine_type), its(:engine_version), its(:host_instance_type), its(:ldap_server_metadata), its(:pending_authentication_strategy), its(:pending_engine_version), its(:pending_host_instance_type), its(:pending_ldap_server_metadata), its(:pending_security_groups), its(:publicly_accessible), its(:security_groups), its(:storage_type), its(:subnet_ids)
|
2497
|
+
### its(:vpc_id), its(:actions_required), its(:authentication_strategy), its(:auto_minor_version_upgrade), its(:broker_arn), its(:broker_id), its(:broker_name), its(:broker_state), its(:created), its(:deployment_mode), its(:encryption_options), its(:engine_type), its(:engine_version), its(:host_instance_type), its(:ldap_server_metadata), its(:pending_authentication_strategy), its(:pending_engine_version), its(:pending_host_instance_type), its(:pending_ldap_server_metadata), its(:pending_security_groups), its(:publicly_accessible), its(:security_groups), its(:storage_type), its(:subnet_ids), its(:data_replication_metadata), its(:data_replication_mode), its(:pending_data_replication_metadata), its(:pending_data_replication_mode)
|
2456
2498
|
## <a name="msk">msk</a>
|
2457
2499
|
|
2458
2500
|
Msk resource type.
|
@@ -2476,7 +2518,7 @@ end
|
|
2476
2518
|
|
2477
2519
|
### be_updating
|
2478
2520
|
|
2479
|
-
### 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), its(:storage_mode)
|
2521
|
+
### 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), its(:storage_mode), its(:customer_action_status)
|
2480
2522
|
## <a name="nat_gateway">nat_gateway</a>
|
2481
2523
|
|
2482
2524
|
NatGateway resource type.
|
@@ -2677,7 +2719,7 @@ describe network_interface('eni-12ab3cde') do
|
|
2677
2719
|
end
|
2678
2720
|
```
|
2679
2721
|
|
2680
|
-
### 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)
|
2722
|
+
### its(:association), its(:availability_zone), its(:connection_tracking_configuration), 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)
|
2681
2723
|
## <a name="nlb">nlb</a>
|
2682
2724
|
|
2683
2725
|
NLB resource type.
|
@@ -2728,7 +2770,7 @@ describe nlb('my-nlb') do
|
|
2728
2770
|
end
|
2729
2771
|
```
|
2730
2772
|
|
2731
|
-
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:type), its(:security_groups), its(:ip_address_type), its(:customer_owned_ipv_4_pool)
|
2773
|
+
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:type), its(:security_groups), its(:ip_address_type), its(:customer_owned_ipv_4_pool), its(:enforce_security_group_inbound_rules_on_private_link_traffic)
|
2732
2774
|
## <a name="nlb_listener">nlb_listener</a>
|
2733
2775
|
|
2734
2776
|
NlbListener resource type.
|
@@ -2764,7 +2806,7 @@ describe nlb_listener('arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:li
|
|
2764
2806
|
end
|
2765
2807
|
```
|
2766
2808
|
|
2767
|
-
### its(:listener_arn), its(:load_balancer_arn), its(:port), its(:protocol), its(:certificates), its(:ssl_policy), its(:alpn_policy)
|
2809
|
+
### its(:listener_arn), its(:load_balancer_arn), its(:port), its(:protocol), its(:certificates), its(:ssl_policy), its(:alpn_policy), its(:mutual_authentication)
|
2768
2810
|
## <a name="nlb_target_group">nlb_target_group</a>
|
2769
2811
|
|
2770
2812
|
NlbTargetGroup resource type.
|
@@ -2905,7 +2947,7 @@ end
|
|
2905
2947
|
```
|
2906
2948
|
|
2907
2949
|
|
2908
|
-
### 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), its(:network_type), its(:activity_stream_policy_status), its(:storage_throughput), its(:db_system_id), its(:master_user_secret), its(:certificate_details), its(:read_replica_source_db_cluster_identifier)
|
2950
|
+
### 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), its(:network_type), its(:activity_stream_policy_status), its(:storage_throughput), its(:db_system_id), its(:master_user_secret), its(:certificate_details), its(:read_replica_source_db_cluster_identifier), its(:percent_progress), its(:dedicated_log_volume), its(:is_storage_config_upgrade_available), its(:multi_tenant)
|
2909
2951
|
### :unlock: Advanced use
|
2910
2952
|
|
2911
2953
|
`rds` can use `Aws::RDS::DBInstance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/RDS/DBInstance.html).
|
@@ -2978,7 +3020,7 @@ describe rds_db_cluster('my-rds-db-cluster') do
|
|
2978
3020
|
end
|
2979
3021
|
```
|
2980
3022
|
|
2981
|
-
### its(:allocated_storage), its(:availability_zones), its(:backup_retention_period), its(:character_set_name), its(:database_name), its(:db_cluster_identifier), its(:db_cluster_parameter_group), its(:db_subnet_group), its(:status), its(:automatic_restart_time), its(:percent_progress), its(:earliest_restorable_time), its(:endpoint), its(:reader_endpoint), its(:custom_endpoints), its(:multi_az), its(:engine), its(:engine_version), its(:latest_restorable_time), its(:port), its(:master_username), its(:db_cluster_option_group_memberships), its(:preferred_backup_window), its(:preferred_maintenance_window), its(:replication_source_identifier), its(:read_replica_identifiers), its(:hosted_zone_id), its(:storage_encrypted), its(:kms_key_id), its(:db_cluster_resource_id), its(:db_cluster_arn), its(:associated_roles), its(:iam_database_authentication_enabled), its(:clone_group_id), its(:cluster_create_time), its(:earliest_backtrack_time), its(:backtrack_window), its(:backtrack_consumed_change_records), its(:enabled_cloudwatch_logs_exports), its(:capacity), its(:engine_mode), its(:scaling_configuration_info), its(:deletion_protection), its(:http_endpoint_enabled), its(:activity_stream_mode), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:copy_tags_to_snapshot), its(:cross_account_clone), its(:domain_memberships), its(:tag_list), its(:global_write_forwarding_status), its(:global_write_forwarding_requested), its(:pending_modified_values), its(:db_cluster_instance_class), its(:storage_type), its(:iops), its(:publicly_accessible), its(:auto_minor_version_upgrade), its(:monitoring_interval), its(:monitoring_role_arn), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:serverless_v2_scaling_configuration), its(:network_type), its(:db_system_id), its(:master_user_secret)
|
3023
|
+
### its(:allocated_storage), its(:availability_zones), its(:backup_retention_period), its(:character_set_name), its(:database_name), its(:db_cluster_identifier), its(:db_cluster_parameter_group), its(:db_subnet_group), its(:status), its(:automatic_restart_time), its(:percent_progress), its(:earliest_restorable_time), its(:endpoint), its(:reader_endpoint), its(:custom_endpoints), its(:multi_az), its(:engine), its(:engine_version), its(:latest_restorable_time), its(:port), its(:master_username), its(:db_cluster_option_group_memberships), its(:preferred_backup_window), its(:preferred_maintenance_window), its(:replication_source_identifier), its(:read_replica_identifiers), its(:status_infos), its(:hosted_zone_id), its(:storage_encrypted), its(:kms_key_id), its(:db_cluster_resource_id), its(:db_cluster_arn), its(:associated_roles), its(:iam_database_authentication_enabled), its(:clone_group_id), its(:cluster_create_time), its(:earliest_backtrack_time), its(:backtrack_window), its(:backtrack_consumed_change_records), its(:enabled_cloudwatch_logs_exports), its(:capacity), its(:engine_mode), its(:scaling_configuration_info), its(:rds_custom_cluster_configuration), its(:deletion_protection), its(:http_endpoint_enabled), its(:activity_stream_mode), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:copy_tags_to_snapshot), its(:cross_account_clone), its(:domain_memberships), its(:tag_list), its(:global_write_forwarding_status), its(:global_write_forwarding_requested), its(:pending_modified_values), its(:db_cluster_instance_class), its(:storage_type), its(:iops), its(:publicly_accessible), its(:auto_minor_version_upgrade), its(:monitoring_interval), its(:monitoring_role_arn), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:serverless_v2_scaling_configuration), its(:network_type), its(:db_system_id), its(:master_user_secret), its(:io_optimized_next_allowed_modification_time), its(:local_write_forwarding_status), its(:aws_backup_recovery_point_arn), its(:limitless_database), its(:storage_throughput), its(:certificate_details)
|
2982
3024
|
## <a name="rds_db_cluster_parameter_group">rds_db_cluster_parameter_group</a>
|
2983
3025
|
|
2984
3026
|
RdsDbClusterParameterGroup resource type.
|
@@ -3221,7 +3263,7 @@ describe redshift('my-redshift') do
|
|
3221
3263
|
end
|
3222
3264
|
```
|
3223
3265
|
|
3224
|
-
### 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)
|
3266
|
+
### 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), its(:custom_domain_name), its(:custom_domain_certificate_arn), its(:custom_domain_certificate_expiry_date), its(:master_password_secret_arn), its(:master_password_secret_kms_key_id), its(:ip_address_type), its(:multi_az), its(:multi_az_secondary)
|
3225
3267
|
## <a name="redshift_cluster_parameter_group">redshift_cluster_parameter_group</a>
|
3226
3268
|
|
3227
3269
|
RedshiftClusterParameterGroup resource type.
|
@@ -3759,7 +3801,7 @@ end
|
|
3759
3801
|
```
|
3760
3802
|
|
3761
3803
|
|
3762
|
-
### its(:name), its(:type), its(:key_id), its(:last_modified_date), its(:last_modified_user), its(:description), its(:allowed_pattern), its(:version), its(:tier), its(:policies), its(:data_type)
|
3804
|
+
### its(:name), its(:arn), its(:type), its(:key_id), its(:last_modified_date), its(:last_modified_user), its(:description), its(:allowed_pattern), its(:version), its(:tier), its(:policies), its(:data_type)
|
3763
3805
|
### :unlock: Advanced use
|
3764
3806
|
|
3765
3807
|
```ruby
|
@@ -3852,7 +3894,7 @@ end
|
|
3852
3894
|
```
|
3853
3895
|
|
3854
3896
|
|
3855
|
-
### its(:arn), its(:certificate), its(:protocol_details), its(:domain), its(:endpoint_type), its(:host_key_fingerprint), its(:identity_provider_details), its(:identity_provider_type), its(:logging_role), its(:post_authentication_login_banner), its(:pre_authentication_login_banner), its(:protocols), its(:security_policy_name), its(:server_id), its(:state), its(:user_count), its(:workflow_details)
|
3897
|
+
### its(:arn), its(:certificate), its(:protocol_details), its(:domain), its(:endpoint_type), its(:host_key_fingerprint), its(:identity_provider_details), its(:identity_provider_type), its(:logging_role), its(:post_authentication_login_banner), its(:pre_authentication_login_banner), its(:protocols), its(:security_policy_name), its(:server_id), its(:state), its(:user_count), its(:workflow_details), its(:structured_log_destinations), its(:s3_storage_options), its(:as_2_service_managed_egress_ip_addresses)
|
3856
3898
|
## <a name="transit_gateway">transit_gateway</a>
|
3857
3899
|
|
3858
3900
|
TransitGateway resource type.
|
@@ -3884,6 +3926,27 @@ end
|
|
3884
3926
|
|
3885
3927
|
### have_attachment
|
3886
3928
|
|
3929
|
+
#### using attachment id
|
3930
|
+
```ruby
|
3931
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
3932
|
+
it { should have_attachment('tgw-attach-1234567890abcdefg') }
|
3933
|
+
end
|
3934
|
+
```
|
3935
|
+
|
3936
|
+
#### using attachment name
|
3937
|
+
```ruby
|
3938
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
3939
|
+
it { should have_attachment('my-prod-tgw-attachment') }
|
3940
|
+
end
|
3941
|
+
```
|
3942
|
+
|
3943
|
+
#### using regular expression attachment name
|
3944
|
+
```ruby
|
3945
|
+
describe transit_gateway('tgw-1234567890abcdefg') do
|
3946
|
+
it { should have_attachment(/^my-\w+-tgw-attachment$/) }
|
3947
|
+
end
|
3948
|
+
```
|
3949
|
+
|
3887
3950
|
### have_tag
|
3888
3951
|
|
3889
3952
|
### its(:transit_gateway_id), its(:transit_gateway_arn), its(:state), its(:owner_id), its(:description), its(:creation_time)
|
@@ -65,7 +65,7 @@ module Awspec
|
|
65
65
|
types_for_generate_all = %w[
|
66
66
|
cloudwatch_alarm cloudwatch_event directconnect ebs efs
|
67
67
|
elasticsearch iam_group iam_policy iam_role iam_user kms lambda
|
68
|
-
acm cloudwatch_logs eip codebuild elasticache
|
68
|
+
acm cloudwatch_logs eip codebuild elasticache managed_prefix_list
|
69
69
|
]
|
70
70
|
|
71
71
|
types_for_generate_all.each do |type|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Awspec::Generator
|
4
|
+
module Doc
|
5
|
+
module Type
|
6
|
+
class ManagedPrefixList < Base
|
7
|
+
def initialize
|
8
|
+
super
|
9
|
+
@type_name = 'ManagedPrefixList'
|
10
|
+
@type = Awspec::Type::ManagedPrefixList.new('my-managed-prefix-list')
|
11
|
+
@ret = @type.resource_via_client
|
12
|
+
@matchers = ['its(:entries_count)']
|
13
|
+
@ignore_matchers = []
|
14
|
+
@describes = []
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Awspec::Generator
|
4
|
+
module Spec
|
5
|
+
class ManagedPrefixList
|
6
|
+
include Awspec::Helper::Finder
|
7
|
+
def select_all_managed_prefix_lists
|
8
|
+
res = ec2_client.describe_managed_prefix_lists
|
9
|
+
res.prefix_lists
|
10
|
+
end
|
11
|
+
|
12
|
+
def generate_all
|
13
|
+
prefix_lists = select_all_managed_prefix_lists
|
14
|
+
raise 'Not Found Managed Prefix List.' if prefix_lists.empty?
|
15
|
+
|
16
|
+
specs = prefix_lists.map do |prefix_list|
|
17
|
+
entries = select_managed_prefix_list_entries(prefix_list.prefix_list_id)
|
18
|
+
content = ERB.new(managed_prefix_list_spec_template, nil, '-').result(binding).gsub(/^\n/, '')
|
19
|
+
end
|
20
|
+
specs.join("\n")
|
21
|
+
end
|
22
|
+
|
23
|
+
def managed_prefix_list_spec_template
|
24
|
+
<<-'EOF'
|
25
|
+
describe managed_prefix_list('<%= prefix_list.prefix_list_name %>') do
|
26
|
+
it { should exist }
|
27
|
+
<% entries.each do |entry| %>
|
28
|
+
<% if entry.description.nil? %>
|
29
|
+
it { should have_cidr('<%= entry.cidr %>') }
|
30
|
+
<% else %>
|
31
|
+
it { should have_cidr('<%= entry.cidr %>').desc('<%= entry.description %>') }
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
its(:entries_count) { should eq <%= entries.length %> }
|
35
|
+
its(:prefix_list_id) { should eq '<%= prefix_list.prefix_list_id %>' }
|
36
|
+
its(:address_family) { should eq '<%= prefix_list.address_family %>' }
|
37
|
+
its(:state) { should eq '<%= prefix_list.state %>' }
|
38
|
+
its(:prefix_list_arn) { should eq '<%= prefix_list.prefix_list_arn %>' }
|
39
|
+
<% if prefix_list.max_entries %>
|
40
|
+
its(:max_entries) { should eq <%= prefix_list.max_entries %> }
|
41
|
+
<% end %>
|
42
|
+
<% if prefix_list.version %>
|
43
|
+
its(:version) { should eq <%= prefix_list.version %> }
|
44
|
+
<% end %>
|
45
|
+
its(:owner_id) { should eq '<%= prefix_list.owner_id %>' }
|
46
|
+
<% prefix_list.tags.each do |tag| %>
|
47
|
+
it { should have_tag('<%= tag.key %>').value('<%= tag.value %>') }
|
48
|
+
<% end %>
|
49
|
+
end
|
50
|
+
EOF
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/awspec/generator.rb
CHANGED
@@ -43,6 +43,7 @@ require 'awspec/generator/spec/redshift_cluster_parameter_group'
|
|
43
43
|
require 'awspec/generator/spec/rds_proxy'
|
44
44
|
require 'awspec/generator/spec/rds_db_cluster'
|
45
45
|
require 'awspec/generator/spec/rds_global_cluster'
|
46
|
+
require 'awspec/generator/spec/managed_prefix_list'
|
46
47
|
|
47
48
|
# Doc
|
48
49
|
require 'awspec/generator/doc/type'
|
@@ -228,6 +228,18 @@ module Awspec::Helper
|
|
228
228
|
})
|
229
229
|
res.transit_gateway_attachments
|
230
230
|
end
|
231
|
+
|
232
|
+
def find_managed_prefix_list(prefix_list_name)
|
233
|
+
res = ec2_client.describe_managed_prefix_lists({
|
234
|
+
filters: [{ name: 'prefix-list-name',
|
235
|
+
values: [prefix_list_name] }]
|
236
|
+
})
|
237
|
+
res.prefix_lists.single_resource(prefix_list_name)
|
238
|
+
end
|
239
|
+
|
240
|
+
def select_managed_prefix_list_entries(prefix_list_id)
|
241
|
+
ec2_client.get_managed_prefix_list_entries({ prefix_list_id: prefix_list_id }).data.entries
|
242
|
+
end
|
231
243
|
end
|
232
244
|
end
|
233
245
|
end
|
@@ -4,16 +4,23 @@ module Awspec::Helper
|
|
4
4
|
module Finder
|
5
5
|
module SsmParameter
|
6
6
|
def find_ssm_parameter(name)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
req = {
|
8
|
+
filters: [
|
9
|
+
{
|
10
|
+
key: 'Name',
|
11
|
+
values: [name]
|
12
|
+
}
|
13
|
+
]
|
14
|
+
}
|
15
|
+
loop do
|
16
|
+
res = ssm_client.describe_parameters(req)
|
17
|
+
if res.parameters.size >= 1
|
18
|
+
return res.parameters.first
|
19
|
+
end
|
20
|
+
break if res.next_token.nil?
|
21
|
+
|
22
|
+
req[:next_token] = res.next_token
|
23
|
+
end
|
17
24
|
end
|
18
25
|
|
19
26
|
def find_parameter_tag(id, tag_key)
|
data/lib/awspec/helper/type.rb
CHANGED
@@ -24,7 +24,7 @@ module Awspec
|
|
24
24
|
internet_gateway acm cloudwatch_logs dynamodb_table eip sqs ssm_parameter cloudformation_stack
|
25
25
|
codebuild sns_topic redshift redshift_cluster_parameter_group codedeploy codedeploy_deployment_group
|
26
26
|
secretsmanager msk transit_gateway cognito_identity_pool cognito_user_pool vpc_endpoints
|
27
|
-
transfer_server
|
27
|
+
transfer_server managed_prefix_list
|
28
28
|
]
|
29
29
|
|
30
30
|
ACCOUNT_ATTRIBUTES = %w[
|
data/lib/awspec/matcher.rb
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Aws.config[:ec2] = {
|
4
|
+
stub_responses: {
|
5
|
+
describe_managed_prefix_lists: {
|
6
|
+
next_token: nil,
|
7
|
+
prefix_lists: [
|
8
|
+
{
|
9
|
+
prefix_list_id: 'pl-12345678',
|
10
|
+
address_family: 'IPv4',
|
11
|
+
state: 'create-complete',
|
12
|
+
state_message: nil,
|
13
|
+
prefix_list_arn: 'arn:aws:ec2:ap-northeast-1:aws:prefix-list/pl-12345678',
|
14
|
+
prefix_list_name: 'my-managed-prefix-list',
|
15
|
+
max_entries: 2,
|
16
|
+
version: 1,
|
17
|
+
tags: [
|
18
|
+
{
|
19
|
+
key: 'env',
|
20
|
+
value: 'dev'
|
21
|
+
}
|
22
|
+
],
|
23
|
+
owner_id: '123456789012'
|
24
|
+
}
|
25
|
+
]
|
26
|
+
},
|
27
|
+
get_managed_prefix_list_entries: {
|
28
|
+
next_toke: nil,
|
29
|
+
entries: [
|
30
|
+
{
|
31
|
+
cidr: '10.0.0.0/16',
|
32
|
+
description: 'test'
|
33
|
+
},
|
34
|
+
{
|
35
|
+
cidr: '192.168.0.0/24',
|
36
|
+
description: 'dev'
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
@@ -1,18 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
def describe_parameters_response(context)
|
4
|
+
next_token = 'eyJOZXh0VG9rZW4iOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxfQ=='
|
5
|
+
if context.params[:next_token] == next_token
|
6
|
+
{
|
6
7
|
parameters: [
|
7
8
|
{
|
8
9
|
name: 'my-parameter',
|
9
10
|
type: 'SecureString',
|
10
11
|
key_id: 'alias/aws/ssm',
|
11
12
|
description: 'Some description',
|
12
|
-
version: 1
|
13
|
-
next_token: nil
|
13
|
+
version: 1
|
14
14
|
}
|
15
|
-
]
|
15
|
+
],
|
16
|
+
next_token: nil
|
17
|
+
}
|
18
|
+
else
|
19
|
+
{
|
20
|
+
parameters: [],
|
21
|
+
next_token: next_token
|
16
22
|
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
Aws.config[:ssm] = {
|
27
|
+
stub_responses: {
|
28
|
+
describe_parameters: ->(context) { describe_parameters_response(context) }
|
17
29
|
}
|
18
30
|
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Awspec::Type
|
4
|
+
class ManagedPrefixList < ResourceBase
|
5
|
+
aws_resource Aws::EC2::Types::ManagedPrefixList
|
6
|
+
tags_allowed
|
7
|
+
|
8
|
+
def resource_via_client
|
9
|
+
@resource_via_client ||= find_managed_prefix_list(@display_name)
|
10
|
+
end
|
11
|
+
|
12
|
+
def id
|
13
|
+
@id ||= resource_via_client.prefix_list_id if resource_via_client
|
14
|
+
end
|
15
|
+
|
16
|
+
def entries
|
17
|
+
@entries ||= select_managed_prefix_list_entries(id)
|
18
|
+
end
|
19
|
+
|
20
|
+
def has_cidr?(cidr, description = nil)
|
21
|
+
entries.find do |entry|
|
22
|
+
if description.nil?
|
23
|
+
entry.cidr == cidr
|
24
|
+
else
|
25
|
+
entry.cidr == cidr && entry.description == description
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def entries_count
|
31
|
+
entries.length
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -18,9 +18,21 @@ module Awspec::Type
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def has_attachment?(att_id)
|
21
|
-
atts = find_tgw_attachments_by_tgw_id(
|
22
|
-
|
23
|
-
|
21
|
+
atts = find_tgw_attachments_by_tgw_id(id)
|
22
|
+
|
23
|
+
atts.any? do |att|
|
24
|
+
att.transit_gateway_attachment_id == att_id || attachment_has_name?(att, att_id)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def attachment_has_name?(attachment, name)
|
31
|
+
if name.is_a?(Regexp)
|
32
|
+
attachment.tags.any? { |tag| tag.key == 'Name' && (name =~ tag.value) }
|
33
|
+
else
|
34
|
+
attachment.tags.any? { |tag| tag.key == 'Name' && tag.value == name }
|
35
|
+
end
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- doc/_resource_types/lambda_account_settings.md
|
301
301
|
- doc/_resource_types/launch_configuration.md
|
302
302
|
- doc/_resource_types/launch_template.md
|
303
|
+
- doc/_resource_types/managed_prefix_list.md
|
303
304
|
- doc/_resource_types/mq.md
|
304
305
|
- doc/_resource_types/msk.md
|
305
306
|
- doc/_resource_types/nat_gateway.md
|
@@ -410,6 +411,7 @@ files:
|
|
410
411
|
- lib/awspec/generator/doc/type/lambda_account_settings.rb
|
411
412
|
- lib/awspec/generator/doc/type/launch_configuration.rb
|
412
413
|
- lib/awspec/generator/doc/type/launch_template.rb
|
414
|
+
- lib/awspec/generator/doc/type/managed_prefix_list.rb
|
413
415
|
- lib/awspec/generator/doc/type/mq.rb
|
414
416
|
- lib/awspec/generator/doc/type/msk.rb
|
415
417
|
- lib/awspec/generator/doc/type/nat_gateway.rb
|
@@ -470,6 +472,7 @@ files:
|
|
470
472
|
- lib/awspec/generator/spec/internet_gateway.rb
|
471
473
|
- lib/awspec/generator/spec/kms.rb
|
472
474
|
- lib/awspec/generator/spec/lambda.rb
|
475
|
+
- lib/awspec/generator/spec/managed_prefix_list.rb
|
473
476
|
- lib/awspec/generator/spec/nat_gateway.rb
|
474
477
|
- lib/awspec/generator/spec/network_acl.rb
|
475
478
|
- lib/awspec/generator/spec/network_interface.rb
|
@@ -572,6 +575,7 @@ files:
|
|
572
575
|
- lib/awspec/matcher/belong_to_subnets.rb
|
573
576
|
- lib/awspec/matcher/belong_to_vpc.rb
|
574
577
|
- lib/awspec/matcher/have_attribute_definition.rb
|
578
|
+
- lib/awspec/matcher/have_cidr.rb
|
575
579
|
- lib/awspec/matcher/have_cluster_member.rb
|
576
580
|
- lib/awspec/matcher/have_cluster_parameter_group.rb
|
577
581
|
- lib/awspec/matcher/have_custom_response_error_code.rb
|
@@ -656,6 +660,7 @@ files:
|
|
656
660
|
- lib/awspec/stub/lambda.rb
|
657
661
|
- lib/awspec/stub/launch_configuration.rb
|
658
662
|
- lib/awspec/stub/launch_template.rb
|
663
|
+
- lib/awspec/stub/managed_prefix_list.rb
|
659
664
|
- lib/awspec/stub/mq.rb
|
660
665
|
- lib/awspec/stub/msk.rb
|
661
666
|
- lib/awspec/stub/nat_gateway.rb
|
@@ -751,6 +756,7 @@ files:
|
|
751
756
|
- lib/awspec/type/lambda_account_settings.rb
|
752
757
|
- lib/awspec/type/launch_configuration.rb
|
753
758
|
- lib/awspec/type/launch_template.rb
|
759
|
+
- lib/awspec/type/managed_prefix_list.rb
|
754
760
|
- lib/awspec/type/mq.rb
|
755
761
|
- lib/awspec/type/msk.rb
|
756
762
|
- lib/awspec/type/nat_gateway.rb
|
@@ -802,14 +808,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
802
808
|
requirements:
|
803
809
|
- - ">="
|
804
810
|
- !ruby/object:Gem::Version
|
805
|
-
version: '2.
|
811
|
+
version: '2.3'
|
806
812
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
807
813
|
requirements:
|
808
814
|
- - ">="
|
809
815
|
- !ruby/object:Gem::Version
|
810
816
|
version: '0'
|
811
817
|
requirements: []
|
812
|
-
rubygems_version: 3.
|
818
|
+
rubygems_version: 3.4.19
|
813
819
|
signing_key:
|
814
820
|
specification_version: 4
|
815
821
|
summary: RSpec tests for your AWS resources.
|