kitchen-azurerm 1.12.0 → 1.13.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 167f2bd145bfcc198c78d11302f0fa2ca94a068f4a66a74137969664c4017249
|
4
|
+
data.tar.gz: b997820c2f205904e1c66e57cbefbd052314bddc309fc625c6619e511621804f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 295cf6b29eefdded3df9f0211a40c70e3619eb34162bd261e828dce635ffcc9c653ca4b9a2931d701dc82cec134b71dc1035161860f5f905633303f71eb36ab4
|
7
|
+
data.tar.gz: 0215f092fb461968d8b678291ffab9ad58d30390276195f82d61b189a240818f7cc0f3e2b76774d5910ab27b24deb71a4c7acbfb09f5911d2e73bf14224cd9bc
|
@@ -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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Preston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-27 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.
|