-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MongoDB and Redis user provider #283
Add MongoDB and Redis user provider #283
Conversation
lpatte
commented
Aug 9, 2022
•
edited
Loading
edited
- MongoDB User Lifecycle
- Redis User Lifecycle
- Import Test for Cloud Databases resources
- Fix Database User Resource Import
- Add ForceNew in Database Resource
- add Retry in IP restriction to work with MongoDB
- Use ValidateFunc for Database User engine input instead custom validation process
2901e92
to
f6e7408
Compare
@ovh/cloud-databases please review |
f6e7408
to
41d60e8
Compare
a7f5cfb
to
715fd77
Compare
715fd77
to
87b45cf
Compare
review in progress one modification to do in the doc please:
:) |
Get information about a user of a mongodb cluster associated with a public cloud project. | ||
--- | ||
|
||
# cloud_project_database_mongodb_user (Data Source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cloud_project_database_mongodb_user (Data Source) | |
# ovh_cloud_project_database_mongodb_user (Data Source) |
Get information about a user of a redis cluster associated with a public cloud project. | ||
--- | ||
|
||
# cloud_project_database_redis_user (Data Source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cloud_project_database_redis_user (Data Source) | |
# ovh_cloud_project_database_redis_user (Data Source) |
Creates an user for a mongodb cluster associated with a public cloud project. | ||
--- | ||
|
||
# cloud_project_database_mongodb_user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cloud_project_database_mongodb_user | |
# ovh_cloud_project_database_mongodb_user |
Creates an user for a redis cluster associated with a public cloud project. | ||
--- | ||
|
||
# cloud_project_database_redis_user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cloud_project_database_redis_user | |
# ovh_cloud_project_database_redis_user |
data "ovh_cloud_project_database_mongodb_user" "mongouser" { | ||
service_name = "XXX" | ||
cluster_id = "YYY" | ||
username = "ZZZ" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
username = "ZZZ" | |
name = "ZZZ@admin" |
* `name` - See Argument Reference above. | ||
* `password` - Password of the user. | ||
* `roles` - See Argument Reference above. | ||
* `roles_auth_db` - Roles the user belongs to with the authentication database in the format role@authDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not exists anymore?
The following attributes are exported: | ||
|
||
* `categories` - Categories of the user. | ||
* `channels` - Channels of the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `channels` - Channels of the user. | |
* `channels` - Channels of the user. | |
* `cluster_id` - ID of the cluster. |
|
||
func TestAccCloudProjectDatabaseMongodbUserDataSource_basic(t *testing.T) { | ||
serviceName := os.Getenv("OVH_CLOUD_PROJECT_SERVICE_TEST") | ||
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") | |
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_MONGODB_VERSION_TEST") |
|
||
func TestAccCloudProjectDatabaseRedisUserDataSource_basic(t *testing.T) { | ||
serviceName := os.Getenv("OVH_CLOUD_PROJECT_SERVICE_TEST") | ||
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") | |
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_REDIS_VERSION_TEST") |
|
||
func TestAccCloudProjectDatabaseRedisUser_importBasic(t *testing.T) { | ||
serviceName := os.Getenv("OVH_CLOUD_PROJECT_SERVICE_TEST") | ||
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST") | |
version := os.Getenv("OVH_CLOUD_PROJECT_DATABASE_REDIS_VERSION_TEST") |
87b45cf
to
5ae3e4c
Compare
Thanks, it's OK for me :) |