terraspace 2.2.2 → 2.2.4

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: 0c7a68a82f374785998967cf8af6d56f78130d7e03e8b0d7e64e85a9483e61cd
4
- data.tar.gz: 2883619576b4a57c0e049edbc2cdae9d44b6c23926e3fe85084170bed5afb6c3
3
+ metadata.gz: 4703e9e81e2f5a450a6f02e790024ea326970a0055c0f351b8c1cc62f4f805c9
4
+ data.tar.gz: 17496c6eb2902ccf90af84145fa88c532d4ac53afdfebb931260cd887c9080b2
5
5
  SHA512:
6
- metadata.gz: fbbd8c9339438902bc05b507292497c7714ccf9264a0155ab4fcd51c9e7d89d8ea0fc0a94f60228273fb9830f4458269eefa259a014d14a5754692a3d7747a2a
7
- data.tar.gz: e62b1db8f363a94bbea6ed69ec1a6323171ab4442ff9059f0141fc2017837167659f741b2a7bf7e88f6d643320ac2040ff4e35e6564e0725861f030cd48809d4
6
+ metadata.gz: fb49cea863d69660e36df977271942aff8801f518c30119697f2ca641c7257b266ec26931e790a1149e710229e5d7f988594067008cdc59584a4fb352f07a028
7
+ data.tar.gz: 58e52ee22af11bef98996a01662396f3f79b2ed1f05e46a435280e296aa9f2449bfd62f9a58849dd48c5e39c692ca160bebf1a8a8e10678fcf224e83788ffae9
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+ ## [2.2.4] - 2023-04-19
7
+ - [#293](https://github.com/boltops-tools/terraspace/pull/293) terrraspace import cli help fix
8
+ - [#299](https://github.com/boltops-tools/terraspace/pull/299) fix expansion for the case of ENV var is not set
9
+
10
+ ## [2.2.3] - 2022-12-11
11
+ - [#283](https://github.com/boltops-tools/terraspace/pull/283) update terraspace new cli help
12
+ - [#285](https://github.com/boltops-tools/terraspace/pull/285) Only generate output files with content
13
+
6
14
  ## [2.2.2] - 2022-09-14
7
15
  - [#268](https://github.com/boltops-tools/terraspace/pull/268) custom config.build.dependency_words ability
8
16
 
@@ -1,12 +1,12 @@
1
1
  ## Stack Examples
2
2
 
3
- $ terraspace new test demo --type stack
3
+ $ terraspace new test example --type stack
4
4
  => Creating stack test: example
5
- exist app/stacks/example
6
5
  create app/stacks/example/test/.rspec
7
6
  create app/stacks/example/test/Gemfile
8
- create app/stacks/example/test/spec/fixtures/stack/main.tf
9
- create app/stacks/example/test/spec/fixtures/stack/outputs.tf
7
+ create app/stacks/example/test/spec/fixtures/config/app.rb
8
+ create app/stacks/example/test/spec/fixtures/config/terraform/provider.tf
9
+ create app/stacks/example/test/spec/fixtures/tfvars/test.tfvars
10
10
  create app/stacks/example/test/spec/main_spec.rb
11
11
  create app/stacks/example/test/spec/spec_helper.rb
12
12
  $
@@ -15,11 +15,8 @@
15
15
 
16
16
  $ terraspace new test example --type module
17
17
  => Creating module test: example
18
- exist app/modules/example
19
18
  create app/modules/example/test/.rspec
20
19
  create app/modules/example/test/Gemfile
21
- create app/modules/example/test/spec/fixtures/stack/main.tf
22
- create app/modules/example/test/spec/fixtures/stack/outputs.tf
23
20
  create app/modules/example/test/spec/main_spec.rb
24
21
  create app/modules/example/test/spec/spec_helper.rb
25
22
  $
@@ -28,7 +25,6 @@
28
25
 
29
26
  $ terraspace new test my --type project
30
27
  => Creating test bootstrap structure
31
- exist
32
28
  create .rspec
33
29
  create spec/spec_helper.rb
34
30
  $
@@ -109,7 +109,7 @@ module Terraspace
109
109
  Fmt.new(options.merge(mod: mod)).run
110
110
  end
111
111
 
112
- desc "import ADDR ID", "Import existing infrastructure into your Terraform state"
112
+ desc "import STACK ADDR ID", "Import existing infrastructure into your Terraform state"
113
113
  long_desc Help.text(:import)
114
114
  def import(mod, addr, id)
115
115
  Import.new(options.merge(mod: mod, addr: addr, id: id)).run
@@ -34,7 +34,7 @@ module Terraspace::Compiler
34
34
  if content.respond_to?(:path) # IO filehandle
35
35
  FileUtils.cp(content.path, dest_path) # preserves permission
36
36
  else # just content
37
- IO.write(dest_path, content, mode: "wb")
37
+ IO.write(dest_path, content, mode: "wb") unless content.nil?
38
38
  end
39
39
  logger.debug "Created #{Terraspace::Util.pretty_path(dest_path)}"
40
40
  end
@@ -84,7 +84,7 @@ module Terraspace::Plugin::Expander
84
84
  elsif !ENV[name].blank?
85
85
  return ENV[name]
86
86
  else
87
- return unexpanded
87
+ return ''
88
88
  end
89
89
  if downcase == "namespace" && Terraspace.config.layering.enable_names.expansion
90
90
  value = friendly_name(value)
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.4"
3
3
  end
@@ -3,7 +3,7 @@ describe Terraspace::Plugin::Expander::Generic do
3
3
  let(:props) do
4
4
  {
5
5
  bucket: "my-bucket",
6
- key: ":env/:build_dir/terraform.tfstate", # variable notation expanded by terraspace
6
+ key: ":env/:TEAM/:ENVNOTSET/:build_dir/terraform.tfstate", # variable notation expanded by terraspace
7
7
  region: "us-west-2",
8
8
  encrypt: true,
9
9
  dynamodb_table: "terraform_locks"
@@ -15,12 +15,14 @@ describe Terraspace::Plugin::Expander::Generic do
15
15
  mod
16
16
  end
17
17
 
18
+ before { stub_const('ENV', {'TEAM' => 'backend'}) }
19
+
18
20
  context "default path" do
19
21
  it "expand" do
20
22
  result = expander.expand(props)
21
23
  expect(result).to eq({
22
24
  bucket: "my-bucket",
23
- key: "dev/stacks/core/terraform.tfstate",
25
+ key: "dev/backend/stacks/core/terraform.tfstate",
24
26
  region: "us-west-2",
25
27
  encrypt: true,
26
28
  dynamodb_table: "terraform_locks"
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: 2.2.2
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2023-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -346,7 +346,7 @@ dependencies:
346
346
  - - ">="
347
347
  - !ruby/object:Gem::Version
348
348
  version: '0'
349
- description:
349
+ description:
350
350
  email:
351
351
  - tung@boltops.com
352
352
  executables:
@@ -950,7 +950,7 @@ metadata:
950
950
  homepage_uri: https://terraspace.cloud
951
951
  source_code_uri: https://github.com/boltops-tools/terraspace
952
952
  changelog_uri: https://github.com/boltops-tools/terraspace/blob/master/CHANGELOG.md
953
- post_install_message:
953
+ post_install_message:
954
954
  rdoc_options: []
955
955
  require_paths:
956
956
  - lib
@@ -965,8 +965,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
965
965
  - !ruby/object:Gem::Version
966
966
  version: '0'
967
967
  requirements: []
968
- rubygems_version: 3.3.21
969
- signing_key:
968
+ rubygems_version: 3.3.26
969
+ signing_key:
970
970
  specification_version: 4
971
971
  summary: 'Terraspace: The Terraspace Framework'
972
972
  test_files: