Skip to main content

Initializer

import { PgBackendConfig } from 'cdktn'

const pgBackendConfig: PgBackendConfig = { ... }

Properties

NameTypeDescription
connStrstringPostgres connection string;
schemaNamestringName of the automatically-managed Postgres schema, default to terraform_remote_state.
skipIndexCreationbooleanIf set to true, the Postgres index must already exist.
skipSchemaCreationbooleanIf set to true, the Postgres schema must already exist.
skipTableCreationbooleanIf set to true, the Postgres table must already exist.

connStrRequired

public readonly connStr: string;
  • Type: string
Postgres connection string; a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.

schemaNameOptional

public readonly schemaName: string;
  • Type: string
Name of the automatically-managed Postgres schema, default to terraform_remote_state. Can also be set using the PG_SCHEMA_NAME environment variable.

skipIndexCreationOptional

public readonly skipIndexCreation: boolean;
  • Type: boolean
If set to true, the Postgres index must already exist. Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won’t try to create the index, this is useful when it has already been created by a database administrator.

skipSchemaCreationOptional

public readonly skipSchemaCreation: boolean;
  • Type: boolean
If set to true, the Postgres schema must already exist. Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won’t try to create the schema, this is useful when it has already been created by a database administrator.

skipTableCreationOptional

public readonly skipTableCreation: boolean;
  • Type: boolean
If set to true, the Postgres table must already exist. Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won’t try to create the table, this is useful when it has already been created by a database administrator.