File tree 1 file changed +11
-0
lines changed
lib/terraspace_plugin_google
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments