Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
l-with committed Aug 14, 2024
1 parent 7c573bf commit 068e974
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/data-sources/policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
page_title: "authentik_policy Data Source - terraform-provider-authentik"
subcategory: "Customization"
description: |-
Get policy by name
---

# authentik_policy (Data Source)

Get policy by name

## Example Usage

```terraform
# To get the ID of a policy by name
data "authentik_policy" "default-authentication-flow-password-stage" {
name = "default-authentication-flow-password-stage"
}
# Then use `data.authentik_policy.default-authentication-flow-password-stage.id`
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `name` (String) Generated.

### Read-Only

- `id` (String) The ID of this resource.
7 changes: 7 additions & 0 deletions examples/data-sources/authentik_policy/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# To get the ID of a policy by name

data "authentik_policy" "default-authentication-flow-password-stage" {
name = "default-authentication-flow-password-stage"
}

# Then use `data.authentik_policy.default-authentication-flow-password-stage.id`

0 comments on commit 068e974

Please sign in to comment.