Skip to content

Commit 6d21536

Browse files
authored
Fix image reference and upgrade provider (#15)
* Fix image ref, upgrade provider and update readme * Update readme * Fix action * Formatted terraform files --------- Co-authored-by: Naman1997 <Naman1997@users.noreply.github.com>
1 parent 6563afb commit 6d21536

File tree

7 files changed

+27
-14
lines changed

7 files changed

+27
-14
lines changed

.github/workflows/terraform.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ jobs:
2525
shell: bash
2626

2727
steps:
28+
2829
# Checkout the repository to the GitHub Actions runner
2930
- name: Checkout
3031
uses: actions/checkout@v3
3132

33+
# Install terraform
34+
- name: Setup Terraform
35+
uses: hashicorp/setup-terraform@v3
36+
with:
37+
terraform_version: "^1.3.7"
38+
terraform_wrapper: false
39+
3240
# Copy the terraform.tfvars.example file for variables
3341
- name: Create terraform.tfvars
3442
run: cp ./terraform.tfvars.example ./terraform.tfvars

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ cp terraform.tfvars.example terraform.tfvars
4040
vim terraform.tfvars
4141
```
4242

43+
## Enable the Snippets feature in Proxmox
4344

44-
## Creating the cluster
45+
In the proxmox web portal, go to `Datacenter` > `Storage` > Click on `local` > `Edit` > Under `Content` choose `Snippets` > Click on `OK` to save.
46+
47+
![local directory](image.png)
48+
49+
50+
## Create the cluster
4551

4652
```
4753
terraform init -upgrade
@@ -65,4 +71,4 @@ Currently this only happens if you're running this inside on a proxmox node that
6571

6672
This project uses `arp-scan` to scan the local network using arp requests. In case your user does not have proper permissions to scan using the `virbr0` interface, then the talos VMs will not be found.
6773

68-
To fix this, either you can update the permissions for that socket interface or you can just use `sudo`, in case you opt for solution 2, make sure to run the `talosctl kubeconfig` command generated for you in `talos_setup.sh` after `terraform apply` finishes.
74+
To fix this, either you can give your user access to the interface by adding it to `libvirt`, `libvirt-qemu` and `kvm` groups or you can just use `sudo`, in case you opt for solution 2, make sure to run the `talosctl kubeconfig` command generated for you in `talos_setup.sh` after `terraform apply` finishes.

image.png

54 KB
Loading

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ terraform {
33
required_providers {
44
docker = {
55
source = "kreuzwerker/docker"
6-
version = "~> 3.0.2"
6+
version = "3.0.2"
77
}
88
proxmox = {
99
source = "bpg/proxmox"
10-
version = "0.66.3"
10+
version = "0.69.1"
1111
}
1212
}
1313
}

modules/domain/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
proxmox = {
44
source = "bpg/proxmox"
5-
version = "0.66.3"
5+
version = "0.69.1"
66
}
77
}
88
}

modules/proxy/main.tf

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
proxmox = {
44
source = "bpg/proxmox"
5-
version = "0.66.3"
5+
version = "0.69.1"
66
}
77
}
88
}
@@ -44,14 +44,12 @@ resource "proxmox_virtual_environment_file" "cloud_config" {
4444
}
4545

4646
resource "proxmox_virtual_environment_download_file" "ubuntu_cloud_image" {
47-
content_type = "iso"
48-
datastore_id = "local"
49-
node_name = var.TARGET_NODE
50-
url = "https://cloud-images.ubuntu.com/oracular/20241109/oracular-server-cloudimg-amd64.img"
51-
checksum = "05bbfe57d7701c685d8c65f4d34cebe947bc89e3509c4d8a2b9c77f39e91f3ca"
52-
checksum_algorithm = "sha256"
53-
upload_timeout = 1000
54-
overwrite = false
47+
content_type = "iso"
48+
datastore_id = "local"
49+
node_name = var.TARGET_NODE
50+
url = "https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-amd64.img"
51+
upload_timeout = 1000
52+
overwrite = false
5553
}
5654

5755
resource "proxmox_virtual_environment_vm" "node" {

terraform.tfvars.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
system_type="intel"
33

44
# Hypervisor config
5+
# Make sure `ssh PROXMOX_USERNAME@<PROXMOX_IP> -i <SSH_KEY>` works
56
PROXMOX_API_ENDPOINT = "https://192.168.0.103:8006/api2/json"
67
PROXMOX_USERNAME = "root"
78
PROXMOX_PASSWORD = "password"

0 commit comments

Comments
 (0)