published on Monday, Jun 29, 2026 by terraform-lxd
published on Monday, Jun 29, 2026 by terraform-lxd
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,
member_overrides: Optional[Mapping[str, StoragePoolMemberOverridesArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
remote: 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.
resource "lxd_storagepool" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args StoragePoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args StoragePoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StoragePoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
MemberOverrides =
{
{ "string", new Lxd.Inputs.StoragePoolMemberOverridesArgs
{
Config =
{
{ "string", "string" },
},
} },
},
Name = "string",
Project = "string",
Remote = "string",
});
example, err := lxd.NewStoragePool(ctx, "storagePoolResource", &lxd.StoragePoolArgs{
Driver: pulumi.String("string"),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
MemberOverrides: lxd.StoragePoolMemberOverridesMap{
"string": &lxd.StoragePoolMemberOverridesArgs{
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Remote: pulumi.String("string"),
})
resource "lxd_storagepool" "storagePoolResource" {
driver = "string"
config = {
"string" = "string"
}
description = "string"
member_overrides = {
"string" = {
config = {
"string" = "string"
}
}
}
name = "string"
project = "string"
remote = "string"
}
var storagePoolResource = new StoragePool("storagePoolResource", StoragePoolArgs.builder()
.driver("string")
.config(Map.of("string", "string"))
.description("string")
.memberOverrides(Map.of("string", StoragePoolMemberOverridesArgs.builder()
.config(Map.of("string", "string"))
.build()))
.name("string")
.project("string")
.remote("string")
.build());
storage_pool_resource = lxd.StoragePool("storagePoolResource",
driver="string",
config={
"string": "string",
},
description="string",
member_overrides={
"string": {
"config": {
"string": "string",
},
},
},
name="string",
project="string",
remote="string")
const storagePoolResource = new lxd.StoragePool("storagePoolResource", {
driver: "string",
config: {
string: "string",
},
description: "string",
memberOverrides: {
string: {
config: {
string: "string",
},
},
},
name: "string",
project: "string",
remote: "string",
});
type: lxd:StoragePool
properties:
config:
string: string
description: string
driver: string
memberOverrides:
string:
config:
string: string
name: string
project: string
remote: string
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 string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - Config Dictionary<string, string>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Description string
- Optional - Description of the storage pool.
- Member
Overrides Dictionary<string, StoragePool Member Overrides Args> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- Driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - Config map[string]string
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Description string
- Optional - Description of the storage pool.
- Member
Overrides map[string]StoragePool Member Overrides Args - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - config map(string)
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description string
- Optional - Description of the storage pool.
- member_
overrides map(object) - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- driver String
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - config Map<String,String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description String
- Optional - Description of the storage pool.
- member
Overrides Map<String,StoragePool Member Overrides Args> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - config {[key: string]: string}
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description string
- Optional - Description of the storage pool.
- member
Overrides {[key: string]: StoragePool Member Overrides Args} - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- driver str
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - config Mapping[str, str]
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description str
- Optional - Description of the storage pool.
- member_
overrides Mapping[str, StoragePool Member Overrides Args] - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
- driver String
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - config Map<String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description String
- Optional - Description of the storage pool.
- member
Overrides Map<Property Map> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the StoragePool resource produces the following output properties:
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,
member_overrides: Optional[Mapping[str, StoragePoolMemberOverridesArgs]] = None,
members: Optional[Mapping[str, StoragePoolMembersArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
remote: Optional[str] = None) -> StoragePoolfunc 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}import {
to = lxd_storagepool.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Config Dictionary<string, string>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Description string
- Optional - Description of the storage pool.
- Driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - Member
Overrides Dictionary<string, StoragePool Member Overrides Args> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - Members
Dictionary<string, Storage
Pool Members Args> - Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- Config map[string]string
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Description string
- Optional - Description of the storage pool.
- Driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - Member
Overrides map[string]StoragePool Member Overrides Args - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - Members
map[string]Storage
Pool Members Args - Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- config map(string)
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description string
- Optional - Description of the storage pool.
- driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - member_
overrides map(object) - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - members map(object)
- Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- config Map<String,String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description String
- Optional - Description of the storage pool.
- driver String
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - member
Overrides Map<String,StoragePool Member Overrides Args> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - members
Map<String,Storage
Pool Members Args> - Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- config {[key: string]: string}
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description string
- Optional - Description of the storage pool.
- driver string
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - member
Overrides {[key: string]: StoragePool Member Overrides Args} - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - members
{[key: string]: Storage
Pool Members Args} - Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- config Mapping[str, str]
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description str
- Optional - Description of the storage pool.
- driver str
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - member_
overrides Mapping[str, StoragePool Member Overrides Args] - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - members
Mapping[str, Storage
Pool Members Args] - Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
- config Map<String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- description String
- Optional - Description of the storage pool.
- driver String
- Required - Storage pool driver. Must be one of
dir,zfs,lvm,btrfs,ceph,cephfs,cephobject,alletra,powerflex,powerstore, orpure. - member
Overrides Map<Property Map> - Optional - Map of per-member local config overrides for clustered storage pools.
Each key is a cluster member name. Each value is a map of local-scoped config keys to apply for that member.
Values in
member_overridestake precedence over values fromconfig. - members Map<Property Map>
- Computed - Map of resolved local config for every cluster member, populated after apply. Used by the provider to detect out-of-band changes (drift) on individual cluster members.
- 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.
Supporting Types
StoragePoolMemberOverrides, StoragePoolMemberOverridesArgs
- Config Dictionary<string, string>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Config map[string]string
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config map(string)
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Map<String,String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config {[key: string]: string}
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Mapping[str, str]
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Map<String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
StoragePoolMembers, StoragePoolMembersArgs
- Config Dictionary<string, string>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- Config map[string]string
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config map(string)
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Map<String,String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config {[key: string]: string}
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Mapping[str, str]
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
- config Map<String>
- Optional - Map of key/value pairs of storage pool config settings. Can contain both cluster-wide (global) configuration keys and default member-specific (local) keys.
Package Details
- Repository
- lxd terraform-lxd/terraform-provider-lxd
- License
- Notes
- This Pulumi package is based on the
lxdTerraform Provider.
published on Monday, Jun 29, 2026 by terraform-lxd