This message was deleted.
# aws
s
This message was deleted.
l
You can use the MSSQL provider to do all this: https://www.pulumi.com/registry/packages/mssql/ This is good for code-as-documentation and explicitly saying what the DB will contain.
🙌 1
If you're looking to set up an initial database that will always be the same, and doing it frequently enough that speed is a concern, then I recommend setting up the "template" database manually, backing it up, storing the backup in S3, and configuring RDS to build from that backup.
Restoring a single small backup is, in my experience, much faster than setting up all the DB entities individually.
k
Thank you @little-cartoon-10569 for your help. I looked into this. As mentioned here below code can create an MSSQL server in Azure. However, I couldn't able to find an equivalent code to create an MSSQL server in Azure. I wonder whether this package supports only Azure. Not for AWS 🤔
Copy code
var 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.
Copy code
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
l
The Azure package is not relevant for RDS. To work with MSSQL in RDS, use the non-Azure package (mssql.Provider, etc.). Once you've provided the hostname that RDS gives you, the rest should just work.
🙌 1