Skip to content

Commit 82c1c2d

Browse files
committed
Store preflight compose hashes as Terraform resources
1 parent bd8bc6e commit 82c1c2d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

consul-postgres-ha/cluster-example/cluster.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ locals {
368368
identity = svc.identity
369369
consul_service = svc.consul_service
370370
consul_permissions = svc.consul_permissions
371-
allowed_compose_hashes = [data.phala_app_preflight.worker[k].compose_hash]
371+
allowed_compose_hashes = [phala_app_preflight.worker[k].compose_hash]
372372
}
373373
]
374374
])
@@ -391,7 +391,7 @@ locals {
391391

392392
# ---------- Coordinator ----------
393393

394-
data "phala_app_preflight" "coordinator" {
394+
resource "phala_app_preflight" "coordinator" {
395395
for_each = local.coordinator_ordinals
396396

397397
name = "${var.cluster_name}-coordinator-${each.key}"
@@ -407,7 +407,7 @@ data "phala_app_preflight" "coordinator" {
407407
public_sysinfo = false
408408
}
409409

410-
data "phala_app_preflight" "worker" {
410+
resource "phala_app_preflight" "worker" {
411411
for_each = local.worker_ordinals
412412

413413
name = "${var.cluster_name}-worker-${each.key}"
@@ -502,10 +502,10 @@ output "coordinator_app_ids" { value = { for k, c in phala_app.coordinator : k =
502502
output "worker_app_ids" { value = { for k, w in phala_app.worker : k => w.app_id } }
503503
output "admission_policy_json" { value = local.admission_policy_json }
504504
output "coordinator_preflight_compose_hashes" {
505-
value = { for k, c in data.phala_app_preflight.coordinator : k => c.compose_hash }
505+
value = { for k, c in phala_app_preflight.coordinator : k => c.compose_hash }
506506
}
507507
output "worker_preflight_compose_hashes" {
508-
value = { for k, w in data.phala_app_preflight.worker : k => w.compose_hash }
508+
value = { for k, w in phala_app_preflight.worker : k => w.compose_hash }
509509
}
510510
output "consul_ui" {
511511
# Coordinator-0's Consul HTTP API on the canonical 8500. Plain HTTP

0 commit comments

Comments
 (0)