Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DLP policies #568

Open
alexb-twingate opened this issue Aug 5, 2024 · 0 comments · May be fixed by #577
Open

Add support for DLP policies #568

alexb-twingate opened this issue Aug 5, 2024 · 0 comments · May be fixed by #577
Labels

Comments

@alexb-twingate
Copy link
Contributor

New functionality

  • Add a new data source twingate_dlp_policy
    • Optional
      • name (String): the DLP policy's name. Returns a DLP policy that exactly matches this name.
      • id (String): the DLP policy's ID. Returns a DLP policy that has this ID.
  • Add a new data source twingate_dlp_policies
    • Optional
      • name (String): returns only DLP policies that exactly match this name. If no options are passed, returns all DLP policies.
      • name_contains (String): returns only DLP policies that contain this string.
      • name_exclude (String): returns only DLP policies that do not include this string.
      • name_prefix (String): returns only DLP policies that start in this string.
      • name_regexp (String): returns only DLP policies that satisfy this regex.
      • name_suffix (String): returns only DLP policies that end in this string.
    • Read only
      • id (String): The ID of this data source
      • dlp_policies (Attribute list)
        • id (String): the ID of this DLP policy
        • name (String): the name of this DLP policy
  • Update twingate_resource to be able to set DLP policies on the Resource and its access edges
    • Optional
      • dlp_policy_id (String): the ID of a DLP policy to be used as the default DLP policy for this Resource. Defaults to null.
    • Update the access_group block
      • Optional
        • dlp_policy_id (String): the ID of a DLP policy to be used as the DLP policy for the group in this access block.

Behavior

  • We're adding the ability to query DLP policies and to set them on Resources and Resource accesses.
  • The new dlp_policy and dlp_policies data sources are used to query one or multiple DLP policies respectively.
  • On the twingate_resource resource, we're adding the ability to set DLP policies for the Resource as well as on specific group accesses.

Example usage

data twingate_dlp_policy example {
  name = "DLP Policy Example"
}

data twingate_dlp_policy access_example {
  name = "DLP Policy Access Example"
}

resource twingate_resource salesforce {
  name    = "Salesforce"
  address = "*.salesforce.com"
  remote_network_id = data.twingate_remote_network.example.id

  dlp_policy_id = data.twingate_dlp_policy.example.id

  access_group {
    group_id      = data.twingate_group.example.id
    dlp_policy_id = data.twingate_dlp_policy.access_example.id
  }
}
@vmanilo vmanilo linked a pull request Sep 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant