File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,7 @@ resource "postgresql_database" "this" {
15
15
name = var. database
16
16
owner = postgresql_role. owner . name
17
17
18
- # CREATE DATABASE uses template1 by default, but the Terraform provider uses template0.
19
- # In RDS, the owner of the schema 'public' is 'postgres' in template1, so we can manage owner of tables
20
- # but 'rdsadmin' in template0 so we don't have all the permissions.
21
- template = " template1"
18
+ template = var. template
22
19
23
20
lc_collate = var. lc_collate
24
21
lc_ctype = coalesce (var. lc_ctype , var. lc_collate )
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ variable "database" {
2
2
description = " The name of the database"
3
3
}
4
4
5
+ variable "template" {
6
+ # CREATE DATABASE uses template1 by default, but the Terraform provider uses template0.
7
+ # In RDS, the owner of the schema 'public' is 'postgres' in template1, so we can manage owner of tables
8
+ # but 'rdsadmin' in template0 so we don't have all the permissions.
9
+ default = " template1"
10
+ }
11
+
5
12
variable "schemas" {
6
13
description = " The schemas to create"
7
14
default = [" public" ]
You can’t perform that action at this time.
0 commit comments