armrest 0.2.0 → 0.2.2

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: 1c137816b7461aff9f3a2c36d66915bf8d71185114157153b794270699959dad
4
- data.tar.gz: 5c25cb03cbff31c49938d9c6f20e699f79b049a477a27022450676166d052b46
3
+ metadata.gz: 8d1a435132d293f351949c1d9d2e77cb28e9fd78184249244c1ec6d8ae857c47
4
+ data.tar.gz: 7fd1d29acd2f837924d0fc0f4cb15bf8253a43c955a46fca30c5eb25b3e9eaa9
5
5
  SHA512:
6
- metadata.gz: 51d2232a17b2436f9efc351dfbc7fc79bb6cadde9ae355201ed7296198bad7e98f4dc517134523ded0dab8a10b113e25edd2230fad069b9db0d9fa9dda6dd02b
7
- data.tar.gz: 2c70cb22c78b87031d48a862afb4850c160084bf66cf196b9084240c1a78cb239486de88b011f5ac4c5e2f4b785dd51447734b9522b1064645a8c2e34b826db9
6
+ metadata.gz: 9412dafc2f04867514458f21e9a14c8df14658ad622a212660bf74fb5ec5de84f486f3343048d2ab2421fb0ccf892c98a9dd0c0f954ee83554035b6aa189c203
7
+ data.tar.gz: b9aa3ab20fab1fa45a1f4507aad1e6400bacc04058eb6b1fc2ccb8473319a38add55bb1aec41d348ed0e014d031a8afcdf1d86591e4454ff0149ea0921643103
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
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.2.2] - 2023-12-31
7
+ - [#8](https://github.com/boltops-tools/armrest/pull/8) cli auth scope for vault secrets
8
+
9
+ ## [0.2.1] - 2023-12-22
10
+ - [#6](https://github.com/boltops-tools/armrest/pull/6) Adjust the AZ timeout
11
+
6
12
  ## [0.2.0] - 2023-12-21
7
13
  - [#5](https://github.com/boltops-tools/armrest/pull/5) fix cli auth
8
14
 
data/README.md CHANGED
@@ -31,7 +31,7 @@ resource_group.create_or_update(
31
31
  )
32
32
  ```
33
33
 
34
- Refer to the [boltops-tools/terraspace_plugin_azurer](https://github.com/boltops-tools/terraspace_plugin_azurerm) for more examples.
34
+ Refer to the [boltops-tools/terraspace_plugin_azurerm](https://github.com/boltops-tools/terraspace_plugin_azurerm) for more examples.
35
35
 
36
36
  ## Usage: CLI
37
37
 
@@ -22,10 +22,12 @@ module Armrest::Api::Auth
22
22
  data.deep_transform_keys { |k| k.underscore } # to normalize the structure to the other classes
23
23
  end
24
24
 
25
- # Looks like az account get-access-token caches the toke in ~/.azure/accessTokens.json
26
- # and will update it only when it expires. So dont think we need to handle caching
25
+ # The az cli command itself has it's own caching. So dont think we need to handle caching
27
26
  def get_access_token
28
27
  command = "az account get-access-token -o json"
28
+ if resource.include?("vault.azure.net")
29
+ command += " --scope https://vault.azure.net/.default"
30
+ end
29
31
  logger.debug "command: #{command}"
30
32
  out = `#{command}`
31
33
  if $?.success?
@@ -17,7 +17,7 @@ module Armrest::Api::Auth
17
17
  return @@available unless @@available.nil?
18
18
  url = "metadata/instance"
19
19
  resp = nil
20
- with_open_timeout(0.5) do
20
+ with_open_timeout(1.5) do
21
21
  resp = get(url)
22
22
  end
23
23
  @@available = resp.code == "200"
@@ -1,3 +1,3 @@
1
1
  module Armrest
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: armrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-21 00:00:00.000000000 Z
11
+ date: 2023-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport