aws-rds 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/docs/example/config/development.yml +2 -2
- data/lib/aws_rds/create/params.rb +7 -7
- data/lib/aws_rds/security_group.rb +7 -7
- data/lib/aws_rds/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9fe826eb909d7aacfaa749ce2dda50fa78f661ca0118f98382dafe89a0719d6
|
4
|
+
data.tar.gz: 27fc99982138438e710edeb13667615f9899a88d01bb8bb4711ae9b1160b02e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84503f0be3e434f230b6c960d9ede2f29907555cc7493c8f7bc0373f56c362f5c764a2de0b250c6356b0625c960e3c385cf79ab1449afbfaf2f8e0c18653679b
|
7
|
+
data.tar.gz: 67dc8e464180f8acd84887ba59b4eed66c39a67f22ee3352b4cdfcdbcb1bce6619d89977fb188e05e9f771acc82e06bec0caa298f922e121a77df12cda71d4b5
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.5.0]
|
7
|
+
- change config/env.yml option name to: fallback vpc_id and db_subnet_group_name
|
8
|
+
|
6
9
|
## [0.4.0]
|
7
10
|
- security-group-name option to create a security group if not specified in profile with vpc_security_group_ids
|
8
11
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
#
|
2
|
+
# fallback vpc_id and db_subnet_group_name are set here.
|
3
3
|
# This could be the AWS default vpc or a custom VPC.
|
4
|
-
|
4
|
+
fallback:
|
5
5
|
# vpc_id is used by the --security-group-name option.
|
6
6
|
# The --security-group-name option tells aws-rds to use the existing security group
|
7
7
|
# with the specified name. Or it will create it under the vpc_id if it does
|
@@ -40,23 +40,23 @@ class AwsRds::Create
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def set_db_subnet_group(params)
|
43
|
-
params["db_subnet_group_name"] ||=
|
43
|
+
params["db_subnet_group_name"] ||= fallback_db_subnet_group_name
|
44
44
|
params
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
48
|
-
AwsRds.config["
|
47
|
+
def fallback_db_subnet_group_name
|
48
|
+
AwsRds.config["fallback"]["db_subnet_group_name"]
|
49
49
|
rescue NoMethodError => e
|
50
50
|
puts e.message
|
51
51
|
puts <<-EOL
|
52
|
-
No db_subnet_group_name was specified in your profile. Also, a
|
52
|
+
No db_subnet_group_name was specified in your profile. Also, a fallback db subnet group name was set.
|
53
53
|
|
54
|
-
Please add a db_subnet_group_name in your profile file or add a
|
54
|
+
Please add a db_subnet_group_name in your profile file or add a fallback db_subnet_group_name to your config/#{AwsRds.env}.yml.
|
55
55
|
|
56
|
-
To specify a
|
56
|
+
To specify a fallback db_subnet_group_name setting. Example config/#{AwsRds.env}.yml:
|
57
57
|
|
58
58
|
---
|
59
|
-
|
59
|
+
fallback:
|
60
60
|
db_subnet_group_name: my-db-subnet-group
|
61
61
|
EOL
|
62
62
|
exit 1
|
@@ -6,7 +6,7 @@ module AwsRds
|
|
6
6
|
def find_or_create(name)
|
7
7
|
resp = ec2.describe_security_groups(
|
8
8
|
filters: [
|
9
|
-
{name: 'vpc-id', values: [
|
9
|
+
{name: 'vpc-id', values: [fallback_vpc_id]},
|
10
10
|
{name: 'group-name', values: [name]}]
|
11
11
|
)
|
12
12
|
sg = resp.security_groups.first
|
@@ -16,7 +16,7 @@ module AwsRds
|
|
16
16
|
result = ec2.create_security_group(
|
17
17
|
group_name: name,
|
18
18
|
description: name,
|
19
|
-
vpc_id:
|
19
|
+
vpc_id: fallback_vpc_id,
|
20
20
|
)
|
21
21
|
# TODO: add waiter
|
22
22
|
# ec2.create_tags(
|
@@ -27,17 +27,17 @@ module AwsRds
|
|
27
27
|
resp.security_groups.first
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
AwsRds.config["
|
30
|
+
def fallback_vpc_id
|
31
|
+
AwsRds.config["fallback"]["vpc_id"]
|
32
32
|
rescue NoMethodError => e
|
33
33
|
puts e.message
|
34
34
|
puts <<-EOL
|
35
|
-
Unable to load a
|
36
|
-
Please specify a
|
35
|
+
Unable to load a fallback vpc id from your config/#{AwsRds.env}.yml.
|
36
|
+
Please specify a fallback vpc_id setting.
|
37
37
|
|
38
38
|
Example config/#{AwsRds.env}.yml:
|
39
39
|
---
|
40
|
-
|
40
|
+
fallback:
|
41
41
|
vpc_id: vpc-123
|
42
42
|
EOL
|
43
43
|
exit 1
|
data/lib/aws_rds/version.rb
CHANGED