Skip to content

seven_volume (Resource)#

VM storage volume

Example Usage#

# SPDX-License-Identifier: EUPL-1.2
terraform {
  required_providers {
    seven = {
      source = "terraform.scl.example/seven/infrastructure"
    }
  }
}

provider "seven" {
  # example configuration here
}

# To continue successfully, the separation context must already exist and be valid.
# Otherwise, contact the operator to create and provide one.
variable "sc_name" {
  type = string
  description = "The name of a separation context allocated to a tenant of SCL resources (must exist and be known)."
  default = "b"
}

resource "seven_volume" "my_volume" {
  name = "b-vol-01"
  # use data dependency to make sure the context is created before the VM
  separation_context  = var.sc_name
  size_mib           = 10000
}


output "example_context" {
  value = var.sc_name
}

output "example_volume" {
  value = resource.seven_volume.my_volume
}

Schema#

Required#

  • name (String) Unique, immutable name of the Volume within the Separation Context.
  • separation_context (String) The name of the Separation Context containing this Volume.
  • size_mib (Number) Storage capacity in MiB.

Optional#

  • status (String) Computed status of the Volume.
  • url (String) URL pointing to initial data of the Volume in raw format. Make sure that size_mib is at least as large as the required disk space.

Read-Only#

  • id (String) The ID of this resource.
  • resource_version (Number) Resource version used for optimistic concurrency control.