Skip to content

Commit

Permalink
Document that ACL tests are run when creating and updating tailscale_…
Browse files Browse the repository at this point in the history
…acl resources. (#325)

Fixes #158.
Closes #161.
  • Loading branch information
dsymonds authored Feb 2, 2024
1 parent 38e9176 commit 5458573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/resources/acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ page_title: "tailscale_acl Resource - terraform-provider-tailscale"
subcategory: ""
description: |-
The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.
---

# tailscale_acl (Resource)

The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.

If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.

## Example Usage

```terraform
Expand Down
6 changes: 5 additions & 1 deletion tailscale/resource_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ import (
"github.com/tailscale/tailscale-client-go/tailscale"
)

const resourceACLDescription = `The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.`

func resourceACL() *schema.Resource {
return &schema.Resource{
Description: "The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.",
Description: resourceACLDescription,
ReadContext: resourceACLRead,
CreateContext: resourceACLCreate,
UpdateContext: resourceACLUpdate,
Expand Down

0 comments on commit 5458573

Please sign in to comment.