@@ -91,6 +91,7 @@ resource "postgresql_role" "update_role" {
91
91
roles = ["${postgresql_role.group_role.name}"]
92
92
search_path = ["mysearchpath"]
93
93
statement_timeout = 30000
94
+ log_statement = "all"
94
95
}
95
96
`
96
97
resource .Test (t , resource.TestCase {
@@ -113,6 +114,7 @@ resource "postgresql_role" "update_role" {
113
114
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "roles.#" , "0" ),
114
115
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "0" ),
115
116
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "0" ),
117
+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "none" ),
116
118
testAccCheckRoleCanLogin (t , "update_role" , "toto" ),
117
119
),
118
120
},
@@ -135,6 +137,7 @@ resource "postgresql_role" "update_role" {
135
137
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "1" ),
136
138
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.0" , "mysearchpath" ),
137
139
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "30000" ),
140
+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "all" ),
138
141
testAccCheckRoleCanLogin (t , "update_role2" , "titi" ),
139
142
),
140
143
},
@@ -151,6 +154,7 @@ resource "postgresql_role" "update_role" {
151
154
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "roles.#" , "0" ),
152
155
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "0" ),
153
156
resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "0" ),
157
+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "none" ),
154
158
testAccCheckRoleCanLogin (t , "update_role" , "toto" ),
155
159
),
156
160
},
0 commit comments