StoragePool class

Storage pools act as containers for volumes. All volumes in a storage pool share the following information:

  • Location
  • Service level
  • Virtual Private Cloud (VPC) network
  • Active Directory policy
  • LDAP use for NFS volumes, if applicable
  • Customer-managed encryption key (CMEK) policy

The capacity of the pool can be split up and assigned to volumes within the pool. Storage pools are a billable component of NetApp Volumes. Billing is based on the location, service level, and capacity allocated to a pool independent of consumption at the volume level.

Storage pools of service level Flex are available as zonal (single zone) or regional (two zones in same region) pools. Zonal and regional pools are high-available within the zone. On top of that, regional pools have replicaZone as hot standby zone. All volume access is served from the zone. If zone fails, replicaZone automatically becomes the active zone. This will cause state drift in your configuration. If a zone switch (manual or automatic) is triggered outside of Terraform, you need to adjust the zone and replicaZone values to reflect the current state, or Terraform will initiate a zone switch when running the next apply. You can trigger a manual zone switch via Terraform by swapping the value of the zone and replicaZone parameters in your HCL code.

To get more information about StoragePool, see:

Example Usage

Storage Pool Create Doc

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

// Create a network or use datasource to reference existing network
const peeringNetwork = new gcp.compute.Network("peering_network", {name: "test-network"});
// Reserve a CIDR for NetApp Volumes to use
// When using shared-VPCs, this resource needs to be created in host project
const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
    name: "test-address",
    purpose: "VPC_PEERING",
    addressType: "INTERNAL",
    prefixLength: 16,
    network: peeringNetwork.id,
});
// Create a Private Service Access connection
// When using shared-VPCs, this resource needs to be created in host project
const _default = new gcp.servicenetworking.Connection("default", {
    network: peeringNetwork.id,
    service: "netapp.servicenetworking.goog",
    reservedPeeringRanges: [privateIpAlloc.name],
});
// Modify the PSA Connection to allow import/export of custom routes
// When using shared-VPCs, this resource needs to be created in host project
const routeUpdates = new gcp.compute.NetworkPeeringRoutesConfig("route_updates", {
    peering: _default.peering,
    network: peeringNetwork.name,
    importCustomRoutes: true,
    exportCustomRoutes: true,
});
// Create a storage pool
// Create this resource in the project which is expected to own the volumes
const testPool = new gcp.netapp.StoragePool("test_pool", {
    name: "test-pool",
    location: "us-central1",
    serviceLevel: "PREMIUM",
    capacityGib: "2048",
    network: peeringNetwork.id,
});
import pulumi
import pulumi_gcp as gcp

# Create a network or use datasource to reference existing network
peering_network = gcp.compute.Network("peering_network", name="test-network")
# Reserve a CIDR for NetApp Volumes to use
# When using shared-VPCs, this resource needs to be created in host project
private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
    name="test-address",
    purpose="VPC_PEERING",
    address_type="INTERNAL",
    prefix_length=16,
    network=peering_network.id)
# Create a Private Service Access connection
# When using shared-VPCs, this resource needs to be created in host project
default = gcp.servicenetworking.Connection("default",
    network=peering_network.id,
    service="netapp.servicenetworking.goog",
    reserved_peering_ranges=[private_ip_alloc.name])
# Modify the PSA Connection to allow import/export of custom routes
# When using shared-VPCs, this resource needs to be created in host project
route_updates = gcp.compute.NetworkPeeringRoutesConfig("route_updates",
    peering=default.peering,
    network=peering_network.name,
    import_custom_routes=True,
    export_custom_routes=True)
# Create a storage pool
# Create this resource in the project which is expected to own the volumes
test_pool = gcp.netapp.StoragePool("test_pool",
    name="test-pool",
    location="us-central1",
    service_level="PREMIUM",
    capacity_gib="2048",
    network=peering_network.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    // Create a network or use datasource to reference existing network
    var peeringNetwork = new Gcp.Compute.Network("peering_network", new()
    {
        Name = "test-network",
    });

    // Reserve a CIDR for NetApp Volumes to use
    // When using shared-VPCs, this resource needs to be created in host project
    var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
    {
        Name = "test-address",
        Purpose = "VPC_PEERING",
        AddressType = "INTERNAL",
        PrefixLength = 16,
        Network = peeringNetwork.Id,
    });

    // Create a Private Service Access connection
    // When using shared-VPCs, this resource needs to be created in host project
    var @default = new Gcp.ServiceNetworking.Connection("default", new()
    {
        Network = peeringNetwork.Id,
        Service = "netapp.servicenetworking.goog",
        ReservedPeeringRanges = new[]
        {
            privateIpAlloc.Name,
        },
    });

    // Modify the PSA Connection to allow import/export of custom routes
    // When using shared-VPCs, this resource needs to be created in host project
    var routeUpdates = new Gcp.Compute.NetworkPeeringRoutesConfig("route_updates", new()
    {
        Peering = @default.Peering,
        Network = peeringNetwork.Name,
        ImportCustomRoutes = true,
        ExportCustomRoutes = true,
    });

    // Create a storage pool
    // Create this resource in the project which is expected to own the volumes
    var testPool = new Gcp.Netapp.StoragePool("test_pool", new()
    {
        Name = "test-pool",
        Location = "us-central1",
        ServiceLevel = "PREMIUM",
        CapacityGib = "2048",
        Network = peeringNetwork.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/netapp"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/servicenetworking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a network or use datasource to reference existing network
		peeringNetwork, err := compute.NewNetwork(ctx, "peering_network", &compute.NetworkArgs{
			Name: pulumi.String("test-network"),
		})
		if err != nil {
			return err
		}
		// Reserve a CIDR for NetApp Volumes to use
		// When using shared-VPCs, this resource needs to be created in host project
		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
			Name:         pulumi.String("test-address"),
			Purpose:      pulumi.String("VPC_PEERING"),
			AddressType:  pulumi.String("INTERNAL"),
			PrefixLength: pulumi.Int(16),
			Network:      peeringNetwork.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		// Create a Private Service Access connection
		// When using shared-VPCs, this resource needs to be created in host project
		_default, err := servicenetworking.NewConnection(ctx, "default", &servicenetworking.ConnectionArgs{
			Network: peeringNetwork.ID().ToIDOutput().ToStringOutput(),
			Service: pulumi.String("netapp.servicenetworking.goog"),
			ReservedPeeringRanges: pulumi.StringArray{
				privateIpAlloc.Name,
			},
		})
		if err != nil {
			return err
		}
		// Modify the PSA Connection to allow import/export of custom routes
		// When using shared-VPCs, this resource needs to be created in host project
		_, err = compute.NewNetworkPeeringRoutesConfig(ctx, "route_updates", &compute.NetworkPeeringRoutesConfigArgs{
			Peering:            _default.Peering,
			Network:            peeringNetwork.Name,
			ImportCustomRoutes: pulumi.Bool(true),
			ExportCustomRoutes: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		// Create a storage pool
		// Create this resource in the project which is expected to own the volumes
		_, err = netapp.NewStoragePool(ctx, "test_pool", &netapp.StoragePoolArgs{
			Name:         pulumi.String("test-pool"),
			Location:     pulumi.String("us-central1"),
			ServiceLevel: pulumi.String("PREMIUM"),
			CapacityGib:  pulumi.String("2048"),
			Network:      peeringNetwork.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

# Create a network or use datasource to reference existing network
resource "gcp_compute_network" "peering_network" {
  name = "test-network"
}
# Reserve a CIDR for NetApp Volumes to use
# When using shared-VPCs, this resource needs to be created in host project
resource "gcp_compute_globaladdress" "private_ip_alloc" {
  name          = "test-address"
  purpose       = "VPC_PEERING"
  address_type  = "INTERNAL"
  prefix_length = 16
  network       = gcp_compute_network.peering_network.id
}
# Create a Private Service Access connection
# When using shared-VPCs, this resource needs to be created in host project
resource "gcp_servicenetworking_connection" "default" {
  network                 = gcp_compute_network.peering_network.id
  service                 = "netapp.servicenetworking.goog"
  reserved_peering_ranges = [gcp_compute_globaladdress.private_ip_alloc.name]
}
# Modify the PSA Connection to allow import/export of custom routes
# When using shared-VPCs, this resource needs to be created in host project
resource "gcp_compute_networkpeeringroutesconfig" "route_updates" {
  peering              = gcp_servicenetworking_connection.default.peering
  network              = gcp_compute_network.peering_network.name
  import_custom_routes = true
  export_custom_routes = true
}
# Create a storage pool
# Create this resource in the project which is expected to own the volumes
resource "gcp_netapp_storagepool" "test_pool" {
  name          = "test-pool"
  location      = "us-central1"
  service_level = "PREMIUM"
  capacity_gib  = "2048"
  network       = gcp_compute_network.peering_network.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.compute.NetworkPeeringRoutesConfig;
import com.pulumi.gcp.compute.NetworkPeeringRoutesConfigArgs;
import com.pulumi.gcp.netapp.StoragePool;
import com.pulumi.gcp.netapp.StoragePoolArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
        // Create a network or use datasource to reference existing network
        var peeringNetwork = new Network("peeringNetwork", NetworkArgs.builder()
            .name("test-network")
            .build());

        // Reserve a CIDR for NetApp Volumes to use
        // When using shared-VPCs, this resource needs to be created in host project
        var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
            .name("test-address")
            .purpose("VPC_PEERING")
            .addressType("INTERNAL")
            .prefixLength(16)
            .network(peeringNetwork.id())
            .build());

        // Create a Private Service Access connection
        // When using shared-VPCs, this resource needs to be created in host project
        var default_ = new Connection("default", ConnectionArgs.builder()
            .network(peeringNetwork.id())
            .service("netapp.servicenetworking.goog")
            .reservedPeeringRanges(privateIpAlloc.name())
            .build());

        // Modify the PSA Connection to allow import/export of custom routes
        // When using shared-VPCs, this resource needs to be created in host project
        var routeUpdates = new NetworkPeeringRoutesConfig("routeUpdates", NetworkPeeringRoutesConfigArgs.builder()
            .peering(default_.peering())
            .network(peeringNetwork.name())
            .importCustomRoutes(true)
            .exportCustomRoutes(true)
            .build());

        // Create a storage pool
        // Create this resource in the project which is expected to own the volumes
        var testPool = new StoragePool("testPool", StoragePoolArgs.builder()
            .name("test-pool")
            .location("us-central1")
            .serviceLevel("PREMIUM")
            .capacityGib("2048")
            .network(peeringNetwork.id())
            .build());

    }
}
resources:
  # Create a network or use datasource to reference existing network
  peeringNetwork:
    type: gcp:compute:Network
    name: peering_network
    properties:
      name: test-network
  # Reserve a CIDR for NetApp Volumes to use
  # When using shared-VPCs, this resource needs to be created in host project
  privateIpAlloc:
    type: gcp:compute:GlobalAddress
    name: private_ip_alloc
    properties:
      name: test-address
      purpose: VPC_PEERING
      addressType: INTERNAL
      prefixLength: 16
      network: ${peeringNetwork.id}
  # Create a Private Service Access connection
  # When using shared-VPCs, this resource needs to be created in host project
  default:
    type: gcp:servicenetworking:Connection
    properties:
      network: ${peeringNetwork.id}
      service: netapp.servicenetworking.goog
      reservedPeeringRanges:
        - ${privateIpAlloc.name}
  # Modify the PSA Connection to allow import/export of custom routes
  # When using shared-VPCs, this resource needs to be created in host project
  routeUpdates:
    type: gcp:compute:NetworkPeeringRoutesConfig
    name: route_updates
    properties:
      peering: ${default.peering}
      network: ${peeringNetwork.name}
      importCustomRoutes: true
      exportCustomRoutes: true
  # Create a storage pool
  # Create this resource in the project which is expected to own the volumes
  testPool:
    type: gcp:netapp:StoragePool
    name: test_pool
    properties:
      name: test-pool
      location: us-central1
      serviceLevel: PREMIUM
      capacityGib: '2048'
      network: ${peeringNetwork.id}

Import

StoragePool can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/storagePools/{{name}}
  • {{project}}/{{location}}/{{name}}
  • {{location}}/{{name}}

When using the pulumi import command, StoragePool can be imported using one of the formats above. For example:

$ pulumi import gcp:netapp/storagePool:StoragePool default projects/{{project}}/locations/{{location}}/storagePools/{{name}}
$ pulumi import gcp:netapp/storagePool:StoragePool default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:netapp/storagePool:StoragePool default {{location}}/{{name}}

Constructors

StoragePool(String name, {StoragePoolArgs? args, CustomResourceOptions? options})
Creates a new StoragePool. name The Pulumi resource name. args Arguments used to configure this StoragePool. The set of arguments for StoragePool. options Resource options controlling this resource's behavior.
StoragePool.reference(String urn)
Creates a typed reference to an existing StoragePool resource.

Properties

activeDirectory ↔ Output<String?>
Specifies the Active Directory policy to be used. Format: projects/{{project}}/locations/{{location}}/activeDirectories/{{name}}. The policy needs to be in the same location as the storage pool.
latefinal
allowAutoTiering ↔ Output<bool?>
Optional. True if the storage pool supports Auto Tiering enabled volumes. Default is false. Auto-tiering can be enabled after storage pool creation but it can't be disabled once enabled.
latefinal
availableThroughputMibps ↔ Output<double>
Available throughput of the storage pool (in MiB/s).
latefinal
capacityGib ↔ Output<String>
Capacity of the storage pool (in GiB).
latefinal
childResources → Set<Resource>
finalinherited
coldTierSizeUsedGib ↔ Output<String>
Total cold tier data rounded down to the nearest GiB used by the storage pool.
latefinal
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
customPerformanceEnabled ↔ Output<bool>
Optional. True if using Independent Scaling of capacity and performance (Hyperdisk). Default is false.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
description ↔ Output<String?>
An optional description of this resource.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
enableHotTierAutoResize ↔ Output<bool?>
Flag indicating that the hot-tier threshold will be auto-increased by 10% of the hot-tier when it hits 100%. Default is true. The increment will kick in only if the new size after increment is still less than or equal to storage pool size.
latefinal
encryptionType ↔ Output<String>
Reports if volumes in the pool are encrypted using a Google-managed encryption key or CMEK.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
hotTierSizeGib ↔ Output<String?>
Total hot tier capacity for the Storage Pool. It is applicable only to Flex service level. It should be less than the minimum storage pool size and cannot be more than the current storage pool size. It cannot be decreased once set.
latefinal
hotTierSizeUsedGib ↔ Output<String>
Total hot tier data rounded down to the nearest GiB used by the storage pool.
latefinal
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
kmsConfig ↔ Output<String?>
Specifies the CMEK policy to be used for volume encryption. Format: projects/{{project}}/locations/{{location}}/kmsConfigs/{{name}}. The policy needs to be in the same location as the storage pool.
latefinal
labels ↔ Output<Map<String, String>?>
Labels as key value pairs. Example: { "owner": "Bob", "department": "finance", "purpose": "testing" }.
latefinal
ldapEnabled ↔ Output<bool?>
When enabled, the volumes uses Active Directory as LDAP name service for UID/GID lookups. Required to enable extended group support for NFSv3, using security identifiers for NFSv4.1 or principal names for kerberized NFSv4.1.
latefinal
location ↔ Output<String>
Name of the location. For zonal Flex pools specify a zone name, in all other cases a region name.
latefinal
mode ↔ Output<String>
Mode of the storage pool. The operational mode of the storage pool. ONTAP mode enables operations via ONTAP Mode APIs, while DEFAULT mode enables operations via NetApp Volumes APIs. If not specified during creation, the mode defaults to DEFAULT. Possible values are: MODE_UNSPECIFIED, DEFAULT, ONTAP.
latefinal
name ↔ Output<String>
The resource name of the storage pool. Needs to be unique per location/region.
latefinal
network ↔ Output<String>
VPC network name with format: projects/{{project}}/global/networks/{{network}}
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
qosType ↔ Output<String>
QoS (Quality of Service) type of the storage pool. Possible values are: AUTO, MANUAL. Possible values are: QOS_TYPE_UNSPECIFIED, AUTO, MANUAL.
latefinal
replicaZone ↔ Output<String?>
Specifies the replica zone for regional Flex pools. zone and replicaZone values can be swapped to initiate a zone switch.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scaleTier ↔ Output<String>
(Optional, Beta, Deprecated) The effective scale tier of the storage pool. If scaleTier is not specified during creation, this defaults to SCALE_TIER_STANDARD. Possible values are: SCALE_TIER_UNSPECIFIED, SCALE_TIER_STANDARD, SCALE_TIER_ENTERPRISE.
latefinal
scaleType ↔ Output<String>
The scale type of the storage pool. Defaults to SCALE_TYPE_DEFAULT if not specified. Possible values are: SCALE_TYPE_UNSPECIFIED, SCALE_TYPE_DEFAULT, SCALE_TYPE_SCALEOUT.
latefinal
serviceLevel ↔ Output<String>
Service level of the storage pool. Possible values are: PREMIUM, EXTREME, STANDARD, FLEX.
latefinal
totalIops ↔ Output<String>
Optional. Custom Performance Total IOPS of the pool If not provided, it will be calculated based on the totalThroughputMibps
latefinal
totalThroughputMibps ↔ Output<String>
Optional. Custom Performance Total Throughput of the pool (in MiB/s).
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
type ↔ Output<String>
Type of the storage pool. This field is used to control whether the pool supports FILE based volumes only or UNIFIED (both FILE and BLOCK) volumes. If not specified during creation, it defaults to FILE. Possible values are: STORAGE_POOL_TYPE_UNSPECIFIED, FILE, UNIFIED.
latefinal
urn ↔ Output<String>
latefinalinherited
volumeCapacityGib ↔ Output<String>
Size allocated to volumes in the storage pool (in GiB).
latefinal
volumeCount ↔ Output<int>
Number of volume in the storage pool.
latefinal
zone ↔ Output<String>
Specifies the active zone for regional Flex pools. zone and replicaZone values can be swapped to initiate a zone switch. If you want to create a zonal Flex pool, specify a zone name for location and omit zone.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {StoragePoolState? state, CustomResourceOptions? options}) → StoragePool
Gets an existing StoragePool resource's state with the given name and id.