DbaaS Postgres
Database Hba Entry
Terraform reference for Database Hba Entry.
Schema Properties
| Property | Type | Description |
|---|---|---|
auth_method RequiredDefault | string | The authentication method to use for this HBA entry (e.g., cert, scram-sha-256, pam). When set to cert, connection_type must be hostssl. pam is only allowed when all users are group roles (prefixed with '+'). Examples: scram-sha-256cert |
auth_options | string | The authentication option based on provided method for this HBA entry. |
connection_type Default | string | The type of connection this HBA entry applies to (e.g., host, hostssl). Must be hostssl when auth_method is cert. Examples: hosthostssl |
database_id Required | string | Asset ID of the parent database (platform/region/architecture/dbName). Used by the platform to register a parent relation and validate the database exists at creation time. Examples: sb/eu/2/axis_mydb |
rule_id Computed | string | Deprecated in favor of rule_name; echoes the rule_name value. Kept for backward compatibility during the transition. |
rule_name RequiredForceNew | string | Immutable caller-supplied name identifying this HBA rule. Forms the last segment of the asset ID and is unique per database; letters, digits, underscores, hyphens, and dots only. Examples: allow_app_readers |
source_addresses RequiredDefault | list(string) | List of client IP addresses or CIDR ranges this HBA entry applies to. Examples: ["10.133.84.2/32","10.135.84.2/32"] |
users Required | string | Comma-separated list of database users this HBA entry applies to. Examples: axis_myuser,core_readertenant_admin |
resource "gi_dbaas_pg_database_hba_entry" "example" { attributes = { auth_method = "cert" database_id = "example-database_id" rule_name = "example-rule_name" source_addresses = ["value-1", "value-2"] users = "example-users" }}