Server Args
An Azure SQL Database server. API Version: 2020-11-01-preview.
Example Usage
Create server
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var server = new AzureNative.Sql.Server("server", new()
{
AdministratorLogin = "dummylogin",
AdministratorLoginPassword = "PLACEHOLDER",
Administrators = new AzureNative.Sql.Inputs.ServerExternalAdministratorArgs
{
AzureADOnlyAuthentication = true,
Login = "bob@contoso.com",
PrincipalType = "User",
Sid = "00000011-1111-2222-2222-123456789111",
TenantId = "00000011-1111-2222-2222-123456789111",
},
Location = "Japan East",
ResourceGroupName = "sqlcrudtest-7398",
ServerName = "sqlcrudtest-4645",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewServer(ctx, "server", &sql.ServerArgs{
AdministratorLogin: pulumi.String("dummylogin"),
AdministratorLoginPassword: pulumi.String("PLACEHOLDER"),
Administrators: &sql.ServerExternalAdministratorArgs{
AzureADOnlyAuthentication: pulumi.Bool(true),
Login: pulumi.String("bob@contoso.com"),
PrincipalType: pulumi.String("User"),
Sid: pulumi.String("00000011-1111-2222-2222-123456789111"),
TenantId: pulumi.String("00000011-1111-2222-2222-123456789111"),
},
Location: pulumi.String("Japan East"),
ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
ServerName: pulumi.String("sqlcrudtest-4645"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.Server;
import com.pulumi.azurenative.sql.ServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var server = new Server("server", ServerArgs.builder()
.administratorLogin("dummylogin")
.administratorLoginPassword("PLACEHOLDER")
.administrators(Map.ofEntries(
Map.entry("azureADOnlyAuthentication", true),
Map.entry("login", "bob@contoso.com"),
Map.entry("principalType", "User"),
Map.entry("sid", "00000011-1111-2222-2222-123456789111"),
Map.entry("tenantId", "00000011-1111-2222-2222-123456789111")
))
.location("Japan East")
.resourceGroupName("sqlcrudtest-7398")
.serverName("sqlcrudtest-4645")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:Server sqlcrudtest-4645 /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645
Constructors
Properties
Administrator username for the server. Once created it cannot be changed.
The administrator login password (required for server creation).
The Azure Active Directory identity of the server.
The Azure Active Directory identity of the server.
Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'
The resource id of a user assigned identity to be used by default.
Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
The name of the server.