Global InfraGlobal Infra Cloud
DbaaS Postgres

Database Hba Entry

Terraform reference for Database Hba Entry.

Schema Properties

PropertyTypeDescription
auth_method
RequiredDefault
stringThe 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
stringThe authentication option based on provided method for this HBA entry.
connection_type
Default
stringThe 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
stringAsset 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
stringDeprecated in favor of rule_name; echoes the rule_name value. Kept for backward compatibility during the transition.
rule_name
RequiredForceNew
stringImmutable 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
stringComma-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"  }}

Usage Notes