$ terraform init
Initializing the backend...
Initializing provider plugins...
- Finding latest version of ondrejsika/proxmox...
- Installing ondrejsika/proxmox v2020.9.21...
- Installed ondrejsika/proxmox v2020.9.21 (self-signed, key ID 410FB99F8F08737F)
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/plugins/signing.html
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
$ terraform plan
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# proxmox_lxc.lxc[0] will be created
+ resource "proxmox_lxc" "lxc" {
+ arch = "amd64"
+ cmode = "tty"
+ console = true
+ cores = 1
+ cpulimit = 0
+ cpuunits = 1024
+ hostname = "tf-lxc-0"
+ id = (known after apply)
+ memory = 1024
+ onboot = false
+ ostemplate = "local:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
+ password = "yourpasswordhere!"
+ protection = false
+ rootfs = "local-lvm:8"
+ start = false
+ storage = "local-lvm"
+ swap = 2048
+ target_node = "pve-dev01"
+ tty = 2
+ unprivileged = true
+ vmid = 0
+ network {
+ bridge = "vmbr0"
+ firewall = true
+ gw = "192.168.122.1"
+ ip = "192.168.122.101/24"
+ name = "eth0"
}
}
# proxmox_lxc.lxc[1] will be created
+ resource "proxmox_lxc" "lxc" {
+ arch = "amd64"
+ cmode = "tty"
+ console = true
+ cores = 1
+ cpulimit = 0
+ cpuunits = 1024
+ hostname = "tf-lxc-1"
+ id = (known after apply)
+ memory = 1024
+ onboot = false
+ ostemplate = "local:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
+ password = "yourpasswordhere!"
+ protection = false
+ rootfs = "local-lvm:8"
+ start = false
+ storage = "local-lvm"
+ swap = 2048
+ target_node = "pve-dev01"
+ tty = 2
+ unprivileged = true
+ vmid = 0
+ network {
+ bridge = "vmbr0"
+ firewall = true
+ gw = "192.168.122.1"
+ ip = "192.168.122.102/24"
+ name = "eth0"
}
}
Plan: 2 to add, 0 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
$ terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# proxmox_lxc.lxc[0] will be created
+ resource "proxmox_lxc" "lxc" {
+ arch = "amd64"
+ cmode = "tty"
+ console = true
+ cores = 1
+ cpulimit = 0
+ cpuunits = 1024
+ hostname = "tf-lxc-0"
+ id = (known after apply)
+ memory = 1024
+ onboot = false
+ ostemplate = "local:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
+ password = "yourpasswordhere!"
+ protection = false
+ rootfs = "local-lvm:8"
+ start = false
+ storage = "local-lvm"
+ swap = 2048
+ target_node = "pve-dev01"
+ tty = 2
+ unprivileged = true
+ vmid = 0
+ network {
+ bridge = "vmbr0"
+ firewall = true
+ gw = "192.168.122.1"
+ ip = "192.168.122.101/24"
+ name = "eth0"
}
}
# proxmox_lxc.lxc[1] will be created
+ resource "proxmox_lxc" "lxc" {
+ arch = "amd64"
+ cmode = "tty"
+ console = true
+ cores = 1
+ cpulimit = 0
+ cpuunits = 1024
+ hostname = "tf-lxc-1"
+ id = (known after apply)
+ memory = 1024
+ onboot = false
+ ostemplate = "local:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
+ password = "yourpasswordhere!"
+ protection = false
+ rootfs = "local-lvm:8"
+ start = false
+ storage = "local-lvm"
+ swap = 2048
+ target_node = "pve-dev01"
+ tty = 2
+ unprivileged = true
+ vmid = 0
+ network {
+ bridge = "vmbr0"
+ firewall = true
+ gw = "192.168.122.1"
+ ip = "192.168.122.102/24"
+ name = "eth0"
}
}
Plan: 2 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
proxmox_lxc.lxc[0]: Creating...
proxmox_lxc.lxc[1]: Creating...
proxmox_lxc.lxc[0]: Creation complete after 8s [id=pve/lxc/103]
proxmox_lxc.lxc[1]: Still creating... [10s elapsed]
proxmox_lxc.lxc[1]: Creation complete after 10s [id=pve/lxc/109]
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.