terraform-provider-postgresreplication

command module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

PostgreSQL logical replication Terraform provider

Build Status

A Terraform provider for managing PostgreSQL logical replication slots.

Summary

Manages the lifecycle of logical replication slots. It is useful to manage the lifecycle of replication slots outside of the service that is consuming them. If the service is shut down you probably want the slot to stay alive so you can resume streaming when the service is started up again, it is only if a service is decommissioned that you want the slot to be removed. By defining the slot independently from the service lifecycle you can clean up the slot when the application is no longer needed.

Installation

Download the relevant binary from releases and copy it to $HOME/.terraform.d/plugins/.

Configuration

Provider configuration:

provider postgresreplication {
  host     = "localhost"
  post     = 5432
  user     = "superuser"
  password = "superpassword"
}

The following provider block variables are available for configuration:

  • host - The server host to connect to.
  • port - The server port to connect to.
  • user - The user to use to connect.
  • password - The password to use to connect.

Resources

postgresreplication_slot
resource "postgresreplication_slot" "test_slot" {
    slot_name 	   = "test_slot"
    output_plugin  = "wal2json"
    database       = "my_db"
}

The above would result in a replication created named "test_slot" for the "my_db" database.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL