Skip to content

Commit 3d34217

Browse files
authored
Updated Microsoft.Cache/redisEnterprise and /databases examples (#1008)
* Updated redisEnterprise examples * Moved identity block to root
1 parent b7ef694 commit 3d34217

File tree

5 files changed

+50
-17
lines changed

5 files changed

+50
-17
lines changed

docs/resources/Microsoft.Cache_redisEnterprise.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: |-
99

1010
This article demonstrates how to use `azapi` provider to manage the Redis Enterprise Cluster resource in Azure.
1111

12-
12+
!> **Note:** Redis Enterprise (Microsoft.Cache/redisEnterprise) is also known as Azure Managed Redis. It requires a Microsoft.Cache/redisEnterprise/databases child resource to function properly. See https://learn.microsoft.com/azure/redis/overview for more information.
1313

1414
## Example Usage
1515

@@ -45,19 +45,26 @@ resource "azapi_resource" "resourceGroup" {
4545
}
4646
4747
resource "azapi_resource" "redisEnterprise" {
48-
type = "Microsoft.Cache/redisEnterprise@2022-01-01"
48+
type = "Microsoft.Cache/redisEnterprise@2025-04-01"
4949
parent_id = azapi_resource.resourceGroup.id
5050
name = var.resource_name
5151
location = var.location
5252
body = {
5353
properties = {
5454
minimumTlsVersion = "1.2"
55+
encryption = {}
56+
highAvailability = "Enabled"
5557
}
5658
sku = {
57-
capacity = 2
58-
name = "Enterprise_E100"
59+
name = "Balanced_B0"
5960
}
6061
}
62+
63+
identity {
64+
type = "SystemAssigned"
65+
identity_ids = []
66+
}
67+
6168
schema_validation_enabled = false
6269
response_export_values = ["*"]
6370
}

docs/resources/Microsoft.Cache_redisEnterprise_databases.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,32 @@ resource "azapi_resource" "resourceGroup" {
4545
}
4646
4747
resource "azapi_resource" "redisEnterprise" {
48-
type = "Microsoft.Cache/redisEnterprise@2024-10-01"
48+
type = "Microsoft.Cache/redisEnterprise@2025-04-01"
4949
parent_id = azapi_resource.resourceGroup.id
5050
name = var.resource_name
5151
location = var.location
5252
body = {
5353
properties = {
5454
minimumTlsVersion = "1.2"
55+
encryption = {}
56+
highAvailability = "Enabled"
5557
}
5658
sku = {
57-
capacity = 4
58-
name = "Enterprise_E20"
59+
name = "Balanced_B0"
5960
}
6061
}
62+
63+
identity {
64+
type = "SystemAssigned"
65+
identity_ids = []
66+
}
67+
68+
schema_validation_enabled = false
69+
response_export_values = ["*"]
6170
}
6271
63-
resource "azapi_resource" "databas" {
64-
type = "Microsoft.Cache/redisEnterprise/databases@2024-10-01"
72+
resource "azapi_resource" "defaultDatabase" {
73+
type = "Microsoft.Cache/redisEnterprise/databases@2025-04-01"
6574
parent_id = azapi_resource.redisEnterprise.id
6675
name = "default"
6776
body = {

examples/Microsoft.Cache_redisEnterprise@2022-01-01/main.tf renamed to examples/Microsoft.Cache_redisEnterprise@2025-04-01/main.tf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,26 @@ resource "azapi_resource" "resourceGroup" {
2727
}
2828

2929
resource "azapi_resource" "redisEnterprise" {
30-
type = "Microsoft.Cache/redisEnterprise@2022-01-01"
30+
type = "Microsoft.Cache/redisEnterprise@2025-04-01"
3131
parent_id = azapi_resource.resourceGroup.id
3232
name = var.resource_name
3333
location = var.location
3434
body = {
3535
properties = {
3636
minimumTlsVersion = "1.2"
37+
encryption = {}
38+
highAvailability = "Enabled"
3739
}
3840
sku = {
39-
capacity = 2
40-
name = "Enterprise_E100"
41+
name = "Balanced_B0"
4142
}
4243
}
44+
45+
identity {
46+
type = "SystemAssigned"
47+
identity_ids = []
48+
}
49+
4350
schema_validation_enabled = false
4451
response_export_values = ["*"]
4552
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!> **Note:** Redis Enterprise (Microsoft.Cache/redisEnterprise) is also known as Azure Managed Redis. It requires a Microsoft.Cache/redisEnterprise/databases child resource to function properly. See https://learn.microsoft.com/azure/redis/overview for more information.

examples/Microsoft.Cache_redisEnterprise_databases@2024-10-01/main.tf renamed to examples/Microsoft.Cache_redisEnterprise_databases@2025-04-01/main.tf

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,32 @@ resource "azapi_resource" "resourceGroup" {
2727
}
2828

2929
resource "azapi_resource" "redisEnterprise" {
30-
type = "Microsoft.Cache/redisEnterprise@2024-10-01"
30+
type = "Microsoft.Cache/redisEnterprise@2025-04-01"
3131
parent_id = azapi_resource.resourceGroup.id
3232
name = var.resource_name
3333
location = var.location
3434
body = {
3535
properties = {
3636
minimumTlsVersion = "1.2"
37+
encryption = {}
38+
highAvailability = "Enabled"
3739
}
3840
sku = {
39-
capacity = 4
40-
name = "Enterprise_E20"
41+
name = "Balanced_B0"
4142
}
4243
}
44+
45+
identity {
46+
type = "SystemAssigned"
47+
identity_ids = []
48+
}
49+
50+
schema_validation_enabled = false
51+
response_export_values = ["*"]
4352
}
4453

45-
resource "azapi_resource" "databas" {
46-
type = "Microsoft.Cache/redisEnterprise/databases@2024-10-01"
54+
resource "azapi_resource" "defaultDatabase" {
55+
type = "Microsoft.Cache/redisEnterprise/databases@2025-04-01"
4756
parent_id = azapi_resource.redisEnterprise.id
4857
name = "default"
4958
body = {

0 commit comments

Comments
 (0)