From 0e3ac4a8a59779be2c01eb4f93ff3455c43cc4bd Mon Sep 17 00:00:00 2001 From: Piet van der Meulen Date: Thu, 24 Jul 2025 10:33:17 +0200 Subject: [PATCH 1/3] mongodb-flex: add readWriteAnyDatabase role --- internal/cmd/mongodbflex/user/create/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/mongodbflex/user/create/create.go b/internal/cmd/mongodbflex/user/create/create.go index 924f91896..2ddf76d34 100644 --- a/internal/cmd/mongodbflex/user/create/create.go +++ b/internal/cmd/mongodbflex/user/create/create.go @@ -103,7 +103,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command { } func configureFlags(cmd *cobra.Command) { - roleOptions := []string{"read", "readWrite"} + roleOptions := []string{"read", "readWrite", "readWriteAnyDatabase"} cmd.Flags().Var(flags.UUIDFlag(), instanceIdFlag, "ID of the instance") cmd.Flags().String(usernameFlag, "", "Username of the user. If not specified, a random username will be assigned") From 2cb975af65f0d919420cfab14c6fd616c10354be Mon Sep 17 00:00:00 2001 From: Piet van der Meulen Date: Thu, 24 Jul 2025 16:27:09 +0200 Subject: [PATCH 2/3] update --- internal/cmd/mongodbflex/user/update/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/mongodbflex/user/update/update.go b/internal/cmd/mongodbflex/user/update/update.go index 4742a8e82..5f192f377 100644 --- a/internal/cmd/mongodbflex/user/update/update.go +++ b/internal/cmd/mongodbflex/user/update/update.go @@ -97,7 +97,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command { } func configureFlags(cmd *cobra.Command) { - roleOptions := []string{"read", "readWrite"} + roleOptions := []string{"read", "readWrite", "readWriteAnyDatabase"} cmd.Flags().Var(flags.UUIDFlag(), instanceIdFlag, "ID of the instance") cmd.Flags().String(databaseFlag, "", "The database inside the MongoDB instance that the user has access to. If it does not exist, it will be created once the user writes to it") From d3265839e83ef2ccb2650effb1141f24dc294e13 Mon Sep 17 00:00:00 2001 From: Piet van der Meulen Date: Thu, 24 Jul 2025 17:43:46 +0200 Subject: [PATCH 3/3] update --- docs/stackit_mongodbflex_user_create.md | 2 +- docs/stackit_mongodbflex_user_update.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stackit_mongodbflex_user_create.md b/docs/stackit_mongodbflex_user_create.md index 8c42b3bb2..99075fee8 100644 --- a/docs/stackit_mongodbflex_user_create.md +++ b/docs/stackit_mongodbflex_user_create.md @@ -29,7 +29,7 @@ stackit mongodbflex user create [flags] --database string The database inside the MongoDB instance that the user has access to. If it does not exist, it will be created once the user writes to it -h, --help Help for "stackit mongodbflex user create" --instance-id string ID of the instance - --role strings Roles of the user, possible values are ["read" "readWrite"] (default [read]) + --role strings Roles of the user, possible values are ["read" "readWrite" "readWriteAnyDatabase"] (default [read]) --username string Username of the user. If not specified, a random username will be assigned ``` diff --git a/docs/stackit_mongodbflex_user_update.md b/docs/stackit_mongodbflex_user_update.md index bcbdfa54f..31a674972 100644 --- a/docs/stackit_mongodbflex_user_update.md +++ b/docs/stackit_mongodbflex_user_update.md @@ -23,7 +23,7 @@ stackit mongodbflex user update USER_ID [flags] --database string The database inside the MongoDB instance that the user has access to. If it does not exist, it will be created once the user writes to it -h, --help Help for "stackit mongodbflex user update" --instance-id string ID of the instance - --role strings Roles of the user, possible values are ["read" "readWrite"] (default []) + --role strings Roles of the user, possible values are ["read" "readWrite" "readWriteAnyDatabase"] (default []) ``` ### Options inherited from parent commands