-
Notifications
You must be signed in to change notification settings - Fork 178
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
Database user scopes #307
Database user scopes #307
Conversation
Looks good , so your change consists in
question @coderGo93 , the client library, update was intented? just curious :) |
@leofigy That's correct, the client library needed an update because the variable Scope didn't exist, so I updated and now it appears and can be used. |
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.
Just a few minor docs improvements and a question. Thanks!!
scopes { | ||
name = "My cluster name" | ||
type = "CLUSTER" | ||
} |
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.
Can we include more than one scope in one of the examples? I think that will be common and I know a few users were confused on how to do more than one label.
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.
sure, not problem, thank you
@@ -105,6 +105,25 @@ func resourceMongoDBAtlasDatabaseUser() *schema.Resource { | |||
}, | |||
}, | |||
}, | |||
"scopes": { | |||
Type: schema.TypeList, |
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.
Just a question for my own curiosity, but labels is the same format in the API so why is that a TypeSet and this a TypeList? I don't see why ordered vs unordered would be different?
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.
You're right, I'll change it, is better same like labels with TypeSet, thank you so much
@@ -74,6 +84,9 @@ Accepted values include: | |||
* `roles` - (Required) List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See [Roles](#roles) below for more details. | |||
* `username` - (Required) Username for authenticating to MongoDB. | |||
* `password` - (Required) User's initial password. A value is required to create the database user, however the argument but may be removed from your Terraform configuration after user creation without impacting the user, password or Terraform management. IMPORTANT --- Passwords may show up in Terraform related logs and it will be stored in the Terraform state file as plain-text. Password can be changed after creation using your preferred method, e.g. via the MongoDB Atlas UI, to ensure security. If you do change management of the password to outside of Terraform be sure to remove the argument from the Terraform configuration so it is not inadvertently updated to the original password. | |||
* `scopes` - (Optional) Array of clusters and Atlas Data Lakes that this user has access to. If omitted, Atlas grants the user access to all the clusters and Atlas Data Lakes in the project by default. |
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.
I'd also break this out more like labels in that it can be more than one name/type (e.g. you could have two clusters and a data lake to one 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.
Sure not problem
8ebd846
to
2bb5ea9
Compare
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.
LGTM, thank you!! just get a DoU review as well please.
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.
hey LGTM
2bb5ea9
to
f9a7167
Compare
Description
Added a parameter called
scopes
for database user and its testaccLink to any related issue(s):
Type of change:
Required Checklist:
Further comments