hpc: null_resource runner compatibility (E2E fix of 3.3.0-F-feature-simpl-33565.765.f7724799)
This commit is contained in:
parent
53339e50a8
commit
143cc56ed4
@ -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" {
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user