Storage Pool Args
A Hyperdisk Storage Pool is a pre-purchased collection of capacity, throughput, and IOPS which you can then provision to your applications as needed. You can use Hyperdisk Storage Pools to create and manage disks in pools and use the disks across multiple workloads. To get more information about StoragePool, see:
How-to Guides
Example Usage
Compute Storage Pool Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const test_storage_pool_basic = new gcp.compute.StoragePool("test-storage-pool-basic", {
name: "storage-pool-basic",
poolProvisionedCapacityGb: "10240",
poolProvisionedThroughput: "100",
storagePoolType: "hyperdisk-throughput",
zone: "us-central1-a",
deletionProtection: false,
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp
test_storage_pool_basic = gcp.compute.StoragePool("test-storage-pool-basic",
name="storage-pool-basic",
pool_provisioned_capacity_gb="10240",
pool_provisioned_throughput="100",
storage_pool_type="hyperdisk-throughput",
zone="us-central1-a",
deletion_protection=False)
project = gcp.organizations.get_project()
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var test_storage_pool_basic = new Gcp.Compute.StoragePool("test-storage-pool-basic", new()
{
Name = "storage-pool-basic",
PoolProvisionedCapacityGb = "10240",
PoolProvisionedThroughput = "100",
StoragePoolType = "hyperdisk-throughput",
Zone = "us-central1-a",
DeletionProtection = false,
});
var project = Gcp.Organizations.GetProject.Invoke();
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewStoragePool(ctx, "test-storage-pool-basic", &compute.StoragePoolArgs{
Name: pulumi.String("storage-pool-basic"),
PoolProvisionedCapacityGb: pulumi.String("10240"),
PoolProvisionedThroughput: pulumi.String("100"),
StoragePoolType: pulumi.String("hyperdisk-throughput"),
Zone: pulumi.String("us-central1-a"),
DeletionProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.StoragePool;
import com.pulumi.gcp.compute.StoragePoolArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
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 test_storage_pool_basic = new StoragePool("test-storage-pool-basic", StoragePoolArgs.builder()
.name("storage-pool-basic")
.poolProvisionedCapacityGb("10240")
.poolProvisionedThroughput("100")
.storagePoolType("hyperdisk-throughput")
.zone("us-central1-a")
.deletionProtection(false)
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
}
}
resources:
test-storage-pool-basic:
type: gcp:compute:StoragePool
properties:
name: storage-pool-basic
poolProvisionedCapacityGb: '10240'
poolProvisionedThroughput: 100
storagePoolType: hyperdisk-throughput
zone: us-central1-a
deletionProtection: false
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
Compute Storage Pool Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const balanced = gcp.compute.getStoragePoolTypes({
zone: "us-central1-a",
storagePoolType: "hyperdisk-balanced",
});
const test_storage_pool_full = new gcp.compute.StoragePool("test-storage-pool-full", {
name: "storage-pool-full",
description: "Hyperdisk Balanced storage pool",
capacityProvisioningType: "STANDARD",
poolProvisionedCapacityGb: "10240",
performanceProvisioningType: "STANDARD",
poolProvisionedIops: "10000",
poolProvisionedThroughput: "1024",
storagePoolType: balanced.then(balanced => balanced.selfLink),
deletionProtection: false,
zone: "us-central1-a",
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp
balanced = gcp.compute.get_storage_pool_types(zone="us-central1-a",
storage_pool_type="hyperdisk-balanced")
test_storage_pool_full = gcp.compute.StoragePool("test-storage-pool-full",
name="storage-pool-full",
description="Hyperdisk Balanced storage pool",
capacity_provisioning_type="STANDARD",
pool_provisioned_capacity_gb="10240",
performance_provisioning_type="STANDARD",
pool_provisioned_iops="10000",
pool_provisioned_throughput="1024",
storage_pool_type=balanced.self_link,
deletion_protection=False,
zone="us-central1-a")
project = gcp.organizations.get_project()
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var balanced = Gcp.Compute.GetStoragePoolTypes.Invoke(new()
{
Zone = "us-central1-a",
StoragePoolType = "hyperdisk-balanced",
});
var test_storage_pool_full = new Gcp.Compute.StoragePool("test-storage-pool-full", new()
{
Name = "storage-pool-full",
Description = "Hyperdisk Balanced storage pool",
CapacityProvisioningType = "STANDARD",
PoolProvisionedCapacityGb = "10240",
PerformanceProvisioningType = "STANDARD",
PoolProvisionedIops = "10000",
PoolProvisionedThroughput = "1024",
StoragePoolType = balanced.Apply(getStoragePoolTypesResult => getStoragePoolTypesResult.SelfLink),
DeletionProtection = false,
Zone = "us-central1-a",
});
var project = Gcp.Organizations.GetProject.Invoke();
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
balanced, err := compute.GetStoragePoolTypes(ctx, &compute.GetStoragePoolTypesArgs{
Zone: "us-central1-a",
StoragePoolType: "hyperdisk-balanced",
}, nil)
if err != nil {
return err
}
_, err = compute.NewStoragePool(ctx, "test-storage-pool-full", &compute.StoragePoolArgs{
Name: pulumi.String("storage-pool-full"),
Description: pulumi.String("Hyperdisk Balanced storage pool"),
CapacityProvisioningType: pulumi.String("STANDARD"),
PoolProvisionedCapacityGb: pulumi.String("10240"),
PerformanceProvisioningType: pulumi.String("STANDARD"),
PoolProvisionedIops: pulumi.String("10000"),
PoolProvisionedThroughput: pulumi.String("1024"),
StoragePoolType: pulumi.String(balanced.SelfLink),
DeletionProtection: pulumi.Bool(false),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetStoragePoolTypesArgs;
import com.pulumi.gcp.compute.StoragePool;
import com.pulumi.gcp.compute.StoragePoolArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
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 balanced = ComputeFunctions.getStoragePoolTypes(GetStoragePoolTypesArgs.builder()
.zone("us-central1-a")
.storagePoolType("hyperdisk-balanced")
.build());
var test_storage_pool_full = new StoragePool("test-storage-pool-full", StoragePoolArgs.builder()
.name("storage-pool-full")
.description("Hyperdisk Balanced storage pool")
.capacityProvisioningType("STANDARD")
.poolProvisionedCapacityGb("10240")
.performanceProvisioningType("STANDARD")
.poolProvisionedIops("10000")
.poolProvisionedThroughput("1024")
.storagePoolType(balanced.selfLink())
.deletionProtection(false)
.zone("us-central1-a")
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
}
}
resources:
test-storage-pool-full:
type: gcp:compute:StoragePool
properties:
name: storage-pool-full
description: Hyperdisk Balanced storage pool
capacityProvisioningType: STANDARD
poolProvisionedCapacityGb: '10240'
performanceProvisioningType: STANDARD
poolProvisionedIops: '10000'
poolProvisionedThroughput: '1024'
storagePoolType: ${balanced.selfLink}
deletionProtection: false
zone: us-central1-a
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
balanced:
fn::invoke:
function: gcp:compute:getStoragePoolTypes
arguments:
zone: us-central1-a
storagePoolType: hyperdisk-balanced
Import
StoragePool can be imported using any of these accepted formats:
projects/{{project}}/zones/{{zone}}/storagePools/{{name}}
{{project}}/{{zone}}/{{name}}
{{zone}}/{{name}}
{{name}}
When using thepulumi import
command, StoragePool can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/storagePool:StoragePool default projects/{{project}}/zones/{{zone}}/storagePools/{{name}}
$ pulumi import gcp:compute/storagePool:StoragePool default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:compute/storagePool:StoragePool default {{zone}}/{{name}}
$ pulumi import gcp:compute/storagePool:StoragePool default {{name}}
Constructors
Properties
Provisioning type of the byte capacity of the pool. Possible values are: STANDARD
, ADVANCED
.
A description of this resource. Provide this property when you create the resource.
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. Possible values are: STANDARD
, ADVANCED
.
Size, in GiB, of the storage pool. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.
Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced
.
Provisioned throughput, in MB/s, of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced
or hyperdisk-throughput
.
Type of the storage pool. For example, the following are valid values: