Comments (6)
For that, and the system extension(s).
BTW, I'm also using this in the talos example at https://github.com/rgl/terraform-proxmox-talos.
from terraform-provider-proxmox.
Hi @rgl, could you use proxmox_virtual_environment_download_file
instead, to download directly to the proxmox host from a remote URL?
If not, you might need to switch the temp directory used by the provider from default /tmp to somewhere else, if /tmp is mounted to a ram drive on your host.
from terraform-provider-proxmox.
The file is not available remotely. Its created locally, and only then it can be uploaded. So, I think I cannot use that resource.
Can the implementation of proxmox_virtual_environment_file be changed not to use a temporary file at all? And directly upload the local file?
PS Ah, its due to https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#important-notes.
I will try to trigger the SFTP branch instead
terraform-provider-proxmox/proxmoxtf/resource/file.go
Lines 547 to 549 in c1c4cf1
from terraform-provider-proxmox.
Trying with content_type = "dump"
as:
resource "proxmox_virtual_environment_file" "talos" {
datastore_id = "local"
node_name = "pve"
content_type = "dump"
overwrite = false
source_file {
path = "tmp/talos/talos-${var.talos_version}.img"
file_name = "${var.talos_version}.img"
}
}
produced an unexpected result:
roxmox_virtual_environment_file.talos: Creating...
proxmox_virtual_environment_file.talos: Still creating... [10s elapsed]
proxmox_virtual_environment_file.talos: Still creating... [20s elapsed]
╷
│ Warning: the datastore "local" does not support content type "dump"; supported content types are: [backup images iso rootdir snippets vztmpl]
│
│ with proxmox_virtual_environment_file.talos,
│ on main.tf line 45, in resource "proxmox_virtual_environment_file" "talos":
│ 45: resource "proxmox_virtual_environment_file" "talos" {
│
╵
╷
│ Error: failed to read file from "local:dump/1.6.7.img"
│
│ with proxmox_virtual_environment_file.talos,
│ on main.tf line 45, in resource "proxmox_virtual_environment_file" "talos":
│ 45: resource "proxmox_virtual_environment_file" "talos" {
│
It seems dump
is no longer a valid content type for Proxmox 8.1.10. Is this expected?
Also, it tried to create a file named oh my mistake... I did not set it correctly. sorry! this is working correctly after using dump/1.6.7.img
instead of talos-1.6.7.img
(as defined by file_name = "${var.talos_version}.img"
).file_name = "talos-${var.talos_version}.img"
.
from terraform-provider-proxmox.
I ended up following https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_file#important-notes, and that did the trick for me. Sorry for all the noise!
The final result is at https://github.com/rgl/terraform-proxmox-upload-talos-img
from terraform-provider-proxmox.
@rgl I glad you found the solution!
Just curious, why you're rebuilding talos image in the first place? I don't see much of customization in your image, except perhaps https://github.com/rgl/terraform-proxmox-upload-talos-img/blob/main/do#L34?
from terraform-provider-proxmox.
Related Issues (20)
- Cannot use cloudinit with initialization HOT 1
- Disk resize for VM not updated in terraform state HOT 14
- CD-ROM is not attached when creating a VM from scratch HOT 1
- Not sure why I have these issue HOT 2
- Cannot Set Disk Passthrough Serial
- Terraform unable to set CIUPGRADE config, regardless of running as root or not, using API token HOT 3
- proxmox_virtual_environment_user_token is not idempotent if no expiration_date is set HOT 1
- Idempotence issues in "proxmox_virtual_environment_vm" after cloning from another VM HOT 3
- Support provider_override HOT 4
- Document which is the latest compatible version for Proxmox 7.4 HOT 1
- Align Defaults with Proxmox Defaults HOT 1
- Error: unknown time zone HOT 3
- HTTP 596 response Connection timed out in proxmox_virtual_environment_file HOT 1
- disk resize fails: error waiting for VM disk resize: All attempts fail: HOT 2
- Allow VM clone to pass with warnings HOT 3
- Missing "none" and "VirGL" to VGA type in proxmox_vm proxmox_virtual_environment_vm HOT 1
- Container volume mount backup flag defaults to true in provider but false in Proxmox, so volume mounts are created with the flag missing. HOT 1
- 0.58.0 VM resource: `expected clipboard to be one of ["vnc"], got .` HOT 1
- Selection of the components you want to be hotpluggable HOT 1
- error creating clonr vm linked clone HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-proxmox.