-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] cant retrive static ip from container #1619
Comments
hey @Dialgatrainer02 👋🏼 that works fine: resource "proxmox_virtual_environment_container" "test_container" {
node_name = "pve"
disk {
datastore_id = "local-lvm"
size = 8
}
started = true
initialization {
hostname = "test"
user_account {
password = "password"
}
ip_config {
ipv4 {
address = "172.17.1.1/15"
gateway = "172.16.0.1"
}
}
}
network_interface {
name = "vmbr0"
firewall = true
}
operating_system {
template_file_id = "local:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
type = "ubuntu"
}
}
output "container-initialization" {
value = proxmox_virtual_environment_container.test_container.initialization[0].ip_config[0].ipv4[0].address
}
|
Cool thank you for the help I'll need to hunt down the attribute forcing replacement but that was really helpful thanks |
I had the username as null on the VM setting it to the VM images default user fixed it and it works as expected however I'm encountering a cyclical dependency as I'm using a container to run a DNS server and I want all the vMS to use it however terraform is unhappy with me setting it to the container ip. After recourse creation can I update the DNS part of a later once they have all been made? |
hello, im trying to grab the ip address of a container by using the resource and attribute
eg
however terraform is saying initalisation is a list of objects
if i change initalization to include the index it then moves the error to ip_config and so on
i have used the first method when in for each using [each.key] rather than just adguard so im confused why its not working when i hardcode the key
the rest of my code is at https://github.com/Dialgatrainer02/home-lab/tree/main/terraform
this is my first time using terraform so im pretty new to it
also off topic question why does terraform always replace my vm i can run 2 apply's back to back and it will destroy and recreate my vm's
The text was updated successfully, but these errors were encountered: