Skip to content

Data source for ACL policy document #618

@OJFord

Description

@OJFord

Is your feature request related to a problem? Please describe.
It's convenient to be able to define documents such as policy files in HCL, for validation, syntax highlighting, etc.

Presently the tailscale_acl resource (which at time of writing refers to the whole policy file) requires specifying the file in inline (hu)json.

Describe the solution you'd like
Analagous to aws_iam_policy_document, I'd like to be able to do:

data "tailscale_policy_document" "this" {
    grant {
        src = ["*"]
        dst = ["*"]
        ip  = ["*"]
    }

    # ...
}

resource "tailscale_policy_file" "as_hcl" { # nee tailscale_acl
  acl = data.tailscale_policy_document.this.json
}

Additional context
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document

I could probably contribute a PR for this if you're open to the idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions