1. Packages
  2. Lxd Provider
  3. API Docs
  4. getStoragePool
lxd 2.5.0 published on Thursday, Mar 13, 2025 by terraform-lxd

lxd.getStoragePool

Explore with Pulumi AI

# 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",
});
Copy
import pulumi
import pulumi_lxd as lxd

pool = lxd.get_storage_pool(name="my-pool")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  pool:
    fn::invoke:
      function: lxd:getStoragePool
      arguments:
        name: my-pool
Copy

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>
Copy
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: Optional[pulumi.Input[str]] = None,
                     project: Optional[pulumi.Input[str]] = None,
                     remote: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetStoragePoolResult]
Copy
func LookupStoragePool(ctx *Context, args *LookupStoragePoolArgs, opts ...InvokeOption) (*LookupStoragePoolResult, error)
func LookupStoragePoolOutput(ctx *Context, args *LookupStoragePoolOutputArgs, opts ...InvokeOption) LookupStoragePoolResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetStoragePoolResult> getStoragePool(GetStoragePoolArgs args, InvokeOptions options)
public static Output<GetStoragePoolResult> getStoragePool(GetStoragePoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: lxd:index/getStoragePool:getStoragePool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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,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.