Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anacalva authored Feb 20, 2024
1 parent 65ac923 commit 54b1f15
Showing 1 changed file with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,76 @@ terraform module for creating proxmox vms
<details><summary><b>CREATE PVE VM</b></summary>

```hcl
provider "proxmox" {
pm_api_url = var.pve_api_url
pm_user = var.pve_api_user
pm_password = var.pve_api_password
pm_tls_insecure = var.pve_api_tls_verify
}
# CALL MODULE - main.tf
# main.tf
module "proxmox-vm" {
source = "git::https://github.com/stuttgart-things/proxmox-vm.git"
pve_api_url = var.pve_api_url
pve_api_user = var.pve_api_user
pve_api_password = var.pve_api_password
pve_api_tls_verify = var.pve_api_tls_verify
pve_cluster_node = "sthings-pve1"
pve_datastore = "datastore"
pve_folder_path = "stuttgart-things"
pve_network = "vmbr0"
pve_network = "vmbr101"
vm_count = 1
vm_name = "cstream8-test"
vm_notes = "cstream8-blal"
vm_template = "cstream8"
vm_name = "vm-test-name"
vm_notes = "vm-info"
vm_template = "ubuntu22"
vm_num_cpus = "4"
vm_memory = "4096"
vm_disk_size = "35G"
vm_disk_size = "32G"
vm_ssh_user = var.vm_ssh_user
vm_ssh_password = var.vm_ssh_password
}
output "ip" {
value = module.proxmox.ip
value = module.proxmox-vm.ip
}
output "mac" {
value = module.proxmox.mac
value = module.proxmox-vm.mac
}
output "id" {
value = module.proxmox.id
value = module.proxmox-vm.id
}
variable "pve_api_url" {
default = "https://sthings-pve1.example.com:8006/api2/json"
description = "url of proxmox api"
}
variable "pve_api_user" {
default = "terraform@pve"
description = "username of proxmox api user"
}
variable "pve_api_password" {
default = "{{ your_password}}"
description = "password of proxmox api user"
}
variable "vm_ssh_user" {
description = "username of proxmox api user"
}
variable "vm_ssh_password" {
description = "password of proxmox api user"
}
variable "pve_api_tls_verify" {
default = true
description = "proxmox API disable check if cert is valid"
}
```

```
# VARIABLES -tfvars
pve_api_url="<API-URL>" #Example: "https://server-example.sva.de:8006/api2/json"
pve_api_user="<API-USER>"
pve_api_password="<API-PASSWORD>"
pve_api_tls_verify = true
vm_ssh_user="<SSH-USER>"
vm_ssh_password="<SSH-PASSWORD>"
```

</details>
Expand Down

0 comments on commit 54b1f15

Please sign in to comment.