feat: provision vm's
Some checks failed
Provision & Configure / Terraform Apply (push) Has been cancelled

This commit is contained in:
Ditmar Visser
2025-06-05 19:54:17 +00:00
parent 04d40be424
commit 153dbd26b5
10 changed files with 458 additions and 2 deletions

27
terraform/userdata.tftpl Normal file
View File

@@ -0,0 +1,27 @@
#cloud-config
users:
- name: testuser
ssh-authorized-keys:
- ${skylab-ssh-public-key}
shell: /bin/bash
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
write_files:
- path: /home/testuser/.ssh/azure
content: |
${azure-ssh-private-key}
permissions: "0600"
owner: testuser:testuser
defer: true
- path: /home/testuser/.ssh/config
content: |
Host azurevm
HostName ${azure-vm-ip}
User iac
IdentityFile ~/.ssh/azure
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
permissions: "0600"
owner: testuser:testuser
defer: true