1. Packages
  2. Azure Native
  3. API Docs
  4. azuredata
  5. SqlServer
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.azuredata.SqlServer

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

A SQL server.

Uses Azure REST API version 2019-07-24-preview. In version 2.x of the Azure Native provider, it used API version 2019-07-24-preview.

Example Usage

Creates or updates a SQL Server in a Registration group.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var sqlServer = new AzureNative.AzureData.SqlServer("sqlServer", new()
    {
        Cores = 8,
        Edition = "Latin",
        PropertyBag = "",
        RegistrationID = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
        ResourceGroupName = "testrg",
        SqlServerName = "testsqlserver",
        SqlServerRegistrationName = "testsqlregistration",
        Version = "2008",
    });

});
Copy
package main

import (
	azuredata "github.com/pulumi/pulumi-azure-native-sdk/azuredata/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := azuredata.NewSqlServer(ctx, "sqlServer", &azuredata.SqlServerArgs{
			Cores:                     pulumi.Int(8),
			Edition:                   pulumi.String("Latin"),
			PropertyBag:               pulumi.String(""),
			RegistrationID:            pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration"),
			ResourceGroupName:         pulumi.String("testrg"),
			SqlServerName:             pulumi.String("testsqlserver"),
			SqlServerRegistrationName: pulumi.String("testsqlregistration"),
			Version:                   pulumi.String("2008"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.azuredata.SqlServer;
import com.pulumi.azurenative.azuredata.SqlServerArgs;
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 sqlServer = new SqlServer("sqlServer", SqlServerArgs.builder()
            .cores(8)
            .edition("Latin")
            .propertyBag("")
            .registrationID("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration")
            .resourceGroupName("testrg")
            .sqlServerName("testsqlserver")
            .sqlServerRegistrationName("testsqlregistration")
            .version("2008")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const sqlServer = new azure_native.azuredata.SqlServer("sqlServer", {
    cores: 8,
    edition: "Latin",
    propertyBag: "",
    registrationID: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
    resourceGroupName: "testrg",
    sqlServerName: "testsqlserver",
    sqlServerRegistrationName: "testsqlregistration",
    version: "2008",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

sql_server = azure_native.azuredata.SqlServer("sqlServer",
    cores=8,
    edition="Latin",
    property_bag="",
    registration_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration",
    resource_group_name="testrg",
    sql_server_name="testsqlserver",
    sql_server_registration_name="testsqlregistration",
    version="2008")
Copy
resources:
  sqlServer:
    type: azure-native:azuredata:SqlServer
    properties:
      cores: 8
      edition: Latin
      propertyBag: ""
      registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
      resourceGroupName: testrg
      sqlServerName: testsqlserver
      sqlServerRegistrationName: testsqlregistration
      version: '2008'
Copy

Create SqlServer Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SqlServer(name: string, args: SqlServerArgs, opts?: CustomResourceOptions);
@overload
def SqlServer(resource_name: str,
              args: SqlServerArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def SqlServer(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              resource_group_name: Optional[str] = None,
              sql_server_registration_name: Optional[str] = None,
              cores: Optional[int] = None,
              edition: Optional[str] = None,
              property_bag: Optional[str] = None,
              registration_id: Optional[str] = None,
              sql_server_name: Optional[str] = None,
              version: Optional[str] = None)
func NewSqlServer(ctx *Context, name string, args SqlServerArgs, opts ...ResourceOption) (*SqlServer, error)
public SqlServer(string name, SqlServerArgs args, CustomResourceOptions? opts = null)
public SqlServer(String name, SqlServerArgs args)
public SqlServer(String name, SqlServerArgs args, CustomResourceOptions options)
type: azure-native:azuredata:SqlServer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SqlServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SqlServerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SqlServerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SqlServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SqlServerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var sqlServerResource = new AzureNative.AzureData.SqlServer("sqlServerResource", new()
{
    ResourceGroupName = "string",
    SqlServerRegistrationName = "string",
    Cores = 0,
    Edition = "string",
    PropertyBag = "string",
    RegistrationID = "string",
    SqlServerName = "string",
    Version = "string",
});
Copy
example, err := azuredata.NewSqlServer(ctx, "sqlServerResource", &azuredata.SqlServerArgs{
	ResourceGroupName:         pulumi.String("string"),
	SqlServerRegistrationName: pulumi.String("string"),
	Cores:                     pulumi.Int(0),
	Edition:                   pulumi.String("string"),
	PropertyBag:               pulumi.String("string"),
	RegistrationID:            pulumi.String("string"),
	SqlServerName:             pulumi.String("string"),
	Version:                   pulumi.String("string"),
})
Copy
var sqlServerResource = new SqlServer("sqlServerResource", SqlServerArgs.builder()
    .resourceGroupName("string")
    .sqlServerRegistrationName("string")
    .cores(0)
    .edition("string")
    .propertyBag("string")
    .registrationID("string")
    .sqlServerName("string")
    .version("string")
    .build());
Copy
sql_server_resource = azure_native.azuredata.SqlServer("sqlServerResource",
    resource_group_name="string",
    sql_server_registration_name="string",
    cores=0,
    edition="string",
    property_bag="string",
    registration_id="string",
    sql_server_name="string",
    version="string")
Copy
const sqlServerResource = new azure_native.azuredata.SqlServer("sqlServerResource", {
    resourceGroupName: "string",
    sqlServerRegistrationName: "string",
    cores: 0,
    edition: "string",
    propertyBag: "string",
    registrationID: "string",
    sqlServerName: "string",
    version: "string",
});
Copy
type: azure-native:azuredata:SqlServer
properties:
    cores: 0
    edition: string
    propertyBag: string
    registrationID: string
    resourceGroupName: string
    sqlServerName: string
    sqlServerRegistrationName: string
    version: string
Copy

SqlServer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SqlServer resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
SqlServerRegistrationName
This property is required.
Changes to this property will trigger replacement.
string
Name of the SQL Server registration.
Cores int
Cores of the Sql Server.
Edition string
Sql Server Edition.
PropertyBag string
Sql Server Json Property Bag.
RegistrationID string
ID for Parent Sql Server Registration.
SqlServerName Changes to this property will trigger replacement. string
Name of the SQL Server.
Version string
Version of the Sql Server.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
SqlServerRegistrationName
This property is required.
Changes to this property will trigger replacement.
string
Name of the SQL Server registration.
Cores int
Cores of the Sql Server.
Edition string
Sql Server Edition.
PropertyBag string
Sql Server Json Property Bag.
RegistrationID string
ID for Parent Sql Server Registration.
SqlServerName Changes to this property will trigger replacement. string
Name of the SQL Server.
Version string
Version of the Sql Server.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
sqlServerRegistrationName
This property is required.
Changes to this property will trigger replacement.
String
Name of the SQL Server registration.
cores Integer
Cores of the Sql Server.
edition String
Sql Server Edition.
propertyBag String
Sql Server Json Property Bag.
registrationID String
ID for Parent Sql Server Registration.
sqlServerName Changes to this property will trigger replacement. String
Name of the SQL Server.
version String
Version of the Sql Server.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
sqlServerRegistrationName
This property is required.
Changes to this property will trigger replacement.
string
Name of the SQL Server registration.
cores number
Cores of the Sql Server.
edition string
Sql Server Edition.
propertyBag string
Sql Server Json Property Bag.
registrationID string
ID for Parent Sql Server Registration.
sqlServerName Changes to this property will trigger replacement. string
Name of the SQL Server.
version string
Version of the Sql Server.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
sql_server_registration_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the SQL Server registration.
cores int
Cores of the Sql Server.
edition str
Sql Server Edition.
property_bag str
Sql Server Json Property Bag.
registration_id str
ID for Parent Sql Server Registration.
sql_server_name Changes to this property will trigger replacement. str
Name of the SQL Server.
version str
Version of the Sql Server.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
sqlServerRegistrationName
This property is required.
Changes to this property will trigger replacement.
String
Name of the SQL Server registration.
cores Number
Cores of the Sql Server.
edition String
Sql Server Edition.
propertyBag String
Sql Server Json Property Bag.
registrationID String
ID for Parent Sql Server Registration.
sqlServerName Changes to this property will trigger replacement. String
Name of the SQL Server.
version String
Version of the Sql Server.

Outputs

All input properties are implicitly available as output properties. Additionally, the SqlServer resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
type str
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:azuredata:SqlServer testsqlserver /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi