1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getStoragePool
Google Cloud v9.7.0 published on Wednesday, Dec 24, 2025 by Pulumi
gcp logo
Google Cloud v9.7.0 published on Wednesday, Dec 24, 2025 by Pulumi

    Provides access to available Google Compute Storage Pool resources for a given project and zone. See more about Hyperdisk Storage Pools in the upstream docs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myPool = gcp.compute.getStoragePool({
        name: "my-storage-pool",
        zone: "us-central1-a",
    });
    export const poolCapacity = myPool.then(myPool => myPool.poolProvisionedCapacityGb);
    export const poolType = myPool.then(myPool => myPool.storagePoolType);
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_pool = gcp.compute.get_storage_pool(name="my-storage-pool",
        zone="us-central1-a")
    pulumi.export("poolCapacity", my_pool.pool_provisioned_capacity_gb)
    pulumi.export("poolType", my_pool.storage_pool_type)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myPool, err := compute.LookupStoragePool(ctx, &compute.LookupStoragePoolArgs{
    			Name: "my-storage-pool",
    			Zone: "us-central1-a",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("poolCapacity", myPool.PoolProvisionedCapacityGb)
    		ctx.Export("poolType", myPool.StoragePoolType)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var myPool = Gcp.Compute.GetStoragePool.Invoke(new()
        {
            Name = "my-storage-pool",
            Zone = "us-central1-a",
        });
    
        return new Dictionary<string, object?>
        {
            ["poolCapacity"] = myPool.Apply(getStoragePoolResult => getStoragePoolResult.PoolProvisionedCapacityGb),
            ["poolType"] = myPool.Apply(getStoragePoolResult => getStoragePoolResult.StoragePoolType),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.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 myPool = ComputeFunctions.getStoragePool(GetStoragePoolArgs.builder()
                .name("my-storage-pool")
                .zone("us-central1-a")
                .build());
    
            ctx.export("poolCapacity", myPool.poolProvisionedCapacityGb());
            ctx.export("poolType", myPool.storagePoolType());
        }
    }
    
    variables:
      myPool:
        fn::invoke:
          function: gcp:compute:getStoragePool
          arguments:
            name: my-storage-pool
            zone: us-central1-a
    outputs:
      poolCapacity: ${myPool.poolProvisionedCapacityGb}
      poolType: ${myPool.storagePoolType}
    

    Note

    • deletion_protection is always set to false on the data source and will not be represetative of the actual value on gcp.compute.StoragePool reaosure being read

    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(name: Optional[str] = None,
                         project: Optional[str] = None,
                         zone: 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,
                         zone: 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: gcp:compute/getStoragePool:getStoragePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Storage Pool.
    Zone string
    The zone where the Storage Pool resides.
    Project string
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.
    Name string
    The name of the Storage Pool.
    Zone string
    The zone where the Storage Pool resides.
    Project string
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.
    name String
    The name of the Storage Pool.
    zone String
    The zone where the Storage Pool resides.
    project String
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.
    name string
    The name of the Storage Pool.
    zone string
    The zone where the Storage Pool resides.
    project string
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.
    name str
    The name of the Storage Pool.
    zone str
    The zone where the Storage Pool resides.
    project str
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.
    name String
    The name of the Storage Pool.
    zone String
    The zone where the Storage Pool resides.
    project String
    The project in which the Storage Pool exists. If it is not provided, the provider project is used.

    getStoragePool Result

    The following output properties are available:

    Supporting Types

    GetStoragePoolResourceStatus

    DiskCount string
    Number of disks used.
    LastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    MaxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    PoolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    PoolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    PoolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    PoolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    TotalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    TotalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    TotalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    DiskCount string
    Number of disks used.
    LastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    MaxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    PoolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    PoolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    PoolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    PoolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    TotalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    TotalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    TotalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount String
    Number of disks used.
    lastResizeTimestamp String
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb String
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes String
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops String
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput String
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes String
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb String
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops String
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput String
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount string
    Number of disks used.
    lastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    disk_count str
    Number of disks used.
    last_resize_timestamp str
    Timestamp of the last successful resize in RFC3339 text format.
    max_total_provisioned_disk_capacity_gb str
    Maximum allowed aggregate disk size in gigabytes.
    pool_used_capacity_bytes str
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    pool_used_iops str
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    pool_used_throughput str
    Sum of all the disks' provisioned throughput in MB/s.
    pool_user_written_bytes str
    Amount of data written into the pool, before it is compacted.
    total_provisioned_disk_capacity_gb str
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    total_provisioned_disk_iops str
    Sum of all the disks' provisioned IOPS.
    total_provisioned_disk_throughput str
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount String
    Number of disks used.
    lastResizeTimestamp String
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb String
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes String
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops String
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput String
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes String
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb String
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops String
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput String
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.

    GetStoragePoolStatus

    DiskCount string
    Number of disks used.
    LastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    MaxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    PoolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    PoolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    PoolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    PoolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    TotalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    TotalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    TotalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    DiskCount string
    Number of disks used.
    LastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    MaxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    PoolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    PoolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    PoolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    PoolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    TotalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    TotalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    TotalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount String
    Number of disks used.
    lastResizeTimestamp String
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb String
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes String
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops String
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput String
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes String
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb String
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops String
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput String
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount string
    Number of disks used.
    lastResizeTimestamp string
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb string
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes string
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops string
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput string
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes string
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb string
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops string
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput string
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    disk_count str
    Number of disks used.
    last_resize_timestamp str
    Timestamp of the last successful resize in RFC3339 text format.
    max_total_provisioned_disk_capacity_gb str
    Maximum allowed aggregate disk size in gigabytes.
    pool_used_capacity_bytes str
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    pool_used_iops str
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    pool_used_throughput str
    Sum of all the disks' provisioned throughput in MB/s.
    pool_user_written_bytes str
    Amount of data written into the pool, before it is compacted.
    total_provisioned_disk_capacity_gb str
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    total_provisioned_disk_iops str
    Sum of all the disks' provisioned IOPS.
    total_provisioned_disk_throughput str
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
    diskCount String
    Number of disks used.
    lastResizeTimestamp String
    Timestamp of the last successful resize in RFC3339 text format.
    maxTotalProvisionedDiskCapacityGb String
    Maximum allowed aggregate disk size in gigabytes.
    poolUsedCapacityBytes String
    Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
    poolUsedIops String
    Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
    poolUsedThroughput String
    Sum of all the disks' provisioned throughput in MB/s.
    poolUserWrittenBytes String
    Amount of data written into the pool, before it is compacted.
    totalProvisionedDiskCapacityGb String
    Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
    totalProvisionedDiskIops String
    Sum of all the disks' provisioned IOPS.
    totalProvisionedDiskThroughput String
    Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v9.7.0 published on Wednesday, Dec 24, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate