hiera-aws 0.2.0 → 0.3.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.
- data/.rubocop.yml +2 -0
- data/README.md +20 -34
- data/hiera-aws.gemspec +2 -2
- data/lib/hiera/backend/aws/elasticache.rb +35 -10
- data/lib/hiera/backend/aws/rds.rb +2 -13
- data/lib/hiera/backend/aws/version.rb +1 -1
- data/spec/aws_elasticache_spec.rb +200 -50
- data/spec/aws_rds_spec.rb +1 -30
- metadata +31 -17
- checksums.yaml +0 -7
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -64,21 +64,6 @@ will be used for all AWS API operations:
|
|
64
64
|
The backend currently supports the following keys that you can pass to the
|
65
65
|
`hiera()` function to look up objects in AWS.
|
66
66
|
|
67
|
-
### cache_nodes_by_cache_cluster_id
|
68
|
-
|
69
|
-
Returns an array of all nodes part of a ElastiCache cluster. The cluster is
|
70
|
-
identified by its physical ID which must be passed to the backend via the Puppet
|
71
|
-
fact `$cache_cluster_id`. The returned array has the format `["host1:port",
|
72
|
-
"host2:port"]`.
|
73
|
-
|
74
|
-
Usage:
|
75
|
-
|
76
|
-
```
|
77
|
-
$cache_cluster_id = "your_cluster_id"
|
78
|
-
|
79
|
-
cluster_nodes = hiera("cache_nodes_by_cache_cluster_id")
|
80
|
-
```
|
81
|
-
|
82
67
|
### redis_cluster_nodes_for_cfn_stack
|
83
68
|
|
84
69
|
Returns an array of all Redis cluster nodes for the CloudFormation stack of an
|
@@ -91,37 +76,37 @@ Usage:
|
|
91
76
|
cluster_nodes = hiera("redis_cluster_nodes_for_cfn_stack")
|
92
77
|
```
|
93
78
|
|
94
|
-
###
|
79
|
+
### redis_cluster_replica_groups_for_cfn_stack
|
95
80
|
|
96
|
-
Returns an array of all
|
97
|
-
an EC2
|
98
|
-
`$ec2_instance_id`.
|
81
|
+
Returns an array of the Redis Replication Groups of all Redis cluster nodes for
|
82
|
+
the CloudFormation stack of an EC2 Instance. The instance is identified by the
|
83
|
+
Puppet fact `$ec2_instance_id`.
|
99
84
|
|
100
85
|
Usage:
|
101
86
|
|
102
87
|
```
|
103
|
-
|
88
|
+
elasticache_redis_replication_groups = hiera("redis_cluster_replica_groups_for_cfn_stack")
|
104
89
|
```
|
105
90
|
|
106
|
-
|
91
|
+
For each replica group in the array the following hash is returned:
|
107
92
|
|
108
|
-
|
109
|
-
|
93
|
+
```json
|
94
|
+
{
|
95
|
+
"replication_group_id" => "some-group-id",
|
96
|
+
"primary_endpoint" => { "address" => "some.replication.group.primary.endpoint", "port" => 1234 }
|
97
|
+
}
|
98
|
+
```
|
99
|
+
|
100
|
+
### memcached_cluster_nodes_for_cfn_stack
|
110
101
|
|
111
|
-
Returns an array of all
|
112
|
-
|
102
|
+
Returns an array of all Memcached cluster nodes for the CloudFormation stack of
|
103
|
+
an EC2 instance. The instance is identified by the Puppet fact
|
104
|
+
`$ec2_instance_id`. The returned array has the format `["host1", "host2"]`.
|
113
105
|
|
114
106
|
Usage:
|
115
107
|
|
116
108
|
```
|
117
|
-
|
118
|
-
rds_instances = hiera("rds")
|
119
|
-
|
120
|
-
# Get all database instances that have a tag named "environment" with the value "dev"
|
121
|
-
rds_instances = hiera("rds environment=dev")
|
122
|
-
|
123
|
-
# Get all database instances that have two specific tags
|
124
|
-
rds_instances = hiera("rds environment=production role=mgmt-db")
|
109
|
+
cluster_nodes = hiera("memcached_cluster_nodes_for_cfn_stack")
|
125
110
|
```
|
126
111
|
|
127
112
|
### rds_instances tag=value...
|
@@ -160,8 +145,9 @@ $endpoint_address = $rds_instances[0]['endpoint']['address']
|
|
160
145
|
|
161
146
|
* Author:: Mathias Lafeldt (mathias.lafeldt@jimdo.com)
|
162
147
|
* Author:: Deniz Adrian (deniz.adrian@jimdo.com)
|
148
|
+
* Author:: Soenke Ruempler (soenke.ruempler@jimdo.com)
|
163
149
|
|
164
|
-
Copyright:: 2013, Jimdo GmbH
|
150
|
+
Copyright:: 2013-2014, Jimdo GmbH
|
165
151
|
|
166
152
|
Licensed under the Apache License, Version 2.0 (the "License");
|
167
153
|
you may not use this file except in compliance with the License.
|
data/hiera-aws.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "hiera/backend/aws/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "hiera-aws"
|
8
8
|
spec.version = Hiera::Backend::Aws::VERSION
|
9
|
-
spec.authors = ["Mathias Lafeldt", "Deniz Adrian"]
|
10
|
-
spec.email = ["mathias.lafeldt@jimdo.com", "deniz.adrian@jimdo.com"]
|
9
|
+
spec.authors = ["Mathias Lafeldt", "Deniz Adrian", "Soenke Ruempler"]
|
10
|
+
spec.email = ["mathias.lafeldt@jimdo.com", "deniz.adrian@jimdo.com", "soenke.ruempler@jimdo.com"]
|
11
11
|
spec.description = %q{Hiera AWS Backend}
|
12
12
|
spec.summary = %q{Hiera AWS Backend}
|
13
13
|
spec.homepage = "https://github.com/Jimdo/hiera-aws"
|
@@ -5,16 +5,7 @@ class Hiera
|
|
5
5
|
module Aws
|
6
6
|
# Implementation of Hiera keys for aws/elasticache
|
7
7
|
class ElastiCache < Base
|
8
|
-
|
9
|
-
client = AWS::ElastiCache::Client.new
|
10
|
-
cache_cluster_id = scope["cache_cluster_id"]
|
11
|
-
raise MissingFactError, "cache_cluster_id not found" unless cache_cluster_id
|
12
|
-
options = { :cache_cluster_id => cache_cluster_id, :show_cache_node_info => true }
|
13
|
-
nodes = client.describe_cache_clusters(options)[:cache_clusters].first[:cache_nodes]
|
14
|
-
nodes.map { |node| "#{node[:endpoint][:address]}:#{node[:endpoint][:port]}" }
|
15
|
-
end
|
16
|
-
|
17
|
-
#
|
8
|
+
#
|
18
9
|
# XXX: Lots of spiked code ahead that MUST be refactored.
|
19
10
|
#
|
20
11
|
def cfn_stack_name(instance_id)
|
@@ -65,6 +56,40 @@ class Hiera
|
|
65
56
|
endpoints
|
66
57
|
end
|
67
58
|
|
59
|
+
def cluster_replica_groups_for_cfn_stack(cluster_engine = nil)
|
60
|
+
ec2_instance_id = scope["ec2_instance_id"]
|
61
|
+
raise MissingFactError, "ec2_instance_id not found" unless ec2_instance_id
|
62
|
+
|
63
|
+
replica_groups = {}
|
64
|
+
stack_name = cfn_stack_name(ec2_instance_id)
|
65
|
+
|
66
|
+
clusters = cache_clusters_in_cfn_stack(stack_name, cluster_engine)
|
67
|
+
clusters.each do |cluster|
|
68
|
+
replication_group_id = cluster[:replication_group_id]
|
69
|
+
next unless replication_group_id
|
70
|
+
|
71
|
+
client = AWS::ElastiCache::Client.new
|
72
|
+
replication_group = client.describe_replication_groups(:replication_group_id => replication_group_id)[:replication_groups].first
|
73
|
+
|
74
|
+
primary_endpoint = replication_group.fetch(:node_groups).first.fetch(:primary_endpoint)
|
75
|
+
|
76
|
+
replica_groups[replication_group_id] = {
|
77
|
+
:primary_endpoint => primary_endpoint
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
replica_groups.map do |k, v|
|
82
|
+
{
|
83
|
+
"replication_group_id" => k,
|
84
|
+
"primary_endpoint" => stringify_keys(v[:primary_endpoint])
|
85
|
+
}
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def redis_cluster_replica_groups_for_cfn_stack
|
90
|
+
cluster_replica_groups_for_cfn_stack(:redis)
|
91
|
+
end
|
92
|
+
|
68
93
|
def redis_cluster_nodes_for_cfn_stack
|
69
94
|
cluster_nodes_for_cfn_stack(:redis)
|
70
95
|
end
|
@@ -20,24 +20,13 @@ class Hiera
|
|
20
20
|
return r if r
|
21
21
|
|
22
22
|
args = key.split
|
23
|
-
|
24
|
-
|
25
|
-
# TODO: "rds" has been superseded by "rds_instances" but is still
|
26
|
-
# supported for backward compatibility. Remove it in a future
|
27
|
-
# version.
|
28
|
-
if %w(rds rds_instances).include? subkey
|
23
|
+
if args.shift == "rds_instances"
|
29
24
|
if args.length > 0
|
30
25
|
tags = Hash[args.map { |t| t.split("=") }]
|
31
26
|
db_instances_with_tags(tags)
|
32
27
|
else
|
33
28
|
db_instances
|
34
|
-
end.map
|
35
|
-
if subkey == "rds"
|
36
|
-
i[:endpoint][:address]
|
37
|
-
else
|
38
|
-
prepare_instance_data(i)
|
39
|
-
end
|
40
|
-
end
|
29
|
+
end.map { |i| prepare_instance_data(i) }
|
41
30
|
end
|
42
31
|
end
|
43
32
|
|
@@ -3,34 +3,6 @@ require "hiera/backend/aws/elasticache"
|
|
3
3
|
class Hiera
|
4
4
|
module Backend # rubocop:disable Documentation
|
5
5
|
describe Aws::ElastiCache do
|
6
|
-
let(:ec_redis_client) do
|
7
|
-
double(
|
8
|
-
:describe_cache_clusters => {
|
9
|
-
:cache_clusters => [{
|
10
|
-
:cache_nodes => [
|
11
|
-
{ :endpoint => { :address => "1.1.1.1", :port => 1234 } },
|
12
|
-
{ :endpoint => { :address => "2.2.2.2", :port => 1234 } }
|
13
|
-
|
14
|
-
],
|
15
|
-
:engine => "redis"
|
16
|
-
}]
|
17
|
-
}
|
18
|
-
)
|
19
|
-
end
|
20
|
-
let(:ec_memcached_client) do
|
21
|
-
double(
|
22
|
-
:describe_cache_clusters => {
|
23
|
-
:cache_clusters => [{
|
24
|
-
:cache_nodes => [
|
25
|
-
{ :endpoint => { :address => "3.3.3.3", :port => 5678 } },
|
26
|
-
{ :endpoint => { :address => "4.4.4.4", :port => 5678 } }
|
27
|
-
|
28
|
-
],
|
29
|
-
:engine => "memcached"
|
30
|
-
}]
|
31
|
-
}
|
32
|
-
)
|
33
|
-
end
|
34
6
|
let(:ec2_client) do
|
35
7
|
double(
|
36
8
|
:instances => {
|
@@ -54,29 +26,33 @@ class Hiera
|
|
54
26
|
}
|
55
27
|
)
|
56
28
|
end
|
29
|
+
let(:elasticache) do
|
30
|
+
scope = { "ec2_instance_id" => "some-ec2-instance-id" }
|
31
|
+
Aws::ElastiCache.new scope
|
32
|
+
end
|
33
|
+
|
34
|
+
let(:some_cache_node) { { :endpoint => { :address => "1.1.1.1", :port => 1234 } } }
|
35
|
+
let(:another_cache_node) { { :endpoint => { :address => "2.2.2.2", :port => 1234 } } }
|
57
36
|
|
58
37
|
before do
|
59
38
|
AWS::EC2.stub(:new => ec2_client)
|
60
39
|
AWS::CloudFormation.stub(:new => cfn_client)
|
61
40
|
end
|
62
41
|
|
63
|
-
describe "#
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
42
|
+
describe "#redis_cluster_nodes_for_cfn_stack" do
|
43
|
+
let(:cache_clusters) do
|
44
|
+
{
|
45
|
+
:cache_clusters => [{
|
46
|
+
:cache_nodes => [
|
47
|
+
some_cache_node,
|
48
|
+
another_cache_node
|
70
49
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
expect(elasticache.cache_nodes_by_cache_cluster_id).to eq ["1.1.1.1:1234", "2.2.2.2:1234"]
|
50
|
+
],
|
51
|
+
:engine => "redis"
|
52
|
+
}]
|
53
|
+
}
|
76
54
|
end
|
77
|
-
end
|
78
55
|
|
79
|
-
describe "#redis_cluster_nodes_for_cfn_stack" do
|
80
56
|
it "raises an exception when ec2_instance_id fact is missing" do
|
81
57
|
elasticache = Aws::ElastiCache.new
|
82
58
|
expect do
|
@@ -85,13 +61,171 @@ class Hiera
|
|
85
61
|
end
|
86
62
|
|
87
63
|
it "returns all Redis cluster nodes for CloudFormation stack of EC2 instance" do
|
88
|
-
|
89
|
-
|
90
|
-
AWS::ElastiCache::Client.stub(:new =>
|
64
|
+
client = double
|
65
|
+
allow(client).to receive(:describe_cache_clusters).and_return(cache_clusters)
|
66
|
+
AWS::ElastiCache::Client.stub(:new => client)
|
67
|
+
|
91
68
|
expect(elasticache.redis_cluster_nodes_for_cfn_stack).to eq ["1.1.1.1", "2.2.2.2"]
|
92
69
|
end
|
93
70
|
end
|
94
71
|
|
72
|
+
describe "#redis_cluster_replica_groups_for_cfn_stack" do
|
73
|
+
let(:cache_clusters) do
|
74
|
+
{
|
75
|
+
:cache_clusters => [{
|
76
|
+
:cache_nodes => [
|
77
|
+
some_cache_node,
|
78
|
+
|
79
|
+
],
|
80
|
+
:replication_group_id => "some-group-id",
|
81
|
+
:engine => "redis",
|
82
|
+
}]
|
83
|
+
}
|
84
|
+
end
|
85
|
+
let(:replication_groups) do
|
86
|
+
{
|
87
|
+
:replication_groups => [{
|
88
|
+
:node_groups => [{
|
89
|
+
:primary_endpoint => { :address => "some.replication.group.primary.endpoint", :port => 1234 }
|
90
|
+
}]
|
91
|
+
}]
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
it "returns all Redis replica groups for CloudFormation stack of EC2 instance" do
|
96
|
+
client = double
|
97
|
+
allow(client).to receive(:describe_cache_clusters).and_return(cache_clusters)
|
98
|
+
allow(client).to receive(:describe_replication_groups).with(:replication_group_id => "some-group-id").and_return(replication_groups)
|
99
|
+
AWS::ElastiCache::Client.stub(:new => client)
|
100
|
+
|
101
|
+
expect(elasticache.redis_cluster_replica_groups_for_cfn_stack).to eq [
|
102
|
+
{
|
103
|
+
"replication_group_id" => "some-group-id",
|
104
|
+
"primary_endpoint" => { "address" => "some.replication.group.primary.endpoint", "port" => 1234 }
|
105
|
+
},
|
106
|
+
]
|
107
|
+
end
|
108
|
+
|
109
|
+
context "multiple defined cache clusters are in the same replica group" do
|
110
|
+
let(:cache_clusters) do
|
111
|
+
{
|
112
|
+
:cache_clusters => [
|
113
|
+
{
|
114
|
+
:cache_nodes => [
|
115
|
+
some_cache_node,
|
116
|
+
],
|
117
|
+
:replication_group_id => "some-group-id",
|
118
|
+
:engine => "redis",
|
119
|
+
},
|
120
|
+
{
|
121
|
+
:cache_nodes => [
|
122
|
+
another_cache_node,
|
123
|
+
],
|
124
|
+
:replication_group_id => "some-group-id",
|
125
|
+
:engine => "redis",
|
126
|
+
},
|
127
|
+
]
|
128
|
+
}
|
129
|
+
end
|
130
|
+
let(:replication_groups) do
|
131
|
+
{
|
132
|
+
:replication_groups => [{
|
133
|
+
:node_groups => [{
|
134
|
+
:primary_endpoint => { :address => "some.replication.group.primary.endpoint", :port => 1234 }
|
135
|
+
}]
|
136
|
+
}]
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
it "returns a deduplicated list of Redis replica groups" do
|
141
|
+
client = double
|
142
|
+
allow(client).to receive(:describe_cache_clusters).and_return(cache_clusters)
|
143
|
+
allow(client).to receive(:describe_replication_groups).with(:replication_group_id => "some-group-id").and_return(replication_groups)
|
144
|
+
AWS::ElastiCache::Client.stub(:new => client)
|
145
|
+
|
146
|
+
expect(elasticache.redis_cluster_replica_groups_for_cfn_stack).to eq [
|
147
|
+
{
|
148
|
+
"replication_group_id" => "some-group-id",
|
149
|
+
"primary_endpoint" => { "address" => "some.replication.group.primary.endpoint", "port" => 1234 }
|
150
|
+
},
|
151
|
+
]
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
context "one defined cluster is found without replica group" do
|
156
|
+
let(:cfn_client) do
|
157
|
+
double(
|
158
|
+
:stacks => {
|
159
|
+
"some-stack-name" => double(
|
160
|
+
:resources => [
|
161
|
+
double(
|
162
|
+
:resource_type => "AWS::ElastiCache::CacheCluster",
|
163
|
+
:physical_resource_id => "some-cluster-id"
|
164
|
+
),
|
165
|
+
double(
|
166
|
+
:resource_type => "AWS::ElastiCache::CacheCluster",
|
167
|
+
:physical_resource_id => "another-cluster-id"
|
168
|
+
),
|
169
|
+
]
|
170
|
+
)
|
171
|
+
}
|
172
|
+
)
|
173
|
+
end
|
174
|
+
let(:cache_clusters) do
|
175
|
+
{
|
176
|
+
"some-cluster-id" => {
|
177
|
+
:cache_clusters => [
|
178
|
+
{
|
179
|
+
:cache_nodes => [
|
180
|
+
some_cache_node,
|
181
|
+
],
|
182
|
+
:replication_group_id => "some-group-id",
|
183
|
+
:engine => "redis",
|
184
|
+
},
|
185
|
+
]
|
186
|
+
},
|
187
|
+
"another-cluster-id" => {
|
188
|
+
:cache_clusters => [
|
189
|
+
{
|
190
|
+
:cache_nodes => [
|
191
|
+
another_cache_node,
|
192
|
+
],
|
193
|
+
:engine => "redis",
|
194
|
+
},
|
195
|
+
]
|
196
|
+
}
|
197
|
+
}
|
198
|
+
end
|
199
|
+
let(:replication_groups) do
|
200
|
+
{
|
201
|
+
:replication_groups => [{
|
202
|
+
:node_groups => [{
|
203
|
+
:primary_endpoint => { :address => "some.replication.group.primary.endpoint", :port => 1234 }
|
204
|
+
}]
|
205
|
+
}]
|
206
|
+
}
|
207
|
+
end
|
208
|
+
|
209
|
+
it "returns all Redis replica groups and does not fail" do
|
210
|
+
|
211
|
+
client = double
|
212
|
+
allow(client).to receive(:describe_cache_clusters) do |options|
|
213
|
+
cache_clusters.fetch(options.fetch(:cache_cluster_id))
|
214
|
+
end
|
215
|
+
|
216
|
+
allow(client).to receive(:describe_replication_groups).with(:replication_group_id => "some-group-id").and_return(replication_groups)
|
217
|
+
AWS::ElastiCache::Client.stub(:new => client)
|
218
|
+
|
219
|
+
expect(elasticache.redis_cluster_replica_groups_for_cfn_stack).to eq [
|
220
|
+
{
|
221
|
+
"replication_group_id" => "some-group-id",
|
222
|
+
"primary_endpoint" => { "address" => "some.replication.group.primary.endpoint", "port" => 1234 }
|
223
|
+
},
|
224
|
+
]
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
95
229
|
describe "#memcached_cluster_nodes_for_cfn_stack" do
|
96
230
|
it "raises an exception when ec2_instance_id fact is missing" do
|
97
231
|
elasticache = Aws::ElastiCache.new
|
@@ -100,11 +234,27 @@ class Hiera
|
|
100
234
|
end.to raise_error Aws::MissingFactError
|
101
235
|
end
|
102
236
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
237
|
+
context "single cache cluster" do
|
238
|
+
let(:cache_clusters) do
|
239
|
+
{
|
240
|
+
:cache_clusters => [{
|
241
|
+
:cache_nodes => [
|
242
|
+
{ :endpoint => { :address => "3.3.3.3", :port => 5678 } },
|
243
|
+
{ :endpoint => { :address => "4.4.4.4", :port => 5678 } }
|
244
|
+
|
245
|
+
],
|
246
|
+
:engine => "memcached"
|
247
|
+
}]
|
248
|
+
}
|
249
|
+
end
|
250
|
+
|
251
|
+
it "returns all Memcached cluster nodes for CloudFormation stack of EC2 instance" do
|
252
|
+
client = double
|
253
|
+
allow(client).to receive(:describe_cache_clusters).and_return(cache_clusters)
|
254
|
+
AWS::ElastiCache::Client.stub(:new => client)
|
255
|
+
|
256
|
+
expect(elasticache.memcached_cluster_nodes_for_cfn_stack).to eq ["3.3.3.3", "4.4.4.4"]
|
257
|
+
end
|
108
258
|
end
|
109
259
|
end
|
110
260
|
end
|
data/spec/aws_rds_spec.rb
CHANGED
@@ -58,36 +58,7 @@ class Hiera
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
# supported for backward compatibility. Remove it in a future
|
63
|
-
# version.
|
64
|
-
describe "rds lookup (deprecated)" do
|
65
|
-
let(:scope) { { "aws_account_number" => "12345678" } }
|
66
|
-
|
67
|
-
it "returns nil if Hiera key is unknown" do
|
68
|
-
expect(rds.lookup("doge", scope)).to be_nil
|
69
|
-
end
|
70
|
-
|
71
|
-
it "returns all database instances if no tags are provided" do
|
72
|
-
expect(rds.lookup("rds", scope)).to eq ["db1.some-region.rds.amazonaws.com",
|
73
|
-
"db2.some-region.rds.amazonaws.com",
|
74
|
-
"db3.some-region.rds.amazonaws.com"]
|
75
|
-
end
|
76
|
-
|
77
|
-
it "returns database instances with specific tags" do
|
78
|
-
expect(rds.lookup("rds role=mgmt-db", scope)).to eq ["db2.some-region.rds.amazonaws.com",
|
79
|
-
"db3.some-region.rds.amazonaws.com"]
|
80
|
-
expect(rds.lookup("rds environment=dev", scope)).to eq ["db1.some-region.rds.amazonaws.com",
|
81
|
-
"db2.some-region.rds.amazonaws.com"]
|
82
|
-
expect(rds.lookup("rds environment=production role=mgmt-db", scope)).to eq ["db3.some-region.rds.amazonaws.com"]
|
83
|
-
end
|
84
|
-
|
85
|
-
it "returns empty array if no database instances can be found" do
|
86
|
-
expect(rds.lookup("rds environment=staging", scope)).to eq []
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
describe "rds_instances lookup" do
|
61
|
+
describe "#lookup" do
|
91
62
|
let(:scope) { { "aws_account_number" => "12345678" } }
|
92
63
|
|
93
64
|
it "returns nil if Hiera key is unknown" do
|
metadata
CHANGED
@@ -1,90 +1,103 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Mathias Lafeldt
|
8
9
|
- Deniz Adrian
|
10
|
+
- Soenke Ruempler
|
9
11
|
autorequire:
|
10
12
|
bindir: bin
|
11
13
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
14
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
13
15
|
dependencies:
|
14
16
|
- !ruby/object:Gem::Dependency
|
15
17
|
name: aws-sdk
|
16
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
17
20
|
requirements:
|
18
|
-
- - '>='
|
21
|
+
- - ! '>='
|
19
22
|
- !ruby/object:Gem::Version
|
20
23
|
version: '0'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
24
28
|
requirements:
|
25
|
-
- - '>='
|
29
|
+
- - ! '>='
|
26
30
|
- !ruby/object:Gem::Version
|
27
31
|
version: '0'
|
28
32
|
- !ruby/object:Gem::Dependency
|
29
33
|
name: bundler
|
30
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
31
36
|
requirements:
|
32
|
-
- - '>='
|
37
|
+
- - ! '>='
|
33
38
|
- !ruby/object:Gem::Version
|
34
39
|
version: '0'
|
35
40
|
type: :development
|
36
41
|
prerelease: false
|
37
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
38
44
|
requirements:
|
39
|
-
- - '>='
|
45
|
+
- - ! '>='
|
40
46
|
- !ruby/object:Gem::Version
|
41
47
|
version: '0'
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
49
|
name: rake
|
44
50
|
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
45
52
|
requirements:
|
46
|
-
- - '>='
|
53
|
+
- - ! '>='
|
47
54
|
- !ruby/object:Gem::Version
|
48
55
|
version: '0'
|
49
56
|
type: :development
|
50
57
|
prerelease: false
|
51
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
52
60
|
requirements:
|
53
|
-
- - '>='
|
61
|
+
- - ! '>='
|
54
62
|
- !ruby/object:Gem::Version
|
55
63
|
version: '0'
|
56
64
|
- !ruby/object:Gem::Dependency
|
57
65
|
name: rspec
|
58
66
|
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
59
68
|
requirements:
|
60
|
-
- - '>='
|
69
|
+
- - ! '>='
|
61
70
|
- !ruby/object:Gem::Version
|
62
71
|
version: '0'
|
63
72
|
type: :development
|
64
73
|
prerelease: false
|
65
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
66
76
|
requirements:
|
67
|
-
- - '>='
|
77
|
+
- - ! '>='
|
68
78
|
- !ruby/object:Gem::Version
|
69
79
|
version: '0'
|
70
80
|
- !ruby/object:Gem::Dependency
|
71
81
|
name: rubocop
|
72
82
|
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
73
84
|
requirements:
|
74
|
-
- - '>='
|
85
|
+
- - ! '>='
|
75
86
|
- !ruby/object:Gem::Version
|
76
87
|
version: '0'
|
77
88
|
type: :development
|
78
89
|
prerelease: false
|
79
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
80
92
|
requirements:
|
81
|
-
- - '>='
|
93
|
+
- - ! '>='
|
82
94
|
- !ruby/object:Gem::Version
|
83
95
|
version: '0'
|
84
96
|
description: Hiera AWS Backend
|
85
97
|
email:
|
86
98
|
- mathias.lafeldt@jimdo.com
|
87
99
|
- deniz.adrian@jimdo.com
|
100
|
+
- soenke.ruempler@jimdo.com
|
88
101
|
executables: []
|
89
102
|
extensions: []
|
90
103
|
extra_rdoc_files: []
|
@@ -109,26 +122,27 @@ files:
|
|
109
122
|
homepage: https://github.com/Jimdo/hiera-aws
|
110
123
|
licenses:
|
111
124
|
- Apache 2.0
|
112
|
-
metadata: {}
|
113
125
|
post_install_message:
|
114
126
|
rdoc_options: []
|
115
127
|
require_paths:
|
116
128
|
- lib
|
117
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
118
131
|
requirements:
|
119
|
-
- - '>='
|
132
|
+
- - ! '>='
|
120
133
|
- !ruby/object:Gem::Version
|
121
134
|
version: '0'
|
122
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
123
137
|
requirements:
|
124
|
-
- - '>='
|
138
|
+
- - ! '>='
|
125
139
|
- !ruby/object:Gem::Version
|
126
140
|
version: '0'
|
127
141
|
requirements: []
|
128
142
|
rubyforge_project:
|
129
|
-
rubygems_version:
|
143
|
+
rubygems_version: 1.8.23
|
130
144
|
signing_key:
|
131
|
-
specification_version:
|
145
|
+
specification_version: 3
|
132
146
|
summary: Hiera AWS Backend
|
133
147
|
test_files:
|
134
148
|
- spec/aws_backend_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: eed5fc6fc7e3723477b66a94f61fb6f9192320dc
|
4
|
-
data.tar.gz: 0c7263e0a1706423950e1b2492d523066cb12293
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 31a9141fbe5a274ff9e978446c4a87f57b5353c3ff9c77140ffca86dc1dfd74ffa50d92bc6c70a1a17f17a645e5e5899b5bffed9eafb0f972e74c3daa740958d
|
7
|
-
data.tar.gz: f131c2343c0fb05f3de4c48a8a39b73dcfb91a2e6544a61ac394946636223d2e086549dd713dd937bbf37ac0d094617fd5157db2af98b881a4aae2d0cb46094e
|