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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28ec4b294e4916cb3a60b0635b8b7af526639ac9b05949b5d4e53637840409d0
4
- data.tar.gz: acaa3428a63f54e84078c1615b934a416e92e0161961d84e58684ee3d4c65eb1
3
+ metadata.gz: b9fe826eb909d7aacfaa749ce2dda50fa78f661ca0118f98382dafe89a0719d6
4
+ data.tar.gz: 27fc99982138438e710edeb13667615f9899a88d01bb8bb4711ae9b1160b02e7
5
5
  SHA512:
6
- metadata.gz: 516dc4b01e868ba041c9d56eeaea5fdde322f00a79b29529afe378f83eff09980614b5017a0dfcddb55b2e90f0c7119aee6ef79a191054bcade5b7c787371d6f
7
- data.tar.gz: be2fac1b8f4cbd8e1bceed188a7d7257fc56ed5a4300064c6a4385034b1113416a5eda544aae6bceb4d8af6a3eac1af4c93c7bcc2bcd477ac437d7a6f676414c
6
+ metadata.gz: 84503f0be3e434f230b6c960d9ede2f29907555cc7493c8f7bc0373f56c362f5c764a2de0b250c6356b0625c960e3c385cf79ab1449afbfaf2f8e0c18653679b
7
+ data.tar.gz: 67dc8e464180f8acd84887ba59b4eed66c39a67f22ee3352b4cdfcdbcb1bce6619d89977fb188e05e9f771acc82e06bec0caa298f922e121a77df12cda71d4b5
@@ -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
- # main vpc_id and db_subnet_group_name are set here.
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
- main:
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"] ||= main_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 main_db_subnet_group_name
48
- AwsRds.config["defaults"]["db_subnet_group_name"]
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 default db subnet group name was set.
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 default db_subnet_group_name to your config/#{AwsRds.env}.yml.
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 default db_subnet_group_name setting. Example config/#{AwsRds.env}.yml:
56
+ To specify a fallback db_subnet_group_name setting. Example config/#{AwsRds.env}.yml:
57
57
 
58
58
  ---
59
- defaults:
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: [main_vpc_id]},
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: main_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 main_vpc_id
31
- AwsRds.config["defaults"]["vpc_id"]
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 default vpc id from your config/#{AwsRds.env}.yml.
36
- Please specify a default vpc_id setting.
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
- defaults:
40
+ fallback:
41
41
  vpc_id: vpc-123
42
42
  EOL
43
43
  exit 1
@@ -1,3 +1,3 @@
1
1
  module AwsRds
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-rds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen