Skip to content

Commit 40a52b6

Browse files
use coalesce
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 4a1e8d7 commit 40a52b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ locals {
1616

1717
userdata = templatefile("${path.module}/userdata.sh.tmpl", {
1818
authkey = try(
19-
one(tailscale_oauth_client.default[*].key),
20-
one(tailscale_tailnet_key.default[*].key)
19+
coalesce(
20+
one(tailscale_oauth_client.default[*].key),
21+
one(tailscale_tailnet_key.default[*].key),
22+
),
23+
null
2124
)
2225
exit_node_enabled = var.exit_node_enabled
2326
hostname = module.this.id

0 commit comments

Comments
 (0)