kind-motorcycle-43615
10/06/2023, 6:37 AMaws.rds.Instance
(aws classic package). Now I want to expose the Endpoint, the Port, the DBname
, the UserId
of a DB user, and the Password
of that DB user as [Output] variables. Endpoint and Port are accessible easily as output properties. No problem with those. However, I have several doubts to be clarified regarding the DBname
, UserId
, and Password
.
1. Here it is mentioned that the DBName
input property is not applied to the Microsoft SQL Server. So, is there any other way to create an initial database when the Microsoft SQL Server DB instance is created?
2. Suppose I want to create a DB user with read-only permissions. Is there a way to create such a DB user using Pulumi? Or Do I need to create a DB user using SQL commands by accessing the database manually?
3. Can SQL commands be executed on the created Microsoft SQL Server database using Pulumi?
Any help is highly appreciated.
TIAlittle-cartoon-10569
10/07/2023, 7:51 PMkind-motorcycle-43615
10/09/2023, 6:25 AMvar server = new Azure.MSSql.Server(
"server",
new()
{
Name = "pulumi-mssql-test",
ResourceGroupName = resourceGroup.Name,
Location = resourceGroup.Location,
Version = "12.0",
MinimumTlsVersion = "1.2",
AdministratorLogin = "sadmin",
AdministratorLoginPassword = "Str0ngPa$word12",
AzureadAdministrator = new Azure.MSSql.Inputs.ServerAzureadAdministratorArgs
{
LoginUsername = "pulumi-app",
ObjectId = current.ObjectId,
TenantId = current.TenantId,
},
}
);
Additionally, we can create an MSSQL server instance using Pulumi.Aws.Rds.Instance. But, when we try to run pulumi up
with that approach (Creating a Server using Pulumi.Aws.Rds.Instance and creating DB users using Pulumiverse.MSSQL package), it also shows the below error.
pulumi:providers:mssql (default_0_0_7_github_/api.github.com/pulumiverse/pulumi-mssql):
error: rpc error: code = Unknown desc = Missing SQL authentication config: One of authentication methods must be provided: sql_auth, azure_auth
little-cartoon-10569
10/09/2023, 7:23 PM