terraspace_plugin_google 0.3.4 → 0.4.1

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: f70f3d2b05883b51424fcf33c4054ec87245a6194907501ece79d203d4004752
4
- data.tar.gz: d98024a5205b2385d16761193ea367d302ba1cc2c57fef710f647cd3d49d2e54
3
+ metadata.gz: e7dba80e79b96d707667d07cbbf61fbe4bbd4976908f504887efd49b1419a264
4
+ data.tar.gz: b0949e7e0e73e1413155ab3fa8caf97ccdbfb402c2d10b497d0b6d2e20d3fa06
5
5
  SHA512:
6
- metadata.gz: 11ec0a19248922068b38c68990477de03c8fcdd1c6bdc7eb9b8b583deb35a0a46a0f36c0319d7feb2fcf2913536b1e468d5c57c985c92cdfca7aba5379b6e16a
7
- data.tar.gz: 30ea996f68cdd59da9902fd57dec0b89a643e272c5c04c7d9db407a9439aa5ef0c4ef89ae577ac0b9163b3aedb04df0d35debf3a7b43f4be63c719a69f09ede8
6
+ metadata.gz: 3cd25c6f8d6308426da2d69481986f28e619a8e80a82e929f86011e992d87d84145b7c2023cb28a6c2848d93ab7a00be0fa1f933611880e2f261666447e40394
7
+ data.tar.gz: aa4872cea2c160e93577afa8345c3b547d5ceff12fc7b303f72bb24f8aef7da50c5c656e410bdfe81ea5ebb0e7d53a63f4ccf51100a3b77f0432a075c91534e8
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
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/).
5
5
 
6
+ ## [0.4.1] - 2022-06-14
7
+ - [#14](https://github.com/boltops-tools/terraspace_provider_google/pull/14) backend.tf template project variable
8
+
9
+ ## [0.4.0] - 2022-06-10
10
+ - [#13](https://github.com/boltops-tools/terraspace_provider_google/pull/13) update generated backend key and ci interface
11
+
12
+ ## [0.3.5] - 2022-01-11
13
+ - [#11](https://github.com/boltops-tools/terraspace_provider_google/pull/11) set GOOGLE_CLOUD_PROJECT while keeping backwards compatibility
14
+
6
15
  ## [0.3.4] - 2022-01-11
7
16
  - [#10](https://github.com/boltops-tools/terraspace_provider_google/pull/10) set GOOGLE_CLOUD_PROJECT while keeping backwards compatibility
8
17
 
@@ -1,6 +1,6 @@
1
1
  terraform {
2
2
  backend "gcs" {
3
3
  bucket = "<%%= expansion('terraform-state-:PROJECT-:REGION-:ENV') %>"
4
- prefix = "<%%= expansion(':REGION/:ENV/:BUILD_DIR') %>"
4
+ prefix = "<%%= expansion(':PROJECT/:TYPE_DIR/:APP/:ROLE/:MOD_NAME/:ENV/:EXTRA/:REGION') %>"
5
5
  }
6
6
  }
@@ -1,4 +1,4 @@
1
1
  backend("gcs",
2
- bucket: "terraform-state-:PROJECT-:REGION-:ENV", # expanded by terraspace IE: terraform-state-project-us-central1-dev
3
- prefix: ":REGION/:ENV/:BUILD_DIR", # expanded by terraspace IE: us-central1/dev/modules/vm
2
+ bucket: "terraform-state-:PROJECT-:REGION-:ENV",
3
+ prefix: ":PROJECT/:TYPE_DIR/:APP/:ROLE/:MOD_NAME/:ENV/:EXTRA/:REGION",
4
4
  )
@@ -6,6 +6,17 @@ module TerraspacePluginGoogle
6
6
  module Clients
7
7
  extend Memoist
8
8
 
9
+ def initialize(*)
10
+ # So google sdk newer versions use GOOGLE_CLOUD_PROJECT instead of GOOGLE_PROJECT
11
+ # Found out between google-cloud-storage-1.35.0 and google-cloud-storage-1.28.0
12
+ # Though it seems like an library underneath that with the change.
13
+ # Keeping backwards compatibility to not create breakage users who already have GOOGLE_PROJECT
14
+ # But then setting GOOGLE_CLOUD_PROJECT so it works with the SDK.
15
+ # For users, who set GOOGLE_CLOUD_PROJECT that will work also.
16
+ ENV['GOOGLE_CLOUD_PROJECT'] ||= ENV['GOOGLE_PROJECT']
17
+ super
18
+ end
19
+
9
20
  def secret_manager_service
10
21
  Google::Cloud::SecretManager.secret_manager_service
11
22
  end
@@ -0,0 +1,12 @@
1
+ module TerraspacePluginGoogle::Interfaces
2
+ class Ci
3
+ def vars
4
+ {
5
+ GOOGLE_APPLICATION_CREDENTIALS: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}',
6
+ GOOGLE_PROJECT: '${{ secrets.GOOGLE_PROJECT }}',
7
+ GOOGLE_REGION: '${{ secrets.GOOGLE_REGION }}',
8
+ GOOGLE_ZONE: '${{ secrets.GOOGLE_ZONE }}',
9
+ }
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module TerraspacePluginGoogle
2
- VERSION = "0.3.4"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -39,5 +39,6 @@ Terraspace::Plugin.register("google",
39
39
  config_class: TerraspacePluginGoogle::Interfaces::Config,
40
40
  helper_class: TerraspacePluginGoogle::Interfaces::Helper,
41
41
  layer_class: TerraspacePluginGoogle::Interfaces::Layer,
42
+ ci_class: TerraspacePluginGoogle::Interfaces::Ci,
42
43
  root: File.dirname(__dir__),
43
44
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace_plugin_google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.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: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gcp_data
@@ -140,6 +140,7 @@ files:
140
140
  - lib/terraspace_plugin_google/autoloader.rb
141
141
  - lib/terraspace_plugin_google/clients.rb
142
142
  - lib/terraspace_plugin_google/interfaces/backend.rb
143
+ - lib/terraspace_plugin_google/interfaces/ci.rb
143
144
  - lib/terraspace_plugin_google/interfaces/config.rb
144
145
  - lib/terraspace_plugin_google/interfaces/expander.rb
145
146
  - lib/terraspace_plugin_google/interfaces/helper.rb
@@ -169,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
170
  - !ruby/object:Gem::Version
170
171
  version: '0'
171
172
  requirements: []
172
- rubygems_version: 3.2.32
173
+ rubygems_version: 3.3.12
173
174
  signing_key:
174
175
  specification_version: 4
175
176
  summary: Terraspace Google Cloud Plugin