@@ -91,6 +91,7 @@ resource "postgresql_role" "update_role" {
9191 roles = ["${postgresql_role.group_role.name}"]
9292 search_path = ["mysearchpath"]
9393 statement_timeout = 30000
94+ log_statement = "all"
9495}
9596`
9697 resource .Test (t , resource.TestCase {
@@ -113,6 +114,7 @@ resource "postgresql_role" "update_role" {
113114 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "roles.#" , "0" ),
114115 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "0" ),
115116 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "0" ),
117+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "none" ),
116118 testAccCheckRoleCanLogin (t , "update_role" , "toto" ),
117119 ),
118120 },
@@ -135,6 +137,7 @@ resource "postgresql_role" "update_role" {
135137 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "1" ),
136138 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.0" , "mysearchpath" ),
137139 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "30000" ),
140+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "all" ),
138141 testAccCheckRoleCanLogin (t , "update_role2" , "titi" ),
139142 ),
140143 },
@@ -151,6 +154,7 @@ resource "postgresql_role" "update_role" {
151154 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "roles.#" , "0" ),
152155 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "search_path.#" , "0" ),
153156 resource .TestCheckResourceAttr ("postgresql_role.update_role" , "statement_timeout" , "0" ),
157+ resource .TestCheckResourceAttr ("postgresql_role.update_role" , "log_statement" , "none" ),
154158 testAccCheckRoleCanLogin (t , "update_role" , "toto" ),
155159 ),
156160 },
0 commit comments