fast-easter-23401
01/26/2022, 7:14 PMcloud_sql_proxy
that handles TLS. My provider point to localhost:3307 where cloud_sql_proxy is listening.
new mysql.Grant(
'applications',
{
user: 'applications',
host: '%',
database: 'applications',
privileges: ['ALL'],
},
{
provider: new mysql.Provider(`import-applications-grant`, {
username: 'root',
endpoint: '127.0.0.1:3307',
password: config.requireSecret('MY_SQL_APPLICATIONS_SECRET'),
}),
import: 'applications@%:applications',
protect: true,
}
);
But then I get the following error:
Diagnostics:
pulumi:pulumi:Stack (env-staging):
error: preview failed
mysql:index:Grant (applications@%:applications):
error: Preview failed: refreshing urn:pulumi:staging::env::mysql:index/grant:Grant::applications@%:applications: user with host or a role is required
Any ideas?little-cartoon-10569
01/26/2022, 7:45 PMHowever, quotation marks are necessary to specify a user_name string containing special characters (such as -), or a host_name string containing special characters or wildcard characters such as % (for example, 'test-user'@'%.com'). Quote the user name and host name separately.
host: "'%'"
fast-easter-23401
01/26/2022, 10:02 PM