fix: remove azure from template
All checks were successful
Provision & Configure / Terraform Apply (push) Successful in 1m53s

This commit is contained in:
Ditmar Visser
2025-06-06 10:38:38 +00:00
parent 435f97bef9
commit a04a62c68b
5 changed files with 52 additions and 45 deletions

View File

@@ -3,10 +3,10 @@ terraform {
esxi = {
source = "registry.terraform.io/josenk/esxi"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.27.0"
}
# azurerm = {
# source = "hashicorp/azurerm"
# version = "~> 4.27.0"
# }
}
backend "pg" {
conn_str = "postgres://terraform:tfbackend123@192.168.1.4/terraform_state?sslmode=disable"
@@ -22,8 +22,8 @@ provider "esxi" {
}
provider "azurerm" {
resource_provider_registrations = "none"
subscription_id = var.azure_subscriptionid
features {}
}
# provider "azurerm" {
# resource_provider_registrations = "none"
# subscription_id = var.azure_subscriptionid
# features {}
# }

View File

@@ -5,22 +5,3 @@ users:
- ${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 testuser
# IdentityFile ~/.ssh/azure
# StrictHostKeyChecking no
# UserKnownHostsFile=/dev/null
# permissions: "0600"
# owner: testuser:testuser
# defer: true

View File

@@ -0,0 +1,26 @@
#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 testuser
IdentityFile ~/.ssh/azure
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
permissions: "0600"
owner: testuser:testuser
defer: true

View File

@@ -26,28 +26,28 @@ variable "esxi_password" {
sensitive = true
}
variable "azure_subscriptionid" {
description = "ID of the Azure Subscription."
sensitive = true
}
# variable "azure_subscriptionid" {
# description = "ID of the Azure Subscription."
# sensitive = true
# }
variable "azure_resourcegroup" {
description = "Name of the Azure Resource Group."
}
# variable "azure_resourcegroup" {
# description = "Name of the Azure Resource Group."
# }
variable "azure_location" {
description = "Location of the Azure resources"
default = "westeurope"
}
# variable "azure_location" {
# description = "Location of the Azure resources"
# default = "westeurope"
# }
variable "skylab_ssh_public_key" {
description = "Public key for the ESXi VM"
}
variable "azure_ssh_public_key" {
description = "Public key for the Azure VM"
}
# variable "azure_ssh_public_key" {
# description = "Public key for the Azure VM"
# }
variable "azure_ssh_private_key" {
description = "Private key of the Azure VM"
}
# variable "azure_ssh_private_key" {
# description = "Private key of the Azure VM"
# }