roadworker 0.5.8.beta3 → 0.5.8.beta4
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/lib/roadworker/route53-ext.rb +27 -0
- data/lib/roadworker/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: bc35f600b3ec83655e747b63fff74fc181d54147
|
|
4
|
+
data.tar.gz: 20c6b948cba37a174335c120a760fee39ada5348
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21acfca59425084c2cd3215a5e129b1befdb0efc70d279291d6e09131adbe41b3e6a43007bdb76103e941cc0afdfb4515e9392ef7ad62c129b53beb2091a721a
|
|
7
|
+
data.tar.gz: 372f4cebd7adc15e5f4ae27454693ff4fcef45acc8e5b1013af1e763e6d5bb8bb8cfa868b42ea90d5f68dc8fd000782a00f09c4cb9ffadde7f656d598658db6b
|
|
@@ -50,6 +50,22 @@ module Aws
|
|
|
50
50
|
# http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html
|
|
51
51
|
CF_HOSTED_ZONE_ID = 'Z2FDTNDATAQYW2'
|
|
52
52
|
|
|
53
|
+
# http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region
|
|
54
|
+
ELASTIC_BEANSTALK_HOSTED_ZONE_NAME_IDS = {
|
|
55
|
+
'ap-northeast-1' => 'Z1R25G3KIG2GBW',
|
|
56
|
+
'ap-northeast-2' => 'Z3JE5OI70TWKCP',
|
|
57
|
+
'ap-south-1' => 'Z18NTBI3Y7N9TZ',
|
|
58
|
+
'ap-southeast-1' => 'Z16FZ9L249IFLT',
|
|
59
|
+
'ap-southeast-2' => 'Z2PCDNR3VC2G1N',
|
|
60
|
+
'eu-central-1' => 'Z1FRNW7UH4DEZJ',
|
|
61
|
+
'eu-west-1' => 'Z2NYPWQ7DFZAZH',
|
|
62
|
+
'sa-east-1' => 'Z10X7K2B4QSOFV',
|
|
63
|
+
'us-east-1' => 'Z117KPS5GTRQ2G',
|
|
64
|
+
'us-east-2' => 'Z14LCN19Q5QHIC',
|
|
65
|
+
'us-west-1' => 'Z1LQECGX5PH1X',
|
|
66
|
+
'us-west-2' => 'Z38NKT9BP95V3O',
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
class << self
|
|
54
70
|
def normalize_dns_name_options(src)
|
|
55
71
|
dst = {}
|
|
@@ -81,6 +97,9 @@ module Aws
|
|
|
81
97
|
cf_dns_name_to_alias_target(name)
|
|
82
98
|
elsif name =~ /(\A|\.)#{Regexp.escape(hosted_zone_name)}\z/i
|
|
83
99
|
this_hz_dns_name_to_alias_target(name, hosted_zone_id)
|
|
100
|
+
elsif name =~ /\.([^.]+)\.elasticbeanstalk\.com\z/i
|
|
101
|
+
region = $1.downcase
|
|
102
|
+
eb_dns_name_to_alias_target(name, region)
|
|
84
103
|
else
|
|
85
104
|
raise "Invalid DNS Name: #{name}"
|
|
86
105
|
end
|
|
@@ -139,6 +158,14 @@ module Aws
|
|
|
139
158
|
:evaluate_target_health => false, # XXX:
|
|
140
159
|
}
|
|
141
160
|
end
|
|
161
|
+
|
|
162
|
+
def eb_dns_name_to_alias_target(name, region)
|
|
163
|
+
{
|
|
164
|
+
:hosted_zone_id => ELASTIC_BEANSTALK_HOSTED_ZONE_NAME_IDS[region],
|
|
165
|
+
:dns_name => name,
|
|
166
|
+
:evaluate_target_health => false, # XXX:
|
|
167
|
+
}
|
|
168
|
+
end
|
|
142
169
|
end # of class method
|
|
143
170
|
|
|
144
171
|
end # Route53
|
data/lib/roadworker/version.rb
CHANGED