Skip to content

Seed relational-databse for development or testing.

License

Notifications You must be signed in to change notification settings

walrus-catalog/terraform-generic-sql-seeder

Repository files navigation

Generic SQL Seeder

Terraform module which seeds Relational Database for Development or Testing, like MySQL, PostgreSQL, MariaDB, etc., powered by Seal/Byteset.

Usage

module "sql-seeder" {
  source = "..."

  src  = "https://raw.githubusercontent.com/seal-io/terraform-provider-byteset/main/byteset/testdata/mysql-lg.sql"
  dest = "mysql://username:password@tcp(ip:port)/"
}

Examples

Contributing

Please read our contributing guide if you're interested in contributing to Walrus template.

Requirements

Name Version
terraform >= 1.0
byteset >= 0.2.3

Providers

Name Version
byteset >= 0.2.3

Modules

No modules.

Resources

Name Type
byteset_pipeline.seeding resource

Inputs

Name Description Type Default Required
context Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.

Examples:
context:
project:
name: string
id: string
environment:
name: string
id: string
resource:
name: string
id: string
map(any) {} no
dest Specify the seeding destiantion address, which is a database connection string.

Example:
mysql://[username:[password]@]tcp([address][:port])[/dbname][?param1=value1&...]
maria
mariadb://[username:[password]@]tcp([address][:port])[/dbname][?param1=value1&...]
postgres
postgresql://[username:[password]@][address][:port][/dbname][?param1=value1&...]
oracle://[username:[password]@][address][:port][/service][?param1=value1&...]
mssql
sqlserver://[username:[password]@][address][:port][/instance][?database=dbname&param1=value1&...]
execution_batch_capacity Specify the batch capacity value during executing. number 500 no
execution_maximum_connection Specify the maximum connection value during executing. number 5 no
salt Specify the salt for triggering a new seeding. string null no
src Specify the seeding source address started with 'file://' or 'http(s)://' schema.

Example:
https://raw.githubusercontent.com/seal-io/terraform-provider-byteset/main/byteset/testdata/mysql.sql
string n/a yes

Outputs

Name Description
context The input context, a map, which is used for orchestration.
id The execution ID of the byteset pipeline.
refer The refer, a map, which is used for dependencies or collaborations.
timecost The execution timecost of the byteset pipeline.

License

Copyright (c) 2023 Seal, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.