vagrant-terraform 0.1.12 → 0.1.14
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: 95c0abd402c6967d7c820e3c152cde223c0f7bf8cd9784b373842a7b6b6f12af
|
4
|
+
data.tar.gz: f8804f387db63cb128d35cfad6641062b551a67985ec55afcf5c7270b76c917a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47351dacff18851ceb98dcfb1a0b0fc742f463d39c00c080ef758f458f3dbf4c32d2314236e9c9fb3fea5e61eceddb86c9dadc1d14c2866dea6bb477fb5ad0e7
|
7
|
+
data.tar.gz: 6aa007521f392bc045d30fad9a4221668efbee8a95ff7e56472f6c4943309cd7125171cc48ee2dcd7b0244b2e369889112570bc16b6bd3cab3b32a2bfa85b58a
|
@@ -51,7 +51,8 @@ resource "proxmox_vm_qemu" "#{vmname.gsub(/\./, '-')}" {
|
|
51
51
|
full_clone = "#{config.full_clone}"
|
52
52
|
cores = #{config.cpu_cores.to_i}
|
53
53
|
cpu_type = "#{config.cpu_type}"
|
54
|
-
memory = #{Filesize.from("#{config.memory_size} B").to_f('
|
54
|
+
memory = #{Filesize.from("#{config.memory_size} B").to_f('MB').to_i}
|
55
|
+
balloon = #{Filesize.from("#{config.balloon} B").to_f('MB').to_i}
|
55
56
|
onboot = #{config.onboot}
|
56
57
|
agent = 1
|
57
58
|
vga {
|
@@ -67,7 +68,6 @@ resource "proxmox_vm_qemu" "#{vmname.gsub(/\./, '-')}" {
|
|
67
68
|
virtio {
|
68
69
|
virtio0 {
|
69
70
|
disk {
|
70
|
-
backup = false
|
71
71
|
storage = "#{config.storage_domain}"
|
72
72
|
size = "#{Filesize.from("#{config.disk_size} B").to_f('GB').to_i}G"
|
73
73
|
}
|
@@ -101,7 +101,7 @@ terraform {
|
|
101
101
|
required_providers {
|
102
102
|
proxmox = {
|
103
103
|
source = "telmate/proxmox"
|
104
|
-
version = "3.0.1-
|
104
|
+
version = "3.0.1-rc8"
|
105
105
|
#version = ">= 3.0.1-rc3"
|
106
106
|
}
|
107
107
|
}
|
@@ -9,6 +9,7 @@ module VagrantPlugins
|
|
9
9
|
attr_accessor :api_url
|
10
10
|
attr_accessor :api_token_id
|
11
11
|
attr_accessor :api_token_secret
|
12
|
+
attr_accessor :balloon
|
12
13
|
attr_accessor :vga
|
13
14
|
attr_accessor :insecure
|
14
15
|
attr_accessor :debug
|
@@ -32,6 +33,7 @@ module VagrantPlugins
|
|
32
33
|
@api_url = UNSET_VALUE
|
33
34
|
@api_token_id = UNSET_VALUE
|
34
35
|
@api_token_secret = UNSET_VALUE
|
36
|
+
@balloon = UNSET_VALUE
|
35
37
|
@vga = UNSET_VALUE
|
36
38
|
@insecure = UNSET_VALUE
|
37
39
|
@debug = UNSET_VALUE
|
@@ -66,6 +68,7 @@ module VagrantPlugins
|
|
66
68
|
@cpu_cores = 1 if @cpu_cores == UNSET_VALUE
|
67
69
|
@cpu_type = 'host' if @cpu_type == UNSET_VALUE
|
68
70
|
@memory_size = '512 MiB' if @memory_size == UNSET_VALUE
|
71
|
+
@balloon = @memory_size if @balloon == UNSET_VALUE
|
69
72
|
@target_node = nil if @target_node == UNSET_VALUE
|
70
73
|
@onboot = false if @onboot == UNSET_VALUE
|
71
74
|
@description = '' if @description == UNSET_VALUE
|
@@ -88,6 +91,12 @@ module VagrantPlugins
|
|
88
91
|
rescue ArgumentError
|
89
92
|
raise "Not able to parse `memory_size`."
|
90
93
|
end
|
94
|
+
|
95
|
+
begin
|
96
|
+
@balloon = Filesize.from(@balloon).to_f('B').to_i
|
97
|
+
rescue ArgumentError
|
98
|
+
raise "Not able to parse `balloon`."
|
99
|
+
end
|
91
100
|
end
|
92
101
|
|
93
102
|
end
|
@@ -10,14 +10,14 @@ module VagrantPlugins
|
|
10
10
|
def terraform_execute(env, command)
|
11
11
|
env[:machine_tf_dir] = ".vagrant/terraform/#{env[:machine].id}" if env[:machine_tf_dir].nil?
|
12
12
|
Dir.mkdir(env[:machine_tf_dir]) unless File.exist?(env[:machine_tf_dir])
|
13
|
+
|
13
14
|
stdout, stderr, status = Open3.capture3(command, :chdir=>env[:machine_tf_dir])
|
14
|
-
|
15
|
-
|
15
|
+
|
16
|
+
if !stderr.empty? && env[:machine].provider_config.debug
|
16
17
|
env[:ui].info("terraform command: #{command}")
|
17
18
|
env[:ui].info("terraform stdout: #{stdout}")
|
18
19
|
env[:ui].info("terraform stderr: #{stderr}")
|
19
20
|
env[:ui].info("terraform status: #{status}")
|
20
|
-
end
|
21
21
|
end
|
22
22
|
|
23
23
|
if status != 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mika Båtsman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: filesize
|