-
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
[Bug]: Can't import user database module when both username and auth database user contain hyphens #2876
Comments
Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:
The ticket CLOUDP-289266 was created for internal tracking. |
This issue has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! |
Got the same issue, and another one, when the database_name contains underscore. terraform-provider-mongodbatlas/internal/service/databaseuser/resource_database_user.go Line 349 in ebb67f8
Shouldn't the regex match the same constraints as those applied when creating the database name ? |
Same problem whether user or database name or both have hyphens. |
Same issue here with hyphens. Referring to the regex pattern in the following file: terraform-provider-mongodbatlas/internal/service/databaseuser/resource_database_user.go Line 349 in ebb67f8
To address this, consider allowing combinations of letters, |
Seeing this import of resources, it is still easier with two hyphens: |
This has been merged in #2928 |
Is there an existing issue for this?
Provider Version
8.0.1
Terraform Version
1.9.8
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
I can't import database user module when both username and auth database name contain hyphens, it does not know which one is which, the following will fail:
Terraform configuration to reproduce the issue
Steps To Reproduce
Run
terragrunt import 'module.mongodb.mongodbatlas_database_user.user' {project_id}-{username}-{auth_database_name}
Logs
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: