hpc: null_resource runner compatibility (E2E fix of 3.3.0-F-feature-simpl-33565.765.f7724799)

This commit is contained in:
e2e 2026-10-07 16:15:55 +01:00
parent 53339e50a8
commit 143cc56ed4
No known key found for this signature in database
GPG Key ID: 55013FAF701028D7
2 changed files with 12 additions and 3 deletions

View File

@ -31,11 +31,16 @@ resource "random_password" "consumer" {
// never touches the instances: this resource is replaced (triggered by the // never touches the instances: this resource is replaced (triggered by the
// rotation marker), re-runs chpasswd over SSH with the management key, and // rotation marker), re-runs chpasswd over SSH with the management key, and
// the Vault entry below is updated in the same apply. // 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 // Re-applied on rotation AND whenever the head node is recreated: a fresh
// instance boots without the consumer password (it never travels through // instance boots without the consumer password (it never travels through
// user data). // 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 { connection {
type = "ssh" type = "ssh"
@ -65,7 +70,7 @@ resource "vault_kv_secret_v2" "consumer" {
port = 22 port = 22
}) })
depends_on = [terraform_data.consumer_password] depends_on = [null_resource.consumer_password]
} }
resource "vault_kv_secret_v2" "admin" { resource "vault_kv_secret_v2" "admin" {

View File

@ -16,6 +16,10 @@ terraform {
source = "hashicorp/tls" source = "hashicorp/tls"
version = "4.0.6" version = "4.0.6"
} }
null = {
source = "hashicorp/null"
version = "3.2.4"
}
cloudinit = { cloudinit = {
source = "hashicorp/cloudinit" source = "hashicorp/cloudinit"
version = "2.3.7" version = "2.3.7"