Module: Armrest::Api::Settings

Included in:
Mods
Defined in:
lib/armrest/api/settings.rb

Instance Method Summary collapse

Instance Method Details

#client_idObject



5
6
7
# File 'lib/armrest/api/settings.rb', line 5

def client_id
  @options[:client_id] || ENV['ARM_CLIENT_ID'] || ENV['AZURE_CLIENT_ID']
end

#client_secretObject



9
10
11
# File 'lib/armrest/api/settings.rb', line 9

def client_secret
  @options[:client_secret] || ENV['ARM_CLIENT_SECRET'] || ENV['AZURE_CLIENT_SECRET']
end

#endpointObject



33
34
35
# File 'lib/armrest/api/settings.rb', line 33

def endpoint
  @options[:endpoint] || "https://management.azure.com"
end

#groupObject



29
30
31
# File 'lib/armrest/api/settings.rb', line 29

def group
  @options[:group] || ENV['ARM_GROUP'] || AzureInfo.group
end

#locationObject



25
26
27
# File 'lib/armrest/api/settings.rb', line 25

def location
  @options[:location] || ENV['ARM_LOCATION'] || ENV['AZURE_LOCATION'] || AzureInfo.location
end

#resourceObject



17
18
19
# File 'lib/armrest/api/settings.rb', line 17

def resource
  @options[:resource] || "https://management.azure.com"
end

#subscription_idObject



21
22
23
# File 'lib/armrest/api/settings.rb', line 21

def subscription_id
  @options[:subscription_id] || ENV['ARM_SUBSCRIPTION_ID'] || ENV['AZURE_SUBSCRIPTION_ID'] || AzureInfo.subscription_id
end

#tenant_idObject



13
14
15
# File 'lib/armrest/api/settings.rb', line 13

def tenant_id
  @options[:tenant_id] || ENV['ARM_TENANT_ID'] || ENV['AZURE_TENANT_ID'] || AzureInfo.tenant_id
end