awspec 0.76.1 → 0.77.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/resource_types.md +2 -0
- data/lib/awspec/type/subnet.rb +15 -0
- data/lib/awspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34ee0b3c8525625cc99b4f0657c696fb57422d1c
|
4
|
+
data.tar.gz: ce0b6bc599df19fbaf5fb75d464572b68eea5981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac0f966398d0cd2389316e9f5df1e7e16a217200daffecca0446d3767ff67634a78a7b4b38a68c153bc4df51dc658dc6186718c7ec785aad61e2a7a5ea94d371
|
7
|
+
data.tar.gz: 28b98906ea89acf2d1dba16665412a0ab434742ab67a64eff4a40bc14edfeac59f74a4b6e030b6d087314f282f09c2420dd496e1bdb55613adc24959d20b5d07
|
data/doc/resource_types.md
CHANGED
data/lib/awspec/type/subnet.rb
CHANGED
@@ -11,6 +11,21 @@ module Awspec::Type
|
|
11
11
|
@id ||= resource_via_client.subnet_id if resource_via_client
|
12
12
|
end
|
13
13
|
|
14
|
+
def associated_to?(route_table_id)
|
15
|
+
res = ec2_client.describe_route_tables({
|
16
|
+
filters:
|
17
|
+
[
|
18
|
+
{
|
19
|
+
name: 'association.subnet-id',
|
20
|
+
values: [id]
|
21
|
+
}
|
22
|
+
]
|
23
|
+
})
|
24
|
+
return false if res[:route_tables].empty?
|
25
|
+
associated_route_table = res[:route_tables].first
|
26
|
+
associated_route_table.route_table_id == route_table_id || associated_route_table.tag_name == route_table_id
|
27
|
+
end
|
28
|
+
|
14
29
|
STATES = %w(
|
15
30
|
available pending
|
16
31
|
)
|
data/lib/awspec/version.rb
CHANGED