Class: TerraspacePluginAzurerm::Interfaces::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton, Terraspace::Plugin::Config::Interface
Defined in:
lib/terraspace_plugin_azurerm/interfaces/config.rb

Instance Method Summary collapse

Instance Method Details

#defaultsObject

interface method must return an ActiveSupport::OrderedOptions



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/terraspace_plugin_azurerm/interfaces/config.rb', line 14

def defaults
  c = ActiveSupport::OrderedOptions.new

  c.auto_create = true
  c.location = nil # AzureInfo.location not assigned here so it can be lazily inferred

  c.secrets = ActiveSupport::OrderedOptions.new
  c.secrets.vault = nil

  c.resource_group = ActiveSupport::OrderedOptions.new
  c.resource_group.update_existing = false

  c. = ActiveSupport::OrderedOptions.new
  c..update_existing = false
  c..sku = ActiveSupport::OrderedOptions.new
  c..sku.name = "Standard_LRS"
  c..sku.tier = "Standard"
  c..allow_blob_public_access = false # Azure default is true
  c..minimum_tls_version = "TLS1_2"

  # data protection management
  c..configure_data_protection_for_existing = false
  c..delete_retention_policy = ActiveSupport::OrderedOptions.new
  c..delete_retention_policy.days = 365
  c..delete_retention_policy.enabled = true
  # overrides the setting above
  c..blob_delete_retention_policy = ActiveSupport::OrderedOptions.new
  c..blob_delete_retention_policy.days = nil
  c..blob_delete_retention_policy.enabled = nil
  c..container_delete_retention_policy = ActiveSupport::OrderedOptions.new
  c..container_delete_retention_policy.days = nil
  c..container_delete_retention_policy.enabled = nil
  c..is_versioning_enabled = true

  c.tags = {}

  c
end

#providerObject

interface method load_project_config: config/plugins/azurerm.rb



8
9
10
# File 'lib/terraspace_plugin_azurerm/interfaces/config.rb', line 8

def provider
  "azurerm"
end