Difference between revisions of "Terraform resource: tailscale acl"

From wikieduonline
Jump to navigation Jump to search
(Created page with " {{tf ts}}")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<code>tailscale_ acl</code> ([https://registry.terraform.io/providers/tailscale/tailscale/latest/docs/resources/acl doc])
  
 +
== Official example ==
  
 +
resource "tailscale_acl" "as_json" {
 +
  acl = [[jsonencode]]({
 +
    acls : [
 +
      {
 +
        // Allow all users access to all ports.
 +
        action = "accept",
 +
        [[users]]  = ["*"],
 +
        [[ports]]  = ["*:*"],
 +
      },
 +
    ],
 +
  })
 +
}
  
{{tf ts}}
+
<pre>
 +
resource "tailscale_acl" "as_hujson" {
 +
  acl = <<EOF
 +
  {
 +
    // Comments in HuJSON policy are preserved when the policy is applied.
 +
    "acls": [
 +
      {
 +
        // Allow all users access to all ports.
 +
        action = "accept",
 +
        users  = ["*"],
 +
        ports  = ["*:*"],
 +
      },
 +
    ],
 +
  }
 +
  EOF
 +
}
 +
</pre>
 +
 
 +
== See also ==
 +
* {{tf tailscale}}
 +
 
 +
[[Category:TF]]

Latest revision as of 15:29, 30 July 2024

tailscale_ acl (doc)

Official example[edit]

resource "tailscale_acl" "as_json" {
 acl = jsonencode({
   acls : [
     {
       // Allow all users access to all ports.
       action = "accept",
       users  = ["*"],
       ports  = ["*:*"],
     },
   ],
 })
}
resource "tailscale_acl" "as_hujson" {
  acl = <<EOF
  {
    // Comments in HuJSON policy are preserved when the policy is applied.
    "acls": [
      {
        // Allow all users access to all ports.
        action = "accept",
        users  = ["*"],
        ports  = ["*:*"],
      },
    ],
  }
  EOF
}

See also[edit]

Advertising: