terraspace_plugin_google 0.3.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 628fdc35ca018bb08c245ade973b52cb1791ae4cae8858dac9cc787312c81be6
|
4
|
+
data.tar.gz: 73c858a9d4452668896b68c58aa51f0b23f6dcbb5d2f07cce9c3df1b4273cebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a157213a221b74251896316d3bd879496e25a68dced1d44a294958e51c0ba3e830959fe07cd869f115cd73ea220660a20128484349c3328eadd87bbd2ca2ed5e
|
7
|
+
data.tar.gz: 24297c26f98c24ad85f689fc82c1e14acf64583e909da9b566524bd263b0e48cdb8fd6281753702dbc5595f010fddb47578f8432530e91af78ec30fa1324a1c7
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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.3.1] - 2021-11-13
|
7
|
+
- [#7](https://github.com/boltops-tools/terraspace_provider_google/pull/7) get google project number via api
|
8
|
+
|
6
9
|
## [0.3.0] - 2020-11-15
|
7
10
|
- [#5](https://github.com/boltops-tools/terraspace_provider_google/pull/5) helper and secrets support
|
8
11
|
- google secret
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "google-cloud-resource_manager"
|
1
2
|
require "google-cloud-secret_manager"
|
2
3
|
require "google/cloud/storage"
|
3
4
|
|
@@ -14,5 +15,10 @@ module TerraspacePluginGoogle
|
|
14
15
|
Google::Cloud::Storage.new
|
15
16
|
end
|
16
17
|
memoize :storage
|
18
|
+
|
19
|
+
def resource_manager
|
20
|
+
Google::Cloud.new.resource_manager
|
21
|
+
end
|
22
|
+
memoize :resource_manager
|
17
23
|
end
|
18
24
|
end
|
@@ -27,17 +27,12 @@ module TerraspacePluginGoogle::Interfaces::Helper
|
|
27
27
|
"NOT FOUND #{name}" # simple string so Kubernetes YAML is valid
|
28
28
|
end
|
29
29
|
|
30
|
-
|
31
|
-
# If someone knows, let me know.
|
32
|
-
# Right now grabbing the first secret to then be able to get the google project number
|
30
|
+
private
|
33
31
|
@@project_number = nil
|
34
32
|
def project_number
|
35
33
|
return @@project_number if @@project_number
|
36
|
-
|
37
|
-
|
38
|
-
resp = secret_manager_service.list_secrets(parent: parent) # note: page_size doesnt seem to get respected
|
39
|
-
name = resp.first.name # IE: projects/111111111111/secrets/demo-dev-db_host
|
40
|
-
@@project_number = name.split('/')[1]
|
34
|
+
project = resource_manager.project(@project_id)
|
35
|
+
@@project_number = project.project_number
|
41
36
|
end
|
42
37
|
end
|
43
38
|
end
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_dependency "gcp_data"
|
26
26
|
spec.add_dependency "google-cloud-storage"
|
27
|
+
spec.add_dependency "google-cloud-resource_manager"
|
27
28
|
spec.add_dependency "google-cloud-secret_manager"
|
28
29
|
spec.add_dependency "memoist"
|
29
30
|
spec.add_dependency "zeitwerk"
|
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
|
+
version: 0.3.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:
|
11
|
+
date: 2021-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gcp_data
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: google-cloud-resource_manager
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: google-cloud-secret_manager
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
169
|
- !ruby/object:Gem::Version
|
156
170
|
version: '0'
|
157
171
|
requirements: []
|
158
|
-
rubygems_version: 3.1.
|
172
|
+
rubygems_version: 3.1.6
|
159
173
|
signing_key:
|
160
174
|
specification_version: 4
|
161
175
|
summary: Terraspace Google Cloud Plugin
|