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

lxd.StoragePool

Explore with Pulumi AI

Create StoragePool Resource

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

Constructor syntax

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

@overload
def StoragePool(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                driver: Optional[str] = None,
                config: Optional[Mapping[str, str]] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                project: Optional[str] = None,
                remote: Optional[str] = None,
                source: Optional[str] = None,
                target: Optional[str] = None)
func NewStoragePool(ctx *Context, name string, args StoragePoolArgs, opts ...ResourceOption) (*StoragePool, error)
public StoragePool(string name, StoragePoolArgs args, CustomResourceOptions? opts = null)
public StoragePool(String name, StoragePoolArgs args)
public StoragePool(String name, StoragePoolArgs args, CustomResourceOptions options)
type: lxd:StoragePool
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. StoragePoolArgs
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. StoragePoolArgs
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. StoragePoolArgs
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. StoragePoolArgs
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. StoragePoolArgs
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 storagePoolResource = new Lxd.StoragePool("storagePoolResource", new()
{
    Driver = "string",
    Config = 
    {
        { "string", "string" },
    },
    Description = "string",
    Name = "string",
    Project = "string",
    Remote = "string",
    Source = "string",
    Target = "string",
});
Copy
example, err := lxd.NewStoragePool(ctx, "storagePoolResource", &lxd.StoragePoolArgs{
Driver: pulumi.String("string"),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Remote: pulumi.String("string"),
Source: pulumi.String("string"),
Target: pulumi.String("string"),
})
Copy
var storagePoolResource = new StoragePool("storagePoolResource", StoragePoolArgs.builder()
    .driver("string")
    .config(Map.of("string", "string"))
    .description("string")
    .name("string")
    .project("string")
    .remote("string")
    .source("string")
    .target("string")
    .build());
Copy
storage_pool_resource = lxd.StoragePool("storagePoolResource",
    driver="string",
    config={
        "string": "string",
    },
    description="string",
    name="string",
    project="string",
    remote="string",
    source="string",
    target="string")
Copy
const storagePoolResource = new lxd.StoragePool("storagePoolResource", {
    driver: "string",
    config: {
        string: "string",
    },
    description: "string",
    name: "string",
    project: "string",
    remote: "string",
    source: "string",
    target: "string",
});
Copy
type: lxd:StoragePool
properties:
    config:
        string: string
    description: string
    driver: string
    name: string
    project: string
    remote: string
    source: string
    target: string
Copy

StoragePool 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 StoragePool resource accepts the following input properties:

Driver This property is required. string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
Config Dictionary<string, string>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
Description string
Optional - Description of the storage pool.
Name string
Required - Name of the storage pool.
Project string
Optional - Name of the project where the storage pool will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
Target string
Optional - Specify a target node in a cluster.
Driver This property is required. string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
Config map[string]string
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
Description string
Optional - Description of the storage pool.
Name string
Required - Name of the storage pool.
Project string
Optional - Name of the project where the storage pool will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
Target string
Optional - Specify a target node in a cluster.
driver This property is required. String
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
config Map<String,String>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description String
Optional - Description of the storage pool.
name String
Required - Name of the storage pool.
project String
Optional - Name of the project where the storage pool will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source String
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target String
Optional - Specify a target node in a cluster.
driver This property is required. string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
config {[key: string]: string}
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description string
Optional - Description of the storage pool.
name string
Required - Name of the storage pool.
project string
Optional - Name of the project where the storage pool will be stored.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target string
Optional - Specify a target node in a cluster.
driver This property is required. str
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
config Mapping[str, str]
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description str
Optional - Description of the storage pool.
name str
Required - Name of the storage pool.
project str
Optional - Name of the project where the storage pool will be stored.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source str
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target str
Optional - Specify a target node in a cluster.
driver This property is required. String
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
config Map<String>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description String
Optional - Description of the storage pool.
name String
Required - Name of the storage pool.
project String
Optional - Name of the project where the storage pool will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source String
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target String
Optional - Specify a target node in a cluster.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing StoragePool Resource

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

public static get(name: string, id: Input<ID>, state?: StoragePoolState, opts?: CustomResourceOptions): StoragePool
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        driver: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        remote: Optional[str] = None,
        source: Optional[str] = None,
        target: Optional[str] = None) -> StoragePool
func GetStoragePool(ctx *Context, name string, id IDInput, state *StoragePoolState, opts ...ResourceOption) (*StoragePool, error)
public static StoragePool Get(string name, Input<string> id, StoragePoolState? state, CustomResourceOptions? opts = null)
public static StoragePool get(String name, Output<String> id, StoragePoolState state, CustomResourceOptions options)
resources:  _:    type: lxd:StoragePool    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Config Dictionary<string, string>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
Description string
Optional - Description of the storage pool.
Driver string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
Name string
Required - Name of the storage pool.
Project string
Optional - Name of the project where the storage pool will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
Target string
Optional - Specify a target node in a cluster.
Config map[string]string
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
Description string
Optional - Description of the storage pool.
Driver string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
Name string
Required - Name of the storage pool.
Project string
Optional - Name of the project where the storage pool will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
Target string
Optional - Specify a target node in a cluster.
config Map<String,String>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description String
Optional - Description of the storage pool.
driver String
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
name String
Required - Name of the storage pool.
project String
Optional - Name of the project where the storage pool will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source String
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target String
Optional - Specify a target node in a cluster.
config {[key: string]: string}
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description string
Optional - Description of the storage pool.
driver string
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
name string
Required - Name of the storage pool.
project string
Optional - Name of the project where the storage pool will be stored.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source string
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target string
Optional - Specify a target node in a cluster.
config Mapping[str, str]
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description str
Optional - Description of the storage pool.
driver str
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
name str
Required - Name of the storage pool.
project str
Optional - Name of the project where the storage pool will be stored.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source str
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target str
Optional - Specify a target node in a cluster.
config Map<String>
Optional - Map of key/value pairs of storage pool config settings. Config settings vary from driver to driver.
description String
Optional - Description of the storage pool.
driver String
Required - Storage pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject.
name String
Required - Name of the storage pool.
project String
Optional - Name of the project where the storage pool will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source String
Optional - Source of the storage pool that is applicable only during the creation. While this corresponds to config.source in LXD, config.source is adjusted after creation by LXD based on the underlying storage driver. Therefore, using source during creation prevents an inconsistent pulumi preview.
target String
Optional - Specify a target node in a cluster.

Package Details

Repository
lxd terraform-lxd/terraform-provider-lxd
License
Notes
This Pulumi package is based on the lxd Terraform Provider.