From 143cc56ed4731f3327f44db19e9c3b4d1b0c2a1c Mon Sep 17 00:00:00 2001 From: e2e Date: Wed, 7 Oct 2026 16:15:55 +0100 Subject: [PATCH] hpc: null_resource runner compatibility (E2E fix of 3.3.0-F-feature-simpl-33565.765.f7724799) --- hpc/ovh/credentials.tf | 11 ++++++++--- hpc/ovh/versions.tf | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/hpc/ovh/credentials.tf b/hpc/ovh/credentials.tf index 09d2206..3de9fce 100644 --- a/hpc/ovh/credentials.tf +++ b/hpc/ovh/credentials.tf @@ -31,11 +31,16 @@ resource "random_password" "consumer" { // never touches the instances: this resource is replaced (triggered by the // rotation marker), re-runs chpasswd over SSH with the management key, and // the Vault entry below is updated in the same apply. -resource "terraform_data" "consumer_password" { +// null_resource instead of terraform_data: the tofu-controller runner ships a +// Terraform older than 1.4, which has no terraform_data built-in. +resource "null_resource" "consumer_password" { // Re-applied on rotation AND whenever the head node is recreated: a fresh // instance boots without the consumer password (it never travels through // user data). - triggers_replace = [var.credentials_version, ovh_cloud_project_instance.head.id] + triggers = { + rotation = var.credentials_version + head_node = ovh_cloud_project_instance.head.id + } connection { type = "ssh" @@ -65,7 +70,7 @@ resource "vault_kv_secret_v2" "consumer" { port = 22 }) - depends_on = [terraform_data.consumer_password] + depends_on = [null_resource.consumer_password] } resource "vault_kv_secret_v2" "admin" { diff --git a/hpc/ovh/versions.tf b/hpc/ovh/versions.tf index 7b1ad18..46bdbe7 100644 --- a/hpc/ovh/versions.tf +++ b/hpc/ovh/versions.tf @@ -16,6 +16,10 @@ terraform { source = "hashicorp/tls" version = "4.0.6" } + null = { + source = "hashicorp/null" + version = "3.2.4" + } cloudinit = { source = "hashicorp/cloudinit" version = "2.3.7"