back
terraform {
required_providers {
azurerm = ">= 2.54.0"
}
}
top
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
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
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
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