vagrant-aws-dns 0.1.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23b18a94636d2584b680393fc40e08e3a372008c
4
- data.tar.gz: 2ea3bb8f2b91767d0b3f0ff738e09e2313cf6548
3
+ metadata.gz: b9f7e44e05e1c7569905cbf9ad7ce4aa334954b1
4
+ data.tar.gz: bdab77b308b1143f0ca5427bbd6e7e2224a290ba
5
5
  SHA512:
6
- metadata.gz: 18a4d9ee86b754ac489bc5afb4a321d4a262b20e5a8279d5dcc138ee722a5dd859776c42a69369460cd8e920c0ed87747c21a1b8c4ae74ce08fe67dc203b73fb
7
- data.tar.gz: f8cb31bfd4723793e1ec6064fc030ae97bfbbbdc2807306d4867d323d219c80232caf9f4d6a20ee125140014de4105fd101cea64e7ff0eadb1c2b77136667466
6
+ metadata.gz: 260de9063374602ae142ddc6288629585e551361cd0a27156b00fcbfba5818a3f3af810c48c761283e3861ca58b20e8814a14a6c387572d776ebee5ce72ae62d
7
+ data.tar.gz: 5c51bd8805419e353f6fa9088b8fc3e0eca8b1351c45bb3c7213d71b6126d6bc70b003047d329363a68299e3f6cb06d5d469c70071cac42f97d1783040483dd9
data/README.md CHANGED
@@ -6,8 +6,14 @@
6
6
 
7
7
  ## Behaviors
8
8
 
9
- * Set route53 records on machine up.
9
+ * Add/update route53 records on machine up.
10
10
  * Remove associated route53 records on machine halt/destroy.
11
+
12
+ ## Release notes
13
+ #### 0.2.0
14
+
15
+ - Adding multiple HOSTED_ZONE_ID support.
16
+ - Upgrade aws-sdk to 2.2.9.
11
17
 
12
18
  ## Installation
13
19
 
@@ -32,8 +38,7 @@ Vagrant.configure("2") do |config|
32
38
  override.ssh.username = "ubuntu"
33
39
  override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
34
40
 
35
- override.dns.hosted_zone_id = 'HOSTED ZONE ID'
36
- override.dns.record_sets = [['subdomain1.domain.com', 'A', '4.3.2.1'], ['subdomain2.domain.com', 'A']]
41
+ override.dns.record_sets = [%w(HOSTED_ZONE_ID_1 subdomain.domain1.com A 4.3.2.1), %w(HOSTED_ZONE_ID_2 subdomain.domain2.com A)]
37
42
  end
38
43
  ```
39
44
 
@@ -41,9 +46,9 @@ Vagrant.configure("2") do |config|
41
46
 
42
47
  `record_sets` is an array of record set that are also represented as arrays. Below are some examples:
43
48
 
44
- * `['subdomain.domain.com', 'A']` - This will set a record of type `subdomain.domain.com. A <public_ip>`, the <public_ip> is auto detected.
45
- * `['subdomain.domain.com', 'A', '4.3.2.1']` - This will set a record of type `subdomain.domain.com. A 4.3.2.1`.
46
- * `['subdomain.domain1.com', 'CNAME', 'domain2.com']` - This will set a record of type `subdomain.domain1.com. CNAME domain2.com.`.
49
+ * `%w(HOSTED_ZONE_ID subdomain.domain.com A)` - This will set a record of type `subdomain.domain.com. A <public_ip>`, the <public_ip> is auto detected.
50
+ * `%w(HOSTED_ZONE_ID subdomain.domain.com A 4.3.2.1)` - This will set a record of type `subdomain.domain.com. A 4.3.2.1`.
51
+ * `%w(HOSTED_ZONE_ID subdomain.domain.com CNAME domain2.com)` - This will set a record of type `subdomain.domain1.com. CNAME domain2.com.`.
47
52
 
48
53
  ## FAQ
49
54
 
@@ -7,8 +7,8 @@ module VagrantPlugins
7
7
  class AddRecord < Base
8
8
 
9
9
  def call(env)
10
- super env do |record, type, value|
11
- @aws.add_record(@machine.config.dns.hosted_zone_id, record, type, value)
10
+ super env do |hosted_zone_id, record, type, value|
11
+ @aws.add_record(hosted_zone_id, record, type, value)
12
12
  @machine.ui.info("Add dns record #{record} pointing to #{value}.")
13
13
  end
14
14
  end
@@ -13,15 +13,15 @@ module VagrantPlugins
13
13
  end
14
14
 
15
15
  def call(env)
16
- return @app.call(env) if @machine.config.dns.hosted_zone_id.nil? && @machine.config.dns.record_sets.nil?
16
+ return @app.call(env) if @machine.config.dns.record_sets.nil?
17
17
 
18
18
  @aws = AwsDns::Util::AwsUtil.new(@machine.provider_config.access_key_id,
19
19
  @machine.provider_config.secret_access_key)
20
20
  public_ip = @aws.get_public_ip(@machine.id)
21
21
 
22
22
  @machine.config.dns.record_sets.each do |record_set|
23
- record, type, value = record_set
24
- yield record, type, value || public_ip if block_given?
23
+ hosted_zone_id, record, type, value = record_set
24
+ yield hosted_zone_id, record, type, value || public_ip if block_given?
25
25
  end
26
26
 
27
27
  @app.call(env)
@@ -7,8 +7,8 @@ module VagrantPlugins
7
7
  class RemoveRecord < Base
8
8
 
9
9
  def call(env)
10
- super env do |record, type, value|
11
- @aws.remove_record(@machine.config.dns.hosted_zone_id, record, type, value)
10
+ super env do |hosted_zone_id, record, type, value|
11
+ @aws.remove_record(hosted_zone_id, record, type, value)
12
12
  @machine.ui.info("Removing dns record #{record}.")
13
13
  end
14
14
  end
@@ -21,8 +21,6 @@ module VagrantPlugins
21
21
  finalize!
22
22
 
23
23
  errors = _detected_errors
24
- errors << 'hosted_zone_id is required' if @hosted_zone_id.nil? && !@record_sets.nil?
25
- errors << 'record_sets is required' if @record_sets.nil? && !hosted_zone_id.nil?
26
24
 
27
25
  { 'AwsDns' => errors }
28
26
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module AwsDns
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency 'aws-sdk', '~> 2.2.8'
22
+ spec.add_dependency 'aws-sdk', '~> 2.2.9'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.10"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-aws-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nassim Kacha
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-09 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.8
19
+ version: 2.2.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.8
26
+ version: 2.2.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement