feat: support SSH private key injection for CI
Use proxmox_ssh_private_key variable when available, otherwise fall back to SSH agent for local development.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# =====================================================================
|
||||
# ==========================================================================
|
||||
# Déclaration des Providers Terraform
|
||||
#
|
||||
# Ce fichier indique à Terraform quels "plugins" il doit
|
||||
# télécharger pour interagir avec les API externes (Proxmox, etc.)
|
||||
# et comment les configurer.
|
||||
# =====================================================================
|
||||
# ==========================================================================
|
||||
|
||||
terraform {
|
||||
required_version = ">= 1.5.0"
|
||||
@@ -43,7 +43,8 @@ provider "proxmox" {
|
||||
api_token = var.proxmox_api_token
|
||||
insecure = true
|
||||
ssh {
|
||||
agent = true
|
||||
username = "root"
|
||||
agent = var.proxmox_ssh_private_key == "" ? true : false
|
||||
username = "root"
|
||||
private_key = var.proxmox_ssh_private_key != "" ? var.proxmox_ssh_private_key : null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user