fix: remove azure from template
All checks were successful
Provision & Configure / Terraform Apply (push) Successful in 1m53s
All checks were successful
Provision & Configure / Terraform Apply (push) Successful in 1m53s
This commit is contained in:
@@ -3,10 +3,10 @@ terraform {
|
|||||||
esxi = {
|
esxi = {
|
||||||
source = "registry.terraform.io/josenk/esxi"
|
source = "registry.terraform.io/josenk/esxi"
|
||||||
}
|
}
|
||||||
azurerm = {
|
# azurerm = {
|
||||||
source = "hashicorp/azurerm"
|
# source = "hashicorp/azurerm"
|
||||||
version = "~> 4.27.0"
|
# version = "~> 4.27.0"
|
||||||
}
|
# }
|
||||||
}
|
}
|
||||||
backend "pg" {
|
backend "pg" {
|
||||||
conn_str = "postgres://terraform:tfbackend123@192.168.1.4/terraform_state?sslmode=disable"
|
conn_str = "postgres://terraform:tfbackend123@192.168.1.4/terraform_state?sslmode=disable"
|
||||||
@@ -22,8 +22,8 @@ provider "esxi" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
provider "azurerm" {
|
# provider "azurerm" {
|
||||||
resource_provider_registrations = "none"
|
# resource_provider_registrations = "none"
|
||||||
subscription_id = var.azure_subscriptionid
|
# subscription_id = var.azure_subscriptionid
|
||||||
features {}
|
# features {}
|
||||||
}
|
# }
|
||||||
|
@@ -5,22 +5,3 @@ users:
|
|||||||
- ${skylab-ssh-public-key}
|
- ${skylab-ssh-public-key}
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
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
|
|
||||||
|
26
terraform/userdata_with_azure.tftpl
Normal file
26
terraform/userdata_with_azure.tftpl
Normal 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
|
@@ -26,28 +26,28 @@ variable "esxi_password" {
|
|||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "azure_subscriptionid" {
|
# variable "azure_subscriptionid" {
|
||||||
description = "ID of the Azure Subscription."
|
# description = "ID of the Azure Subscription."
|
||||||
sensitive = true
|
# sensitive = true
|
||||||
}
|
# }
|
||||||
|
|
||||||
variable "azure_resourcegroup" {
|
# variable "azure_resourcegroup" {
|
||||||
description = "Name of the Azure Resource Group."
|
# description = "Name of the Azure Resource Group."
|
||||||
}
|
# }
|
||||||
|
|
||||||
variable "azure_location" {
|
# variable "azure_location" {
|
||||||
description = "Location of the Azure resources"
|
# description = "Location of the Azure resources"
|
||||||
default = "westeurope"
|
# default = "westeurope"
|
||||||
}
|
# }
|
||||||
|
|
||||||
variable "skylab_ssh_public_key" {
|
variable "skylab_ssh_public_key" {
|
||||||
description = "Public key for the ESXi VM"
|
description = "Public key for the ESXi VM"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "azure_ssh_public_key" {
|
# variable "azure_ssh_public_key" {
|
||||||
description = "Public key for the Azure VM"
|
# description = "Public key for the Azure VM"
|
||||||
}
|
# }
|
||||||
|
|
||||||
variable "azure_ssh_private_key" {
|
# variable "azure_ssh_private_key" {
|
||||||
description = "Private key of the Azure VM"
|
# description = "Private key of the Azure VM"
|
||||||
}
|
# }
|
||||||
|
Reference in New Issue
Block a user