Skip to content

Latest commit

 

History

History
118 lines (91 loc) · 1.97 KB

azurerm_backup_policy_vm.md

File metadata and controls

118 lines (91 loc) · 1.97 KB

azurerm_backup_policy_vm

back

Index

Terraform

terraform {
  required_providers {
    azurerm = ">= 2.54.0"
  }
}

top

Example Usage

module "azurerm_backup_policy_vm" {
  source = "./modules/azurerm/d/azurerm_backup_policy_vm"

  # name - (required) is a type of string
  name = null
  # recovery_vault_name - (required) is a type of string
  recovery_vault_name = null
  # resource_group_name - (required) is a type of string
  resource_group_name = null

  timeouts = [{
    read = null
  }]
}

top

Variables

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

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

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

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      read = string
    }
  ))
  default = []
}

top

Datasource

data "azurerm_backup_policy_vm" "this" {
  # name - (required) is a type of string
  name = var.name
  # recovery_vault_name - (required) is a type of string
  recovery_vault_name = var.recovery_vault_name
  # resource_group_name - (required) is a type of string
  resource_group_name = var.resource_group_name

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # read - (optional) is a type of string
      read = timeouts.value["read"]
    }
  }

}

top

Outputs

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

output "tags" {
  description = "returns a map of string"
  value       = data.azurerm_backup_policy_vm.this.tags
}

output "this" {
  value = azurerm_backup_policy_vm.this
}

top