Skip to content

Commit

Permalink
Merge pull request #12 from m4xmorris/add-outputs-tf
Browse files Browse the repository at this point in the history
Added `outputs.tf`
  • Loading branch information
m4xmorris authored Nov 29, 2023
2 parents 719bffc + 34a440c commit faec5e5
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
output "aud" {
value = cloudflare_access_application.application.aud
description = "Application Audience (AUD) Tag of the application"
}

output "id" {
value = cloudflare_access_application.application.id
description = "ID of the application"
}

locals {
device_policy_rules_empty = length(flatten([var.device_policy_rules_windows, var.device_policy_rules_macos, var.device_policy_rules_ios, var.device_policy_rules_android])) == 0
}

output "github_policy_id" {
value = local.device_policy_rules_empty ? cloudflare_access_policy.github_policy[0].id : null
description = "ID of the GitHub policy, if it exists"
}

output "device_policy_windows_id" {
value = local.device_policy_rules_empty ? null : cloudflare_access_policy.device_policy_windows[0].id
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
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
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
description = "ID of the Device Policy (Android)"
}

0 comments on commit faec5e5

Please sign in to comment.