Comments (2)
It looks like the unprivileged
attribute is not imported.
❯ tofu import proxmox_virtual_environment_container.test_container pve/100
proxmox_virtual_environment_container.test_container: Importing from ID "pve/100"...
proxmox_virtual_environment_container.test_container: Import prepared!
Prepared proxmox_virtual_environment_container for import
proxmox_virtual_environment_container.test_container: Refreshing state... [id=100]
Import successful!
The resources that were imported are shown above. These resources are now in
your OpenTofu state and will henceforth be managed by OpenTofu.
❯ tofu state show proxmox_virtual_environment_container.test_container
# proxmox_virtual_environment_container.test_container:.test_container
resource "proxmox_virtual_environment_container" "test_container" {
id = "100"
node_name = "pve"
started = true
tags = []
template = false
disk {
datastore_id = "local-lvm"
size = 8
}
initialization {
hostname = "test"
}
network_interface {
bridge = "vmbr0"
enabled = true
firewall = true
mac_address = "BC:24:11:A9:5C:E2"
mtu = 0
name = "vmbr0"
rate_limit = 0
vlan_id = 0
}
operating_system {
type = "ubuntu"
}
}
unprivileged = false
by default, so that's explainable.
But I'm not sure why the import block behaves differently:
❯ tofu plan -generate-config-out=plan.tf
proxmox_virtual_environment_container.test_container: Preparing import... [id=pve/100]
proxmox_virtual_environment_container.test_container: Refreshing state... [id=100]
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
OpenTofu will perform the following actions:
# proxmox_virtual_environment_container.test_container must be replaced
# (imported from "pve/100")
# Warning: this will destroy the imported resource
-/+ resource "proxmox_virtual_environment_container" "test_container" {
~ id = "100" -> (known after apply)
node_name = "pve"
+ start_on_boot = true
started = true
- tags = [] -> null
template = false
+ timeout_clone = 1800
+ timeout_create = 1800
+ timeout_delete = 60
+ timeout_start = 300
+ timeout_update = 1800
+ unprivileged = false # forces replacement
+ vm_id = (known after apply)
- disk { # forces replacement
- datastore_id = "local-lvm" -> null # forces replacement
- size = 8 -> null # forces replacement
}
- initialization {
- hostname = "test" -> null
}
- network_interface {
- bridge = "vmbr0" -> null
- enabled = true -> null
- firewall = true -> null
- mac_address = "BC:24:11:A9:5C:E2" -> null
- mtu = 0 -> null
- name = "vmbr0" -> null
- rate_limit = 0 -> null
- vlan_id = 0 -> null
}
- operating_system { # forces replacement
- type = "ubuntu" -> null
}
}
Plan: 1 to import, 1 to add, 0 to change, 1 to destroy.
Regardless, the import is incomplete. For example, the operating_system
block is missing the template_file_id
attribute, which is mandatory, while it technically shouldn't be. And I guess there are other discrepancies.
Import is not something that I use often, so this functionality might be half-baked.
from terraform-provider-proxmox.
Thanks for your attention here, appreciate it.
My current use case is to migrate most/all of my infra to TF/Tofu, previously all created manually. I was hoping for a quicker/smoother/easier transition than basically bit-by-bit building tf files.
from terraform-provider-proxmox.
Related Issues (20)
- proxmox_virtual_environment_vm.virtual_machine already exists error HOT 2
- Please add new arguments and attributes to the `proxmox_virtual_environment_vms` data source HOT 2
- Unknown timezone "Europe/Amsterdam" with proxmox_virtual_environment_time HOT 2
- Changing disk size of 'proxmox_virtual_environment_container' forces replacement HOT 4
- proxmox_virtual_environment_download_file can't read metadata HOT 2
- CloudImage size changes forces replacement of VM HOT 2
- proxmox_virtual_environment_vm forces replacement by unchanged initialization.user_account.keys HOT 2
- A question about documentation related to the proxmox_virtual_environment_container resource
- Error listing files from datastore using API Token as credentials HOT 2
- Unable to download iso (OpenTofu) HOT 2
- proxmox_virtual_environment_network_linux_bridge additional config
- Weird behaviour with `file_format` vs. multiple disks HOT 2
- Adding VM/container to resource pool when creating HOT 1
- [Datasource - proxmox_virtual_environment_vms] Request fails if one of the nodes of the cluster fails HOT 1
- Confusing error message when cloning a VM with cloud-init to a non-default datastore HOT 3
- Creation of standalone VM disks
- Automatically reboot the VM when parameter changes
- Can't upload snippets by a non-root account to a non-local storage
- Make user password expired HOT 1
- No more than 14 cidr block allowed for ipset
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.