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 = {
|
||||
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 {}
|
||||
# }
|
||||
|
@@ -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
|
||||
|
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
|
||||
}
|
||||
|
||||
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"
|
||||
# }
|
||||
|
Reference in New Issue
Block a user