Skip to content

Commit 27eb69d

Browse files
author
Piet Schrijver
committed
Add documentation for the security label resource
1 parent fbfd8b9 commit 27eb69d

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: "postgresql"
3+
page_title: "PostgreSQL: postgresql_grant"
4+
sidebar_current: "docs-postgresql-resource-postgresql_grant"
5+
description: |-
6+
Creates and manages privileges given to a user for a database schema.
7+
---
8+
9+
# postgresql\_security\_label
10+
11+
The ``postgresql_security_label`` resource creates and manages security labels.
12+
13+
See [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-security-label.html)
14+
15+
~> **Note:** This resource needs Postgresql version 11 or above.
16+
17+
## Usage
18+
19+
```hcl
20+
resource "postgresql_role" "my_role" {
21+
name = "my_role"
22+
login = true
23+
}
24+
25+
resource "postgresql_security_label" "workload" {
26+
object_type = "role"
27+
object_name = postgresql_role.my_role.name
28+
label_provider = "pgaadauth"
29+
label = "aadauth,oid=00000000-0000-0000-0000-000000000000,type=service"
30+
}
31+
```
32+
33+
## Argument Reference
34+
35+
* `object_type` - (Required) The PostgreSQL object type to apply this security label to.
36+
* `object_name` - (Required) The name of the object to be labeled. Names of objects that reside in schemas (tables, functions, etc.) can be schema-qualified.
37+
* `label_provider` - (Required) The name of the provider with which this label is to be associated.
38+
* `label` - (Required) The value of the security label.

website/postgresql.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
<li<%= sidebar_current("docs-postgresql-resource-postgresql_user_mapping") %>>
5353
<a href="/docs/providers/postgresql/r/postgresql_user_mapping.html">postgresql_user_mapping</a>
5454
</li>
55+
<li<%= sidebar_current("docs-postgresql-resource-postgresql_security_label") %>>
56+
<a href="/docs/providers/postgresql/r/postgresql_security_label.html">postgresql_security_label</a>
57+
</li>
5558
</ul>
5659
</li>
5760

0 commit comments

Comments
 (0)