Azure Recovery Services Vault
This page shows how to write Terraform and Azure Resource Manager for Recovery Services Vault and write them securely.
azurerm_recovery_services_vault (Terraform)
The Vault in Recovery Services can be configured in Terraform with the resource name azurerm_recovery_services_vault. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_recovery_services_vault" "gsa_vault" {
location = var.location
name = "gsa-rsv"
resource_group_name = azurerm_resource_group.first_rg.name
sku = "Standard"
soft_delete_enabled = false
resource "azurerm_recovery_services_vault" "vault" {
name = "terraformrecoveryvault"
resource_group_name = "1-0af1bbb1-playground-sandbox"
location = "East US"
sku = "Standard"
resource "azurerm_recovery_services_vault" "vault" {
name = "cdw-backups-20210528-vault"
location = "eastus2"
resource_group_name = azurerm_resource_group.rg.name
sku = "Standard"
resource "azurerm_recovery_services_vault" "vault" {
name = var.name
resource_group_name = var.resource_group_name
location = var.location
sku = var.sku
# soft_delete_enabled = var.soft_delete
resource "azurerm_recovery_services_vault" "vault" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
sku = var.sku
tags = module.label.tags
resource "azurerm_recovery_services_vault" "vault" {
name = "rsv-hub"
location = var.rg-location
resource_group_name = var.rg-name
sku = "Standard"
resource "azurerm_recovery_services_vault" "vault" {
name = var.recovery_vault_name
location = var.location
resource_group_name = var.resource_group_name
sku = "Standard"
}
resource "azurerm_recovery_services_vault" "ASR" {
name = "cloudquickpocs-asr-001"
location = azurerm_resource_group.ASR.location
resource_group_name = azurerm_resource_group.ASR.name
sku = "Standard"
}
resource "azurerm_recovery_services_vault" "rsvault" {
name = var.rsvault
location = var.location
resource_group_name = var.resource_group
sku = "Standard"
resource "azurerm_recovery_services_vault" "vault" {
name = var.rsv_name
location = var.rsv_location
resource_group_name = var.rsv_rg
sku = "Standard"
soft_delete_enabled = false
Parameters
-
idoptional computed - string -
locationrequired - string -
namerequired - string -
resource_group_namerequired - string -
skurequired - string -
soft_delete_enabledoptional - bool -
tagsoptional - map from string to string -
identitylist block-
principal_idoptional computed - string -
tenant_idoptional computed - string -
typerequired - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages a Recovery Services Vault.
Microsoft.RecoveryServices/vaults (Azure Resource Manager)
The vaults in Microsoft.RecoveryServices can be configured in Azure Resource Manager with the resource name Microsoft.RecoveryServices/vaults. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"recoveryServicesName": {
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workbookName": {
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
Parameters
apiVersionrequired - stringetagoptional - stringOptional ETag.
identityoptionaltyperequired - stringThe type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identities.
userAssignedIdentitiesoptional - undefinedThe list of user-assigned identities associated with the resource. The user-assigned identity dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
locationrequired - stringResource location.
namerequired - stringThe name of the recovery services vault.
propertiesrequiredencryptionoptionalinfrastructureEncryptionoptional - stringEnabling/Disabling the Double Encryption state.
kekIdentityoptionaluserAssignedIdentityoptional - stringThe user assigned identity to be used to grant permissions in case the type of identity used is UserAssigned
useSystemAssignedIdentityoptional - booleanIndicate that system assigned identity should be used. Mutually exclusive with 'userAssignedIdentity' field
keyVaultPropertiesoptionalkeyUrioptional - stringThe key uri of the Customer Managed Key
moveDetailsoptionalupgradeDetailsoptional
skuoptionalcapacityoptional - stringThe sku capacity
familyoptional - stringThe sku family
namerequired - stringThe Sku name.
sizeoptional - stringThe sku size
tieroptional - stringThe Sku tier.
systemDataoptionalcreatedAtoptional - stringThe timestamp of resource creation (UTC).
createdByoptional - stringThe identity that created the resource.
createdByTypeoptional - stringThe type of identity that created the resource.
lastModifiedAtoptional - stringThe type of identity that last modified the resource.
lastModifiedByoptional - stringThe identity that last modified the resource.
lastModifiedByTypeoptional - stringThe type of identity that last modified the resource.
tagsoptional - stringResource tags.
typerequired - string
Frequently asked questions
What is Azure Recovery Services Vault?
Azure Recovery Services Vault is a resource for Recovery Services of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Recovery Services Vault?
For Terraform, the linuxlsr/azureLearning, brypoon/terraform and cwiederspan/cdw-terraform-scratch source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the bwren/bwren, HasanIftakher/Azure-Monitor and tulpy/Azure source code examples are useful. See the Azure Resource Manager Example section for further details.