1. Packages
  2. Juju Provider
  3. API Docs
  4. StoragePool
juju 1.0.0-rc1 published on Tuesday, Oct 21, 2025 by juju

juju.StoragePool

Deploy with Pulumi
juju logo
juju 1.0.0-rc1 published on Tuesday, Oct 21, 2025 by juju

    A resource that represents a Juju storage pool.

    To learn more about storage pools, please visit: https://documentation.ubuntu.com/juju/3.6/reference/storage/#storage-pool

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const mypool = new juju.StoragePool("mypool", {
        modelUuid: juju_model.development.uuid,
        storageProvider: "tmpfs",
        attributes: {
            a: "b",
            c: "d",
        },
    });
    
    import pulumi
    import pulumi_juju as juju
    
    mypool = juju.StoragePool("mypool",
        model_uuid=juju_model["development"]["uuid"],
        storage_provider="tmpfs",
        attributes={
            "a": "b",
            "c": "d",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/juju/juju"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := juju.NewStoragePool(ctx, "mypool", &juju.StoragePoolArgs{
    			ModelUuid:       pulumi.Any(juju_model.Development.Uuid),
    			StorageProvider: pulumi.String("tmpfs"),
    			Attributes: pulumi.StringMap{
    				"a": pulumi.String("b"),
    				"c": pulumi.String("d"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Juju = Pulumi.Juju;
    
    return await Deployment.RunAsync(() => 
    {
        var mypool = new Juju.StoragePool("mypool", new()
        {
            ModelUuid = juju_model.Development.Uuid,
            StorageProvider = "tmpfs",
            Attributes = 
            {
                { "a", "b" },
                { "c", "d" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.StoragePool;
    import com.pulumi.juju.StoragePoolArgs;
    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) {
            var mypool = new StoragePool("mypool", StoragePoolArgs.builder()
                .modelUuid(juju_model.development().uuid())
                .storageProvider("tmpfs")
                .attributes(Map.ofEntries(
                    Map.entry("a", "b"),
                    Map.entry("c", "d")
                ))
                .build());
    
        }
    }
    
    resources:
      mypool:
        type: juju:StoragePool
        properties:
          modelUuid: ${juju_model.development.uuid}
          storageProvider: tmpfs
          attributes:
            a: b
            c: d
    

    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,
                    model_uuid: Optional[str] = None,
                    storage_provider: Optional[str] = None,
                    attributes: Optional[Mapping[str, str]] = None,
                    name: 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: juju:StoragePool
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    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 Juju.StoragePool("storagePoolResource", new()
    {
        ModelUuid = "string",
        StorageProvider = "string",
        Attributes = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := juju.NewStoragePool(ctx, "storagePoolResource", &juju.StoragePoolArgs{
    	ModelUuid:       pulumi.String("string"),
    	StorageProvider: pulumi.String("string"),
    	Attributes: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var storagePoolResource = new StoragePool("storagePoolResource", StoragePoolArgs.builder()
        .modelUuid("string")
        .storageProvider("string")
        .attributes(Map.of("string", "string"))
        .name("string")
        .build());
    
    storage_pool_resource = juju.StoragePool("storagePoolResource",
        model_uuid="string",
        storage_provider="string",
        attributes={
            "string": "string",
        },
        name="string")
    
    const storagePoolResource = new juju.StoragePool("storagePoolResource", {
        modelUuid: "string",
        storageProvider: "string",
        attributes: {
            string: "string",
        },
        name: "string",
    });
    
    type: juju:StoragePool
    properties:
        attributes:
            string: string
        modelUuid: string
        name: string
        storageProvider: 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:

    ModelUuid string
    The UUID of the model where the storage pool will be created.
    StorageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    Attributes Dictionary<string, string>
    Attributes for the storage pool.
    Name string
    The name of the storage pool.
    ModelUuid string
    The UUID of the model where the storage pool will be created.
    StorageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    Attributes map[string]string
    Attributes for the storage pool.
    Name string
    The name of the storage pool.
    modelUuid String
    The UUID of the model where the storage pool will be created.
    storageProvider String
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Map<String,String>
    Attributes for the storage pool.
    name String
    The name of the storage pool.
    modelUuid string
    The UUID of the model where the storage pool will be created.
    storageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes {[key: string]: string}
    Attributes for the storage pool.
    name string
    The name of the storage pool.
    model_uuid str
    The UUID of the model where the storage pool will be created.
    storage_provider str
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Mapping[str, str]
    Attributes for the storage pool.
    name str
    The name of the storage pool.
    modelUuid String
    The UUID of the model where the storage pool will be created.
    storageProvider String
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Map<String>
    Attributes for the storage pool.
    name String
    The name of the storage pool.

    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,
            attributes: Optional[Mapping[str, str]] = None,
            model_uuid: Optional[str] = None,
            name: Optional[str] = None,
            storage_provider: 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: juju:StoragePool    get:      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.
    The following state arguments are supported:
    Attributes Dictionary<string, string>
    Attributes for the storage pool.
    ModelUuid string
    The UUID of the model where the storage pool will be created.
    Name string
    The name of the storage pool.
    StorageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    Attributes map[string]string
    Attributes for the storage pool.
    ModelUuid string
    The UUID of the model where the storage pool will be created.
    Name string
    The name of the storage pool.
    StorageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Map<String,String>
    Attributes for the storage pool.
    modelUuid String
    The UUID of the model where the storage pool will be created.
    name String
    The name of the storage pool.
    storageProvider String
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes {[key: string]: string}
    Attributes for the storage pool.
    modelUuid string
    The UUID of the model where the storage pool will be created.
    name string
    The name of the storage pool.
    storageProvider string
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Mapping[str, str]
    Attributes for the storage pool.
    model_uuid str
    The UUID of the model where the storage pool will be created.
    name str
    The name of the storage pool.
    storage_provider str
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).
    attributes Map<String>
    Attributes for the storage pool.
    modelUuid String
    The UUID of the model where the storage pool will be created.
    name String
    The name of the storage pool.
    storageProvider String
    The storage provider type (e.g., 'rootfs', 'tmpfs', 'loop', or a cloud specific provider).

    Import

    Storage pools can be imported with the UUID of the model and the name of the pool.

    $ pulumi import juju:index/storagePool:StoragePool my_pool 1d10a751-02c1-43d5-b46b-d84fe04d6fde:my_pool
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    juju juju/terraform-provider-juju
    License
    Notes
    This Pulumi package is based on the juju Terraform Provider.
    juju logo
    juju 1.0.0-rc1 published on Tuesday, Oct 21, 2025 by juju
      Meet Neo: Your AI Platform Teammate