-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add connection_type: PostgreSQL (#45)
* fix connection.md * add postgresql.tf * fix connection.go * fix connection_resource.go * fix connection.md * fix connection.go * fix error * remove recent change * remove recent change * connection.md * fix connection.go * fix * fix * fix enum value * fix * add connection.md.tmpl * fix validation * fix connection.md --------- Co-authored-by: kkatamot <kosuke.katamoto@primenumber.co.jp>
- Loading branch information
1 parent
834d68b
commit ec54988
Showing
5 changed files
with
199 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
resource "trocco_connection" "postgresql" { | ||
connection_type = "postgresql" | ||
name = "PostgreSQL Example" | ||
description = "This is a PostgreSQL connection example" | ||
host = "db.example.com" | ||
port = 5432 | ||
user_name = "root" | ||
password = "password" | ||
ssl_mode = "require" | ||
driver = "postgresql_42_5_1" | ||
ssl = { | ||
ca = <<-SSL_CA | ||
-----BEGIN PRIVATE KEY----- | ||
...SSL CA... | ||
-----END PRIVATE KEY----- | ||
SSL_CA | ||
cert = <<-SSL_CERT | ||
-----BEGIN CERTIFICATE----- | ||
...SSL CRT... | ||
-----END CERTIFICATE----- | ||
SSL_CERT | ||
key = <<-SSL_KEY | ||
-----BEGIN PRIVATE KEY----- | ||
...SSL KEY... | ||
-----END PRIVATE KEY----- | ||
SSL_KEY | ||
} | ||
gateway = { | ||
host = "gateway.example.com" | ||
port = 1234 | ||
user_name = "gateway-joe" | ||
password = "gateway-joepass" | ||
key = <<-GATEWAY_KEY | ||
-----BEGIN PRIVATE KEY----- | ||
... GATEWAY KEY... | ||
-----END PRIVATE KEY----- | ||
GATEWAY_KEY | ||
key_passphrase = "sample_passphrase" | ||
} | ||
resource_group_id = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.