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

juju.getStoragePool

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

    A data source representing a Juju Storage Pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const myModel = juju.getModel({
        name: "default",
    });
    const myStoragePoolDataSource = myModel.then(myModel => juju.getStoragePool({
        name: "my_storage_pool",
        modelUuid: myModel.uuid,
    }));
    
    import pulumi
    import pulumi_juju as juju
    
    my_model = juju.get_model(name="default")
    my_storage_pool_data_source = juju.get_storage_pool(name="my_storage_pool",
        model_uuid=my_model.uuid)
    
    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 {
    		myModel, err := juju.LookupModel(ctx, &juju.LookupModelArgs{
    			Name: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = juju.LookupStoragePool(ctx, &juju.LookupStoragePoolArgs{
    			Name:      "my_storage_pool",
    			ModelUuid: myModel.Uuid,
    		}, nil)
    		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 myModel = Juju.GetModel.Invoke(new()
        {
            Name = "default",
        });
    
        var myStoragePoolDataSource = Juju.GetStoragePool.Invoke(new()
        {
            Name = "my_storage_pool",
            ModelUuid = myModel.Apply(getModelResult => getModelResult.Uuid),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.JujuFunctions;
    import com.pulumi.juju.inputs.GetModelArgs;
    import com.pulumi.juju.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 myModel = JujuFunctions.getModel(GetModelArgs.builder()
                .name("default")
                .build());
    
            final var myStoragePoolDataSource = JujuFunctions.getStoragePool(GetStoragePoolArgs.builder()
                .name("my_storage_pool")
                .modelUuid(myModel.applyValue(getModelResult -> getModelResult.uuid()))
                .build());
    
        }
    }
    
    variables:
      myModel:
        fn::invoke:
          function: juju:getModel
          arguments:
            name: default
      myStoragePoolDataSource:
        fn::invoke:
          function: juju:getStoragePool
          arguments:
            name: my_storage_pool
            modelUuid: ${myModel.uuid}
    

    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(model_uuid: Optional[str] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetStoragePoolResult
    def get_storage_pool_output(model_uuid: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[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: juju:index/getStoragePool:getStoragePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ModelUuid string
    The uuid of the model containing the storage pool.
    Name string
    The name of the storage pool.
    ModelUuid string
    The uuid of the model containing the storage pool.
    Name string
    The name of the storage pool.
    modelUuid String
    The uuid of the model containing the storage pool.
    name String
    The name of the storage pool.
    modelUuid string
    The uuid of the model containing the storage pool.
    name string
    The name of the storage pool.
    model_uuid str
    The uuid of the model containing the storage pool.
    name str
    The name of the storage pool.
    modelUuid String
    The uuid of the model containing the storage pool.
    name String
    The name of the storage pool.

    getStoragePool Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ModelUuid string
    The uuid of the model containing the storage pool.
    Name string
    The name of the storage pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModelUuid string
    The uuid of the model containing the storage pool.
    Name string
    The name of the storage pool.
    id String
    The provider-assigned unique ID for this managed resource.
    modelUuid String
    The uuid of the model containing the storage pool.
    name String
    The name of the storage pool.
    id string
    The provider-assigned unique ID for this managed resource.
    modelUuid string
    The uuid of the model containing the storage pool.
    name string
    The name of the storage pool.
    id str
    The provider-assigned unique ID for this managed resource.
    model_uuid str
    The uuid of the model containing the storage pool.
    name str
    The name of the storage pool.
    id String
    The provider-assigned unique ID for this managed resource.
    modelUuid String
    The uuid of the model containing the storage pool.
    name String
    The name of the storage pool.

    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