Skip to content

Latest commit

 

History

History
111 lines (85 loc) · 1.88 KB

digitalocean_volume_snapshot.md

File metadata and controls

111 lines (85 loc) · 1.88 KB

digitalocean_volume_snapshot

back

Index

Terraform

terraform {
  required_providers {
    digitalocean = ">= 2.7.0"
  }
}

top

Example Usage

module "digitalocean_volume_snapshot" {
  source = "./modules/digitalocean/r/digitalocean_volume_snapshot"

  # name - (required) is a type of string
  name = null
  # tags - (optional) is a type of set of string
  tags = []
  # volume_id - (required) is a type of string
  volume_id = null
}

top

Variables

variable "name" {
  description = "(required)"
  type        = string
}

variable "tags" {
  description = "(optional)"
  type        = set(string)
  default     = null
}

variable "volume_id" {
  description = "(required)"
  type        = string
}

top

Resource

resource "digitalocean_volume_snapshot" "this" {
  # name - (required) is a type of string
  name = var.name
  # tags - (optional) is a type of set of string
  tags = var.tags
  # volume_id - (required) is a type of string
  volume_id = var.volume_id
}

top

Outputs

output "created_at" {
  description = "returns a string"
  value       = digitalocean_volume_snapshot.this.created_at
}

output "id" {
  description = "returns a string"
  value       = digitalocean_volume_snapshot.this.id
}

output "min_disk_size" {
  description = "returns a number"
  value       = digitalocean_volume_snapshot.this.min_disk_size
}

output "regions" {
  description = "returns a set of string"
  value       = digitalocean_volume_snapshot.this.regions
}

output "size" {
  description = "returns a number"
  value       = digitalocean_volume_snapshot.this.size
}

output "this" {
  value = digitalocean_volume_snapshot.this
}

top