build-cloud 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +2 -0
- data/build-cloud.gemspec +1 -1
- data/lib/build-cloud/r53recordset.rb +1 -2
- data/lib/build-cloud/vpc.rb +21 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39aa180c26085846c7d4e2aaba7f84415d52cb47c2ec250cc492961c0f83188f
|
4
|
+
data.tar.gz: a6caef57c83912476052187c9eecac72de9763bb30100bf7d92a245884332d3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff2c446f7bee23d38d51b221da0cd6badc644eadfc6ca5fa32f4ed251eb97a91d4cc21fcdad315cc59a49bf808c5a99e34581350879c220299855f1303eed6f5
|
7
|
+
data.tar.gz: 95dfa911a13abacfd75831add16fccacc2c21e717bba4633d910da984bb963e36bb6facccdf74076fbbb6924a278dcc69f25cf37830b1d55a66490489ea75603
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
2018-04-12 - version 1.0.1 - VPC's now lifecycle tags.
|
4
|
+
|
3
5
|
2017-11-13 - version 0.0.24 - Fix a bug which prevented working with IAM roles in AWS accounts with more than 100 roles. Thank you @markchalloner!
|
4
6
|
|
5
7
|
2017-03-01 - version 0.0.23 - Fix a bug where non-string values for interpolated variables caused a crash.
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# Build::Cloud
|
2
|
+
[![Build Status](https://travis-ci.org/scalefactory/build-cloud.svg?branch=master)](https://travis-ci.org/scalefactory/build-cloud)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/build-cloud.svg)](https://badge.fury.io/rb/build-cloud)
|
2
4
|
|
3
5
|
Tools for building resources in AWS
|
4
6
|
|
data/build-cloud.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "build-cloud"
|
7
|
-
spec.version = "1.0.
|
7
|
+
spec.version = "1.0.1"
|
8
8
|
spec.authors = ["The Scale Factory"]
|
9
9
|
spec.email = ["info@scalefactory.com"]
|
10
10
|
spec.summary = %q{Tools for building resources in AWS}
|
data/lib/build-cloud/vpc.rb
CHANGED
@@ -35,19 +35,27 @@ class BuildCloud::VPC
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def create
|
38
|
-
|
39
|
-
return if exists?
|
40
|
-
|
41
|
-
@log.info( "Creating new VPC for #{@options[:cidr_block]}" )
|
42
38
|
|
43
39
|
options = @options.dup
|
40
|
+
tag_name = options.delete(:name)
|
41
|
+
|
42
|
+
if !options[:tags]
|
43
|
+
options[:tags] = { 'Name' => tag_name }
|
44
|
+
end
|
45
|
+
|
46
|
+
if exists?
|
47
|
+
# If exists update tags
|
48
|
+
create_tags(options[:tags])
|
49
|
+
return
|
50
|
+
end
|
44
51
|
|
45
|
-
|
52
|
+
|
53
|
+
@log.info( "Creating new VPC for #{@options[:cidr_block]}" )
|
46
54
|
|
47
55
|
vpc = @compute.vpcs.new( options )
|
48
56
|
vpc.save
|
49
57
|
|
50
|
-
|
58
|
+
create_tags(tags)
|
51
59
|
|
52
60
|
wait_until_ready
|
53
61
|
|
@@ -84,5 +92,11 @@ class BuildCloud::VPC
|
|
84
92
|
@options[key]
|
85
93
|
end
|
86
94
|
|
87
|
-
|
95
|
+
def create_tags(tags)
|
96
|
+
if tags != fog_object.tags
|
97
|
+
@log.info("Updating tags")
|
98
|
+
@compute.create_tags( fog_object.id, tags )
|
99
|
+
end
|
100
|
+
end
|
88
101
|
|
102
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Scale Factory
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|