Skip to content
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

fix(mysql_user): Fix import error #486

Merged
merged 1 commit into from
Jan 3, 2025
Merged

fix(mysql_user): Fix import error #486

merged 1 commit into from
Jan 3, 2025

Conversation

youngmn
Copy link
Collaborator

@youngmn youngmn commented Nov 26, 2024

Related

#476

Description

  • FIX import and minor errors
  • Modify DOC

Comment on lines +83 to +88
* In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import MySQL User using the `id`:`name`:`name`:... . For example:

```terraform
import {
to = ncloud_mysql_users.rsc_name
id = "12345"
id = "12345:name1:name2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about changing it not to specify names using mysql_users resource?
For instance, mysql_users resource only accepts the instance id and then imports all of users.
And if some users want to import a single user or part of users, then they should use mysql_user resource instead of mysql_users (although it does not exist at this moment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When creating a mysql resource, mysql_user is always created as well. Because of this, we are required to specify a name to be managed by the resource.

Copy link
Collaborator

@wonchulee wonchulee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@youngmn youngmn merged commit ffe66fc into main Jan 3, 2025
4 checks passed
@youngmn youngmn deleted the fix/mysql_user_import branch January 3, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants