kitchen-azurerm 1.12.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f7da5c612d715d3047c25d53754b29deb0c4fb7e9124e9ed2ccdbeb8cf145e
|
4
|
+
data.tar.gz: dab8c54abc9e6ddee217f65e82bb22424cc24d81c8d8534f3c3983645b02189d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a3290bde322420a3a6552a991b282ef060731b963542413e0c0b07719a49cfc0c158387641c6408c4f31a6b5dcab2fd59b9575fc14bf7d51382553840b4b10
|
7
|
+
data.tar.gz: ce270935480f82f43504082636ccf19f0e7674bc5eb5cbc8faa6716e3bb39bfb096aea3e5a6ab77d303757c9bbeb32478e380b257101c895635282c30c64aac1
|
@@ -39,7 +39,7 @@ module Kitchen
|
|
39
39
|
#
|
40
40
|
def azure_options
|
41
41
|
options = { tenant_id: tenant_id!,
|
42
|
-
subscription_id
|
42
|
+
subscription_id:,
|
43
43
|
credentials: ::MsRest2::TokenCredentials.new(token_provider),
|
44
44
|
active_directory_settings: ad_settings,
|
45
45
|
base_url: endpoint_settings.resource_manager_endpoint_url }
|
@@ -104,7 +104,7 @@ module Kitchen
|
|
104
104
|
#
|
105
105
|
# MSI with client_id and tenant_id (aka User Assigned Identity).
|
106
106
|
elsif client_id && tenant_id
|
107
|
-
::MsRestAzure2::MSITokenProvider.new(50342, ad_settings, { client_id:
|
107
|
+
::MsRestAzure2::MSITokenProvider.new(50342, ad_settings, { client_id: })
|
108
108
|
# Default approach to inheriting existing object permissions (application or device this code is running on).
|
109
109
|
#
|
110
110
|
# Typically used when you want to inherit the permissions of the system you're running on that are in a tenant.
|
@@ -84,6 +84,11 @@ module Kitchen
|
|
84
84
|
SecureRandom.base64(25)
|
85
85
|
end
|
86
86
|
|
87
|
+
# This prefix MUST be no longer than 3 characters
|
88
|
+
default_config(:vm_prefix) do |_config|
|
89
|
+
"tk-"
|
90
|
+
end
|
91
|
+
|
87
92
|
default_config :vm_name, nil
|
88
93
|
|
89
94
|
default_config :store_deployment_credentials_in_state, true
|
@@ -379,7 +384,7 @@ module Kitchen
|
|
379
384
|
# @return [Hash] Updated Hash of state values.
|
380
385
|
def validate_state(state = {})
|
381
386
|
state[:uuid] = SecureRandom.hex(8) unless existing_state_value?(state, :uuid)
|
382
|
-
state[:vm_name] = config[:vm_name] || "
|
387
|
+
state[:vm_name] = config[:vm_name] || "#{config[:vm_prefix]}#{state[:uuid][0..11]}" unless existing_state_value?(state, :vm_name)
|
383
388
|
state[:server_id] = "vm#{state[:uuid]}" unless existing_state_value?(state, :server_id)
|
384
389
|
state[:azure_resource_group_name] = azure_resource_group_name unless existing_state_value?(state, :azure_resource_group_name)
|
385
390
|
%i{subscription_id azure_environment use_managed_disks}.each do |config_element|
|
@@ -741,10 +746,10 @@ module Kitchen
|
|
741
746
|
|
742
747
|
def virtual_machine_deployment_template
|
743
748
|
if config[:vnet_id] == ""
|
744
|
-
virtual_machine_deployment_template_file("public.erb", vm_tags: vm_tag_string(config[:vm_tags]), use_managed_disks: config[:use_managed_disks], image_url: config[:image_url], storage_account_type: config[:storage_account_type], existing_storage_account_blob_url: config[:existing_storage_account_blob_url], image_id: config[:image_id], existing_storage_account_container: config[:existing_storage_account_container], custom_data: config[:custom_data], os_disk_size_gb: config[:os_disk_size_gb], data_disks_for_vm_json
|
749
|
+
virtual_machine_deployment_template_file("public.erb", vm_tags: vm_tag_string(config[:vm_tags]), use_managed_disks: config[:use_managed_disks], image_url: config[:image_url], storage_account_type: config[:storage_account_type], existing_storage_account_blob_url: config[:existing_storage_account_blob_url], image_id: config[:image_id], existing_storage_account_container: config[:existing_storage_account_container], custom_data: config[:custom_data], os_disk_size_gb: config[:os_disk_size_gb], data_disks_for_vm_json:, use_ephemeral_osdisk: config[:use_ephemeral_osdisk], ssh_key: instance.transport[:ssh_key], plan_json:)
|
745
750
|
else
|
746
751
|
info "Using custom vnet: #{config[:vnet_id]}"
|
747
|
-
virtual_machine_deployment_template_file("internal.erb", vnet_id: config[:vnet_id], subnet_id: config[:subnet_id], public_ip: config[:public_ip], vm_tags: vm_tag_string(config[:vm_tags]), use_managed_disks: config[:use_managed_disks], image_url: config[:image_url], storage_account_type: config[:storage_account_type], existing_storage_account_blob_url: config[:existing_storage_account_blob_url], image_id: config[:image_id], existing_storage_account_container: config[:existing_storage_account_container], custom_data: config[:custom_data], os_disk_size_gb: config[:os_disk_size_gb], data_disks_for_vm_json
|
752
|
+
virtual_machine_deployment_template_file("internal.erb", vnet_id: config[:vnet_id], subnet_id: config[:subnet_id], public_ip: config[:public_ip], vm_tags: vm_tag_string(config[:vm_tags]), use_managed_disks: config[:use_managed_disks], image_url: config[:image_url], storage_account_type: config[:storage_account_type], existing_storage_account_blob_url: config[:existing_storage_account_blob_url], image_id: config[:image_id], existing_storage_account_container: config[:existing_storage_account_container], custom_data: config[:custom_data], os_disk_size_gb: config[:os_disk_size_gb], data_disks_for_vm_json:, use_ephemeral_osdisk: config[:use_ephemeral_osdisk], ssh_key: instance.transport[:ssh_key], public_ip_sku: config[:public_ip_sku], plan_json:)
|
748
753
|
end
|
749
754
|
end
|
750
755
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-azurerm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Preston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure_mgmt_network2
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.4.10
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Test Kitchen driver for Azure Resource Manager.
|