1. Packages
  2. Packages
  3. Lxd Provider
  4. API Docs
  5. getStoragePool
Viewing docs for lxd 2.7.1
published on Tuesday, May 12, 2026 by terraform-lxd
Viewing docs for lxd 2.7.1
published on Tuesday, May 12, 2026 by terraform-lxd

    # lxd.StoragePool

    Provides information about an existing LXD storage pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as lxd from "@pulumi/lxd";
    
    const pool = lxd.getStoragePool({
        name: "my-pool",
    });
    
    import pulumi
    import pulumi_lxd as lxd
    
    pool = lxd.get_storage_pool(name="my-pool")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lxd/v2/lxd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lxd.LookupStoragePool(ctx, &lxd.LookupStoragePoolArgs{
    			Name: "my-pool",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lxd = Pulumi.Lxd;
    
    return await Deployment.RunAsync(() => 
    {
        var pool = Lxd.GetStoragePool.Invoke(new()
        {
            Name = "my-pool",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lxd.LxdFunctions;
    import com.pulumi.lxd.inputs.GetStoragePoolArgs;
    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 pool = LxdFunctions.getStoragePool(GetStoragePoolArgs.builder()
                .name("my-pool")
                .build());
    
        }
    }
    
    variables:
      pool:
        fn::invoke:
          function: lxd:getStoragePool
          arguments:
            name: my-pool
    
    Example coming soon!
    

    Using getStoragePool

    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 getStoragePool(args: GetStoragePoolArgs, opts?: InvokeOptions): Promise<GetStoragePoolResult>
    function getStoragePoolOutput(args: GetStoragePoolOutputArgs, opts?: InvokeOptions): Output<GetStoragePoolResult>
    def get_storage_pool(name: Optional[str] = None,
                         project: Optional[str] = None,
                         remote: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetStoragePoolResult
    def get_storage_pool_output(name: pulumi.Input[Optional[str]] = None,
                         project: pulumi.Input[Optional[str]] = None,
                         remote: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetStoragePoolResult]
    func LookupStoragePool(ctx *Context, args *LookupStoragePoolArgs, opts ...InvokeOption) (*LookupStoragePoolResult, error)
    func LookupStoragePoolOutput(ctx *Context, args *LookupStoragePoolOutputArgs, opts ...InvokeOption) LookupStoragePoolResultOutput

    > Note: This function is named LookupStoragePool in the Go SDK.

    public static class GetStoragePool 
    {
        public static Task<GetStoragePoolResult> InvokeAsync(GetStoragePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetStoragePoolResult> Invoke(GetStoragePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStoragePoolResult> getStoragePool(GetStoragePoolArgs args, InvokeOptions options)
    public static Output<GetStoragePoolResult> getStoragePool(GetStoragePoolArgs args, InvokeOptions options)
    
    fn::invoke:
      function: lxd:index/getStoragePool:getStoragePool
      arguments:
        # arguments dictionary
    data "lxd_getstoragepool" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Required - Name of the storage pool.
    Project string
    Optional - Name of the project where storage pool is located.
    Remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    Name string
    Required - Name of the storage pool.
    Project string
    Optional - Name of the project where storage pool is located.
    Remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name string
    Required - Name of the storage pool.
    project string
    Optional - Name of the project where storage pool is located.
    remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name String
    Required - Name of the storage pool.
    project String
    Optional - Name of the project where storage pool is located.
    remote String
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name string
    Required - Name of the storage pool.
    project string
    Optional - Name of the project where storage pool is located.
    remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name str
    Required - Name of the storage pool.
    project str
    Optional - Name of the project where storage pool is located.
    remote str
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name String
    Required - Name of the storage pool.
    project String
    Optional - Name of the project where storage pool is located.
    remote String
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.

    getStoragePool Result

    The following output properties are available:

    Config Dictionary<string, string>
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    Description string
    Description of the storage pool.
    Driver string
    Storage pool driver.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations List<string>
    List of cluster members where storage pool is located.
    Name string
    Status string
    The status of the storage pool.
    Project string
    Remote string
    Config map[string]string
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    Description string
    Description of the storage pool.
    Driver string
    Storage pool driver.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations []string
    List of cluster members where storage pool is located.
    Name string
    Status string
    The status of the storage pool.
    Project string
    Remote string
    config map(string)
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    description string
    Description of the storage pool.
    driver string
    Storage pool driver.
    id string
    The provider-assigned unique ID for this managed resource.
    locations list(string)
    List of cluster members where storage pool is located.
    name string
    status string
    The status of the storage pool.
    project string
    remote string
    config Map<String,String>
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    description String
    Description of the storage pool.
    driver String
    Storage pool driver.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<String>
    List of cluster members where storage pool is located.
    name String
    status String
    The status of the storage pool.
    project String
    remote String
    config {[key: string]: string}
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    description string
    Description of the storage pool.
    driver string
    Storage pool driver.
    id string
    The provider-assigned unique ID for this managed resource.
    locations string[]
    List of cluster members where storage pool is located.
    name string
    status string
    The status of the storage pool.
    project string
    remote string
    config Mapping[str, str]
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    description str
    Description of the storage pool.
    driver str
    Storage pool driver.
    id str
    The provider-assigned unique ID for this managed resource.
    locations Sequence[str]
    List of cluster members where storage pool is located.
    name str
    status str
    The status of the storage pool.
    project str
    remote str
    config Map<String>
    Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
    description String
    Description of the storage pool.
    driver String
    Storage pool driver.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<String>
    List of cluster members where storage pool is located.
    name String
    status String
    The status of the storage pool.
    project String
    remote String

    Package Details

    Repository
    lxd terraform-lxd/terraform-provider-lxd
    License
    Notes
    This Pulumi package is based on the lxd Terraform Provider.
    Viewing docs for lxd 2.7.1
    published on Tuesday, May 12, 2026 by terraform-lxd
      Try Pulumi Cloud free. Your team will thank you.