terraspace 0.1.0 → 0.1.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 +3 -0
- data/README.md +6 -4
- data/lib/terraspace/cli.rb +1 -0
- data/lib/terraspace/cli/new/sequence.rb +1 -1
- data/lib/terraspace/cli/summary.rb +1 -1
- data/lib/terraspace/plugin/summary/interface.rb +4 -4
- data/lib/terraspace/version.rb +1 -1
- 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: aaf22ae87af9bb9007e2a7c7a7b2b79f15c9f8303fe47257fc869219c4cb0feb
|
4
|
+
data.tar.gz: f632c63f5fed2f8b8483cdfd04ef7f50a1fe912a2595b5325c7aef7ed9ac944a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0463d2d835a44d3c0a2e607f3903856e018881ebac0c96d06324e0387b3908ae7202216f0bdc71b79d2e739e7c1cdf5c600853397418ea7525f9437fce4814d6
|
7
|
+
data.tar.gz: f2017f4f70d426a3f5e4449c788301ab82e287caa35f453244c019580c8b628d4bdd8fc040e078cb8b50cd924dbe3a6b97e63821a59384787d173f751cffbee3
|
data/CHANGELOG.md
CHANGED
@@ -3,5 +3,8 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.1.1]
|
7
|
+
- #32 terraspace summary --short option
|
8
|
+
|
6
9
|
## [0.1.0]
|
7
10
|
- Initial release
|
data/README.md
CHANGED
@@ -10,14 +10,16 @@ Official Docs Site: [terraspace.cloud](https://terraspace.cloud)
|
|
10
10
|
|
11
11
|
## Quick Start
|
12
12
|
|
13
|
-
|
13
|
+
Here are commands to get started:
|
14
14
|
|
15
15
|
terraspace new project infra --plugin aws --examples
|
16
16
|
cd infra
|
17
17
|
terraspace up demo
|
18
18
|
terraspace down demo
|
19
19
|
|
20
|
-
The
|
20
|
+
* The `new` command generates a starter project.
|
21
|
+
* The `up` command creates an s3 bucket.
|
22
|
+
* The `down` command cleans up and deletes the bucket.
|
21
23
|
|
22
24
|
The default plugin is aws. Other plugins also supported are: google and azurerm.
|
23
25
|
|
@@ -26,7 +28,7 @@ The default plugin is aws. Other plugins also supported are: google and azurerm.
|
|
26
28
|
Create infrastructure:
|
27
29
|
|
28
30
|
$ terraspace up demo -y
|
29
|
-
|
31
|
+
Building .terraspace-cache/dev/stacks/demo
|
30
32
|
Current directory: .terraspace-cache/dev/stacks/demo
|
31
33
|
=> terraform init -get > /dev/null
|
32
34
|
Built in .terraspace-cache/dev/stacks/demo
|
@@ -46,7 +48,7 @@ Create infrastructure:
|
|
46
48
|
Destroy infrastructure:
|
47
49
|
|
48
50
|
$ terraspace down demo -y
|
49
|
-
|
51
|
+
Building .terraspace-cache/dev/stacks/demo
|
50
52
|
Current directory: .terraspace-cache/dev/stacks/demo
|
51
53
|
=> terraform init -get > /dev/null
|
52
54
|
Built in .terraspace-cache/dev/stacks/demo
|
data/lib/terraspace/cli.rb
CHANGED
@@ -119,6 +119,7 @@ module Terraspace
|
|
119
119
|
long_desc Help.text(:clean)
|
120
120
|
option :mod, desc: "Module to build to generate a backend file for discovery. By default the last module is used. Usually, it wont matter."
|
121
121
|
init_option.call
|
122
|
+
option :short, aliases: %w[s], type: :boolean, desc: "Only show statefiles"
|
122
123
|
def summary
|
123
124
|
Summary.new(options).run
|
124
125
|
end
|
@@ -11,7 +11,7 @@ class Terraspace::CLI::New
|
|
11
11
|
[:force, type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
|
12
12
|
[:lang, default: "hcl", desc: "Language to use: HCL/ERB or Ruby DSL"],
|
13
13
|
[:plugin, aliases: %w[p], default: "aws", desc: "Cloud Plugin. Supports: aws, google"],
|
14
|
-
[:test,
|
14
|
+
[:test, type: :boolean, desc: "Whether or not to generate tests"],
|
15
15
|
[:plugin_gem, desc: "Use if provider gem name doesnt follow terraspace_plugin_XXX naming convention. Must specify both --plugin and --plugin-name option"],
|
16
16
|
]
|
17
17
|
end
|
@@ -3,14 +3,13 @@
|
|
3
3
|
# key_field: if need to override default key
|
4
4
|
# bucket_field: if need to override default bucket
|
5
5
|
# download
|
6
|
-
# statefile_expr: needed for azurerm
|
7
6
|
#
|
8
7
|
# If need more customization, then override and implement the call method.
|
9
8
|
#
|
10
9
|
module Terraspace::Plugin::Summary
|
11
10
|
module Interface
|
12
|
-
def initialize(info)
|
13
|
-
@info = info
|
11
|
+
def initialize(info, options={})
|
12
|
+
@info, @options = info, options
|
14
13
|
end
|
15
14
|
|
16
15
|
# 1. download state files to temp area
|
@@ -72,11 +71,12 @@ module Terraspace::Plugin::Summary
|
|
72
71
|
pretty_path = path.sub(Regexp.new(".*#{@bucket}/#{@folder}"), '')
|
73
72
|
logger.info pretty_path.color(:green)
|
74
73
|
resources.each do |r|
|
74
|
+
@has_shown_resources = true # flag to note some resources there were shown
|
75
75
|
identifier = r['instances'].map do |i|
|
76
76
|
i['attributes']['name'] || i['attributes']['id']
|
77
77
|
end.join(',')
|
78
|
+
return if @options[:short]
|
78
79
|
logger.info " #{r['type']} #{r['name']}: #{identifier}"
|
79
|
-
@has_shown_resources = true # flag to note some resources there were shown
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
data/lib/terraspace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|