Module mssql

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

Resources

Data Sources

Others

Resources

Resource ElasticPool

class ElasticPool extends CustomResource

Allows you to manage an Azure SQL Elastic Pool via the 2017-10-01-preview API which allows for vCore and DTU based configurations.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "westeurope",
    name: "my-resource-group",
});
const testSqlServer = new azure.sql.SqlServer("test", {
    administratorLogin: "4dm1n157r470r",
    administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
    location: testResourceGroup.location,
    name: "my-sql-server",
    resourceGroupName: testResourceGroup.name,
    version: "12.0",
});
const testElasticPool = new azure.mssql.ElasticPool("test", {
    location: testResourceGroup.location,
    maxSizeGb: 756,
    name: "test-epool",
    perDatabaseSettings: {
        maxCapacity: 4,
        minCapacity: 0.25,
    },
    resourceGroupName: testResourceGroup.name,
    serverName: testSqlServer.name,
    sku: {
        capacity: 4,
        family: "Gen5",
        name: "GP_Gen5",
        tier: "GeneralPurpose",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/mssql_elasticpool.html.markdown.

constructor

new ElasticPool(name: string, args: ElasticPoolArgs, opts?: pulumi.CustomResourceOptions)

Create a ElasticPool resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ElasticPoolState, opts?: pulumi.CustomResourceOptions): ElasticPool

Get an existing ElasticPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of ElasticPool. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property elasticPoolProperties

public elasticPoolProperties: pulumi.Output<outputs.mssql.ElasticPoolElasticPoolProperties>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property location

public location: pulumi.Output<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property maxSizeBytes

public maxSizeBytes: pulumi.Output<number>;

The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.

property maxSizeGb

public maxSizeGb: pulumi.Output<number>;

The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.

property name

public name: pulumi.Output<string>;

Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

property perDatabaseSettings

public perDatabaseSettings: pulumi.Output<outputs.mssql.ElasticPoolPerDatabaseSettings>;

A perDatabaseSettings block as defined below.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

property serverName

public serverName: pulumi.Output<string>;

The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

property sku

public sku: pulumi.Output<outputs.mssql.ElasticPoolSku>;

A sku block as defined below.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zoneRedundant

public zoneRedundant: pulumi.Output<boolean | undefined>;

Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

Data Sources

Data Source getElasticPool

getElasticPool(args: GetElasticPoolArgs, opts?: pulumi.InvokeOptions): Promise<GetElasticPoolResult> & GetElasticPoolResult

Use this data source to access information about an existing SQL elastic pool.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.mssql.getElasticPool({
    name: "mssqlelasticpoolname",
    resourceGroupName: "example-resources",
    serverName: "example-sql-server",
});

export const elasticpoolId = example.id;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/mssql_elasticpool.html.markdown.

Others

interface ElasticPoolArgs

interface ElasticPoolArgs

The set of arguments for constructing a ElasticPool resource.

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property maxSizeBytes

maxSizeBytes?: pulumi.Input<number>;

The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.

property maxSizeGb

maxSizeGb?: pulumi.Input<number>;

The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.

property name

name?: pulumi.Input<string>;

Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

property perDatabaseSettings

perDatabaseSettings: pulumi.Input<inputs.mssql.ElasticPoolPerDatabaseSettings>;

A perDatabaseSettings block as defined below.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

property serverName

serverName: pulumi.Input<string>;

The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

property sku

sku: pulumi.Input<inputs.mssql.ElasticPoolSku>;

A sku block as defined below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property zoneRedundant

zoneRedundant?: pulumi.Input<boolean>;

Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

interface ElasticPoolState

interface ElasticPoolState

Input properties used for looking up and filtering ElasticPool resources.

property elasticPoolProperties

elasticPoolProperties?: pulumi.Input<inputs.mssql.ElasticPoolElasticPoolProperties>;

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property maxSizeBytes

maxSizeBytes?: pulumi.Input<number>;

The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.

property maxSizeGb

maxSizeGb?: pulumi.Input<number>;

The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.

property name

name?: pulumi.Input<string>;

Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern.

property perDatabaseSettings

perDatabaseSettings?: pulumi.Input<inputs.mssql.ElasticPoolPerDatabaseSettings>;

A perDatabaseSettings block as defined below.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

property serverName

serverName?: pulumi.Input<string>;

The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

property sku

sku?: pulumi.Input<inputs.mssql.ElasticPoolSku>;

A sku block as defined below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property zoneRedundant

zoneRedundant?: pulumi.Input<boolean>;

Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.

interface GetElasticPoolArgs

interface GetElasticPoolArgs

A collection of arguments for invoking getElasticPool.

property name

name: string;

The name of the elastic pool.

property resourceGroupName

resourceGroupName: string;

The name of the resource group which contains the elastic pool.

property serverName

serverName: string;

The name of the SQL Server which contains the elastic pool.

interface GetElasticPoolResult

interface GetElasticPoolResult

A collection of values returned by getElasticPool.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property location

location: string;

Specifies the supported Azure location where the resource exists.

property maxSizeBytes

maxSizeBytes: number;

The max data size of the elastic pool in bytes.

property maxSizeGb

maxSizeGb: number;

The max data size of the elastic pool in gigabytes.

property name

name: string;

property perDbMaxCapacity

perDbMaxCapacity: number;

The maximum capacity any one database can consume.

property perDbMinCapacity

perDbMinCapacity: number;

The minimum capacity all databases are guaranteed.

property resourceGroupName

resourceGroupName: string;

property serverName

serverName: string;

property tags

tags: {[key: string]: any};

A mapping of tags to assign to the resource.

property zoneRedundant

zoneRedundant: boolean;

Whether or not this elastic pool is zone redundant.