We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.mssql.getElasticPool
Explore with Pulumi AI
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.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.mssql.get_elastic_pool(name="mssqlelasticpoolname",
    resource_group_name="example-resources",
    server_name="example-sql-server")
pulumi.export("elasticpoolId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := mssql.LookupElasticPool(ctx, &mssql.LookupElasticPoolArgs{
			Name:              "mssqlelasticpoolname",
			ResourceGroupName: "example-resources",
			ServerName:        "example-sql-server",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("elasticpoolId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.MSSql.GetElasticPool.Invoke(new()
    {
        Name = "mssqlelasticpoolname",
        ResourceGroupName = "example-resources",
        ServerName = "example-sql-server",
    });
    return new Dictionary<string, object?>
    {
        ["elasticpoolId"] = example.Apply(getElasticPoolResult => getElasticPoolResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mssql.MssqlFunctions;
import com.pulumi.azure.mssql.inputs.GetElasticPoolArgs;
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) {
        final var example = MssqlFunctions.getElasticPool(GetElasticPoolArgs.builder()
            .name("mssqlelasticpoolname")
            .resourceGroupName("example-resources")
            .serverName("example-sql-server")
            .build());
        ctx.export("elasticpoolId", example.applyValue(getElasticPoolResult -> getElasticPoolResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:mssql:getElasticPool
      arguments:
        name: mssqlelasticpoolname
        resourceGroupName: example-resources
        serverName: example-sql-server
outputs:
  elasticpoolId: ${example.id}
Using getElasticPool
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getElasticPool(args: GetElasticPoolArgs, opts?: InvokeOptions): Promise<GetElasticPoolResult>
function getElasticPoolOutput(args: GetElasticPoolOutputArgs, opts?: InvokeOptions): Output<GetElasticPoolResult>def get_elastic_pool(name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     server_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetElasticPoolResult
def get_elastic_pool_output(name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     server_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetElasticPoolResult]func LookupElasticPool(ctx *Context, args *LookupElasticPoolArgs, opts ...InvokeOption) (*LookupElasticPoolResult, error)
func LookupElasticPoolOutput(ctx *Context, args *LookupElasticPoolOutputArgs, opts ...InvokeOption) LookupElasticPoolResultOutput> Note: This function is named LookupElasticPool in the Go SDK.
public static class GetElasticPool 
{
    public static Task<GetElasticPoolResult> InvokeAsync(GetElasticPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetElasticPoolResult> Invoke(GetElasticPoolInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetElasticPoolResult> getElasticPool(GetElasticPoolArgs args, InvokeOptions options)
public static Output<GetElasticPoolResult> getElasticPool(GetElasticPoolArgs args, InvokeOptions options)
fn::invoke:
  function: azure:mssql/getElasticPool:getElasticPool
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the elastic pool.
- ResourceGroup stringName 
- The name of the resource group which contains the elastic pool.
- ServerName string
- The name of the SQL Server which contains the elastic pool.
- Name string
- The name of the elastic pool.
- ResourceGroup stringName 
- The name of the resource group which contains the elastic pool.
- ServerName string
- The name of the SQL Server which contains the elastic pool.
- name String
- The name of the elastic pool.
- resourceGroup StringName 
- The name of the resource group which contains the elastic pool.
- serverName String
- The name of the SQL Server which contains the elastic pool.
- name string
- The name of the elastic pool.
- resourceGroup stringName 
- The name of the resource group which contains the elastic pool.
- serverName string
- The name of the SQL Server which contains the elastic pool.
- name str
- The name of the elastic pool.
- resource_group_ strname 
- The name of the resource group which contains the elastic pool.
- server_name str
- The name of the SQL Server which contains the elastic pool.
- name String
- The name of the elastic pool.
- resourceGroup StringName 
- The name of the resource group which contains the elastic pool.
- serverName String
- The name of the SQL Server which contains the elastic pool.
getElasticPool Result
The following output properties are available:
- EnclaveType string
- The type of enclave being used by the elastic pool.
- Id string
- The provider-assigned unique ID for this managed resource.
- LicenseType string
- The license type to apply for this elastic pool.
- Location string
- Specifies the supported Azure location where the resource exists.
- MaxSize intBytes 
- The max data size of the elastic pool in bytes.
- MaxSize doubleGb 
- The max data size of the elastic pool in gigabytes.
- Name string
- Specifies the SKU Name for this Elasticpool.
- PerDb intMax Capacity 
- The maximum capacity any one database can consume.
- PerDb intMin Capacity 
- The minimum capacity all databases are guaranteed.
- ResourceGroup stringName 
- ServerName string
- Skus
List<GetElastic Pool Skus> 
- A skublock as defined below.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- ZoneRedundant bool
- Whether or not this elastic pool is zone redundant.
- EnclaveType string
- The type of enclave being used by the elastic pool.
- Id string
- The provider-assigned unique ID for this managed resource.
- LicenseType string
- The license type to apply for this elastic pool.
- Location string
- Specifies the supported Azure location where the resource exists.
- MaxSize intBytes 
- The max data size of the elastic pool in bytes.
- MaxSize float64Gb 
- The max data size of the elastic pool in gigabytes.
- Name string
- Specifies the SKU Name for this Elasticpool.
- PerDb intMax Capacity 
- The maximum capacity any one database can consume.
- PerDb intMin Capacity 
- The minimum capacity all databases are guaranteed.
- ResourceGroup stringName 
- ServerName string
- Skus
[]GetElastic Pool Skus 
- A skublock as defined below.
- map[string]string
- A mapping of tags to assign to the resource.
- ZoneRedundant bool
- Whether or not this elastic pool is zone redundant.
- enclaveType String
- The type of enclave being used by the elastic pool.
- id String
- The provider-assigned unique ID for this managed resource.
- licenseType String
- The license type to apply for this elastic pool.
- location String
- Specifies the supported Azure location where the resource exists.
- maxSize IntegerBytes 
- The max data size of the elastic pool in bytes.
- maxSize DoubleGb 
- The max data size of the elastic pool in gigabytes.
- name String
- Specifies the SKU Name for this Elasticpool.
- perDb IntegerMax Capacity 
- The maximum capacity any one database can consume.
- perDb IntegerMin Capacity 
- The minimum capacity all databases are guaranteed.
- resourceGroup StringName 
- serverName String
- skus
List<GetElastic Pool Skus> 
- A skublock as defined below.
- Map<String,String>
- A mapping of tags to assign to the resource.
- zoneRedundant Boolean
- Whether or not this elastic pool is zone redundant.
- enclaveType string
- The type of enclave being used by the elastic pool.
- id string
- The provider-assigned unique ID for this managed resource.
- licenseType string
- The license type to apply for this elastic pool.
- location string
- Specifies the supported Azure location where the resource exists.
- maxSize numberBytes 
- The max data size of the elastic pool in bytes.
- maxSize numberGb 
- The max data size of the elastic pool in gigabytes.
- name string
- Specifies the SKU Name for this Elasticpool.
- perDb numberMax Capacity 
- The maximum capacity any one database can consume.
- perDb numberMin Capacity 
- The minimum capacity all databases are guaranteed.
- resourceGroup stringName 
- serverName string
- skus
GetElastic Pool Skus[] 
- A skublock as defined below.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- zoneRedundant boolean
- Whether or not this elastic pool is zone redundant.
- enclave_type str
- The type of enclave being used by the elastic pool.
- id str
- The provider-assigned unique ID for this managed resource.
- license_type str
- The license type to apply for this elastic pool.
- location str
- Specifies the supported Azure location where the resource exists.
- max_size_ intbytes 
- The max data size of the elastic pool in bytes.
- max_size_ floatgb 
- The max data size of the elastic pool in gigabytes.
- name str
- Specifies the SKU Name for this Elasticpool.
- per_db_ intmax_ capacity 
- The maximum capacity any one database can consume.
- per_db_ intmin_ capacity 
- The minimum capacity all databases are guaranteed.
- resource_group_ strname 
- server_name str
- skus
Sequence[GetElastic Pool Skus] 
- A skublock as defined below.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- zone_redundant bool
- Whether or not this elastic pool is zone redundant.
- enclaveType String
- The type of enclave being used by the elastic pool.
- id String
- The provider-assigned unique ID for this managed resource.
- licenseType String
- The license type to apply for this elastic pool.
- location String
- Specifies the supported Azure location where the resource exists.
- maxSize NumberBytes 
- The max data size of the elastic pool in bytes.
- maxSize NumberGb 
- The max data size of the elastic pool in gigabytes.
- name String
- Specifies the SKU Name for this Elasticpool.
- perDb NumberMax Capacity 
- The maximum capacity any one database can consume.
- perDb NumberMin Capacity 
- The minimum capacity all databases are guaranteed.
- resourceGroup StringName 
- serverName String
- skus List<Property Map>
- A skublock as defined below.
- Map<String>
- A mapping of tags to assign to the resource.
- zoneRedundant Boolean
- Whether or not this elastic pool is zone redundant.
Supporting Types
GetElasticPoolSkus   
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.