Skip to content

Latest commit

 

History

History
128 lines (100 loc) · 2.33 KB

digitalocean_droplet_snapshot.md

File metadata and controls

128 lines (100 loc) · 2.33 KB

digitalocean_droplet_snapshot

back

Index

Terraform

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

top

Example Usage

module "digitalocean_droplet_snapshot" {
  source = "./modules/digitalocean/d/digitalocean_droplet_snapshot"

  # most_recent - (optional) is a type of bool
  most_recent = null
  # name - (optional) is a type of string
  name = null
  # name_regex - (optional) is a type of string
  name_regex = null
  # region - (optional) is a type of string
  region = null
}

top

Variables

variable "most_recent" {
  description = "(optional)"
  type        = bool
  default     = null
}

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

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

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

top

Datasource

data "digitalocean_droplet_snapshot" "this" {
  # most_recent - (optional) is a type of bool
  most_recent = var.most_recent
  # name - (optional) is a type of string
  name = var.name
  # name_regex - (optional) is a type of string
  name_regex = var.name_regex
  # region - (optional) is a type of string
  region = var.region
}

top

Outputs

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

output "droplet_id" {
  description = "returns a string"
  value       = data.digitalocean_droplet_snapshot.this.droplet_id
}

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

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

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

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

output "this" {
  value = digitalocean_droplet_snapshot.this
}

top