terraform-provider-sql

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 2 Imported by: 0

README

terraform-provider-sql

Terraform provider for managing SQL schemas using migrations.

This plugin uses rubenv/sql-migrate, it is recommended to go read how it works before using this provider.

Usage

Installation

Build the provider and put it in Terraform's third-party providers directory in ~/.terraform.d/plugins:

go get github.com/odedniv/terraform-provider-sql
mkdir -p ~/.terraform.d/plugins
go build -o ~/.terraform.d/plugins/terraform-provider-sql github.com/odedniv/terraform-provider-sql

I recommend using Go modules to ensure using the same version in development and production.

Configuration

In your Terraform configuration:

resource "sql_schema" "this" {
  driver     = "<database driver>" # mysql/postgres/cloudsql/cloudsqlpostgres
  datasource = "<database connection string>"
  directory  = "migrations" # optional
  table      = "schema_migrations" # optional
}

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