petoju / terraform-provider-mysql

Terraform MySQL provider – unofficial fork
https://registry.terraform.io/providers/petoju/mysql
Mozilla Public License 2.0
63 stars 40 forks source link

Support for adding a comment to mysql_user #106

Open stigok opened 5 months ago

stigok commented 5 months ago

Hello! This is a feature request for adding COMMENT to the MySQL CREATE USER statements through the mysql_user resource.

The signature for the CREATE USER statement in MySQL 8.0:

CREATE USER [IF NOT EXISTS]
    user [auth_option] [, user [auth_option]] ...
    DEFAULT ROLE role [, role ] ...
    [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]
    [WITH resource_option [resource_option] ...]
    [password_option | lock_option] ...
    [COMMENT 'comment_string' | ATTRIBUTE 'json_object']

This appears to only be supported since MySQL 8.0.21, and can probably be silently ignored when the provider is connected to an earlier version.