Skip to content

Commit

Permalink
fix: add opensearch_acl to data.digitalocean_database_user schema
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Dec 17, 2024
1 parent f27a112 commit 017411b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions digitalocean/database/datasource_database_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func DataSourceDigitalOceanDatabaseUser() *schema.Resource {
Optional: true,
Elem: userACLSchema(),
},
"opensearch_acl": {
Type: schema.TypeList,
Optional: true,
Elem: userOpenSearchACLSchema(),
},
},
},
},
Expand Down
10 changes: 10 additions & 0 deletions digitalocean/database/datasource_database_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,23 @@ 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"),
),
},
},
})
}

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"
Expand Down

0 comments on commit 017411b

Please sign in to comment.