File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
examples/Microsoft.RecoveryServices_vaults_backupconfig@2024-04-01 Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ azapi = {
4
+ source = " Azure/azapi"
5
+ }
6
+ }
7
+ }
8
+
9
+ provider "azapi" {
10
+ skip_provider_registration = false
11
+ }
12
+
13
+ variable "resource_name" {
14
+ type = string
15
+ default = " acctest0001"
16
+ }
17
+
18
+ variable "location" {
19
+ type = string
20
+ default = " westeurope"
21
+ }
22
+
23
+ resource "azapi_resource" "resourceGroup" {
24
+ type = " Microsoft.Resources/resourceGroups@2020-06-01"
25
+ name = var. resource_name
26
+ location = var. location
27
+ }
28
+
29
+ resource "azapi_resource" "vault" {
30
+ type = " Microsoft.RecoveryServices/vaults@2024-04-01"
31
+ parent_id = azapi_resource. resourceGroup . id
32
+ name = var. resource_name
33
+ location = var. location
34
+ body = {
35
+ properties = {
36
+ publicNetworkAccess = " Enabled"
37
+ }
38
+ sku = {
39
+ name = " Standard"
40
+ }
41
+ }
42
+ schema_validation_enabled = false
43
+ response_export_values = [" *" ]
44
+ }
45
+
46
+ resource "azapi_update_resource" "softDeleteRetentionPeriodInDays" {
47
+ type = " Microsoft.RecoveryServices/vaults/backupconfig@2024-04-01"
48
+ parent_id = azapi_resource. vault . id
49
+ name = " vaultconfig"
50
+ body = {
51
+ properties = {
52
+ softDeleteRetentionPeriodInDays = 14
53
+ }
54
+ }
55
+ }
You can’t perform that action at this time.
0 commit comments