diff --git a/outputs.tf b/outputs.tf index f224c4f..3bec1da 100644 --- a/outputs.tf +++ b/outputs.tf @@ -18,21 +18,21 @@ output "github_policy_id" { } output "device_policy_windows_id" { - value = local.device_policy_rules_empty ? null : cloudflare_access_policy.device_policy_windows[0].id + value = local.device_policy_rules_empty ? null : length(cloudflare_access_policy.device_policy_windows) > 0 ? cloudflare_access_policy.device_policy_windows[0].id : null description = "ID of the Device Policy (Windows)" } output "device_policy_macos_id" { - value = local.device_policy_rules_empty ? null : cloudflare_access_policy.device_policy_macos[0].id + value = local.device_policy_rules_empty ? null : length(cloudflare_access_policy.device_policy_macos) > 0 ? cloudflare_access_policy.device_policy_macos[0].id : null description = "ID of the Device Policy (macOS)" } output "device_policy_ios_id" { - value = local.device_policy_rules_empty ? null : cloudflare_access_policy.device_policy_ios[0].id + value = local.device_policy_rules_empty ? null : length(cloudflare_access_policy.device_policy_ios) > 0 ? cloudflare_access_policy.device_policy_ios[0].id : null description = "ID of the Device Policy (iOS)" } output "device_policy_android_id" { - value = local.device_policy_rules_empty ? null : cloudflare_access_policy.device_policy_android[0].id + value = local.device_policy_rules_empty ? null : length(cloudflare_access_policy.device_policy_android) > 0 ? cloudflare_access_policy.device_policy_android[0].id : null description = "ID of the Device Policy (Android)" -} \ No newline at end of file +}