diff --git a/digitalocean/database/datasource_database_user.go b/digitalocean/database/datasource_database_user.go index e9a4fc015..3c27e6e8b 100644 --- a/digitalocean/database/datasource_database_user.go +++ b/digitalocean/database/datasource_database_user.go @@ -56,6 +56,11 @@ func DataSourceDigitalOceanDatabaseUser() *schema.Resource { Optional: true, Elem: userACLSchema(), }, + "opensearch_acl": { + Type: schema.TypeList, + Optional: true, + Elem: userOpenSearchACLSchema(), + }, }, }, }, diff --git a/digitalocean/database/datasource_database_user_test.go b/digitalocean/database/datasource_database_user_test.go index 81349592c..1f4361630 100644 --- a/digitalocean/database/datasource_database_user_test.go +++ b/digitalocean/database/datasource_database_user_test.go @@ -53,6 +53,11 @@ func TestAccDataSourceDigitalOceanDatabaseUser_Basic(t *testing.T) { "digitalocean_database_user.foobar_user", "access_cert"), resource.TestCheckNoResourceAttr( "digitalocean_database_user.foobar_user", "access_key"), + + resource.TestCheckResourceAttr( + "data.digitalocean_database_user.doadmin", "name", "doadmin"), + resource.TestCheckResourceAttr( + "data.digitalocean_database_user.doadmin", "role", "primary"), ), }, }, @@ -60,6 +65,11 @@ func TestAccDataSourceDigitalOceanDatabaseUser_Basic(t *testing.T) { } const testAccCheckDigitalOceanDatasourceDatabaseUserConfigBasic = ` +data "digitalocean_database_user" "doadmin" { + cluster_id = digitalocean_database_cluster.foobar.id + name = "doadmin" +} + data "digitalocean_database_user" "foobar_user" { cluster_id = digitalocean_database_cluster.foobar.id name = "%s"