|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "ybm_db_audit_logging Resource - ybm" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The resource to manage DB Audit log configuration for a cluster in YugabyteDB Aeon. |
| 7 | +--- |
| 8 | + |
| 9 | +# ybm_db_audit_logging (Resource) |
| 10 | + |
| 11 | +The resource to manage DB Audit log configuration for a cluster in YugabyteDB Aeon. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# DB audit log configuration for a cluster |
| 17 | +resource "ybm_db_audit_logging" "sample-db-audit-log-config" { |
| 18 | + cluster_id = "<Your-Cluster-Id>" |
| 19 | + integration_name = "<Your-Integration-Name>" |
| 20 | + ysql_config = { |
| 21 | + log_settings = { |
| 22 | + log_catalog = true |
| 23 | + log_client = false |
| 24 | + log_relation = true |
| 25 | + log_level = "LOG" |
| 26 | + log_statement_once = true |
| 27 | + log_parameter = false |
| 28 | + } |
| 29 | + statement_classes = ["READ", "WRITE", "ROLE"] |
| 30 | + } |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +<!-- schema generated by tfplugindocs --> |
| 35 | +## Schema |
| 36 | + |
| 37 | +### Required |
| 38 | + |
| 39 | +- `cluster_id` (String) ID of the cluster from which DB Audit Logs will be exported |
| 40 | +- `integration_name` (String) Name of the integration to which the DB Audit Logs will be exported |
| 41 | +- `ysql_config` (Attributes) The specification for a DB Audit ysql export configuration (see [below for nested schema](#nestedatt--ysql_config)) |
| 42 | + |
| 43 | +### Read-Only |
| 44 | + |
| 45 | +- `account_id` (String) ID of the account this DB Audit log configuration belongs to. |
| 46 | +- `cluster_name` (String) Name of the cluster from which DB Audit Logs will be exported |
| 47 | +- `config_id` (String) ID of the DB Audit logging configuration |
| 48 | +- `integration_id` (String) ID of the integration to which the DB Audit Logs will be exported |
| 49 | +- `project_id` (String) ID of the project this DB Audit log configuration belongs to. |
| 50 | +- `state` (String) The status of DB Audit Logging on the cluster |
| 51 | + |
| 52 | +<a id="nestedatt--ysql_config"></a> |
| 53 | +### Nested Schema for `ysql_config` |
| 54 | + |
| 55 | +Required: |
| 56 | + |
| 57 | +- `log_settings` (Attributes) Db Audit Ysql Log Settings (see [below for nested schema](#nestedatt--ysql_config--log_settings)) |
| 58 | +- `statement_classes` (Set of String) List of ysql statements |
| 59 | + |
| 60 | +<a id="nestedatt--ysql_config--log_settings"></a> |
| 61 | +### Nested Schema for `ysql_config.log_settings` |
| 62 | + |
| 63 | +Optional: |
| 64 | + |
| 65 | +- `log_catalog` (Boolean) These system catalog tables record system (as opposed to user) activity, such as metadata lookups and from third-party tools performing lookups. Defaults to 'true' if not specified. |
| 66 | +- `log_client` (Boolean) Enable this option to echo log messages directly to clients such as ysqlsh and psql. Defaults to 'true' if not specified |
| 67 | +- `log_level` (String) Sets the severity level of logs written to clients. Defaults to 'LOG' if not specified |
| 68 | +- `log_parameter` (Boolean) Include the parameters that were passed with the statement in the logs. Defaults to 'false' if not specified |
| 69 | +- `log_relation` (Boolean) Create separate log entries for each relation (TABLE, VIEW, and so on) referenced in a SELECT or DML statement. Defaults to 'false' if not specified |
| 70 | +- `log_statement_once` (Boolean) Enable this setting to only include statement text and parameters for the first entry for a statement or sub-statement combination. Defaults to 'false' if not specified |
0 commit comments