Skip to content

Commit 1a735b2

Browse files
committed
documentation for version 1.0
1 parent 6d0037d commit 1a735b2

File tree

5 files changed

+123
-10
lines changed

5 files changed

+123
-10
lines changed

README.md

Lines changed: 116 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module "redis" {
7676
# Creating Private Endpoint requires, VNet name and address prefix to create a subnet
7777
# By default this will create a `privatelink.mysql.database.azure.com` DNS zone.
7878
# To use existing private DNS zone specify `existing_private_dns_zone` with valid zone name
79-
# Private endpoints doesn't work If using `subnet_id` to create redis cache inside a specified virtual network
79+
# Private endpoints doesn't work If using `subnet_id` to create redis inside a specified VNet.
8080
enable_private_endpoint = true
8181
virtual_network_name = "vnet-shared-hub-westeurope-001"
8282
private_subnet_address_prefix = ["10.1.5.0/29"]
@@ -95,5 +95,118 @@ module "redis" {
9595
}
9696
```
9797

98-
Schedule maintenance for Redis. The default maintenance window is 5 hours
99-
This does not cover any maintenance done by Azure for updating the underlying platform.
98+
## `redis_server_settings` - Azure Cache for Redis Server Settings
99+
100+
## `redis_configuration` - Azure Cache for Redis configuration
101+
102+
## Advanced Usage of the Module
103+
104+
### Memory Management
105+
106+
### Non-SSL port
107+
108+
### Firewall Rules
109+
110+
### Virtual network
111+
112+
### Data Persistence
113+
114+
### Patching Schedule
115+
116+
### Cluster Support
117+
118+
### Zones
119+
120+
### Private Link to Azure Database for MySQL
121+
122+
Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. Private Endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet.
123+
124+
With Private Link, Microsoft offering the ability to associate a logical server to a specific private IP address (also known as private endpoint) within the VNet. Clients can connect to the Private endpoint from the same VNet, peered VNet in same region, or via VNet-to-VNet connection across regions. Additionally, clients can connect from on-premises using ExpressRoute, private peering, or VPN tunneling.
125+
126+
By default, this feature not enabled on this module. To create private link with private endpoints set the variable `enable_private_endpoint` to `true` and provide `virtual_network_name`, `private_subnet_address_prefix` with a valid values. You can also use the existing private DNS zone to create DNS records. To use this feature, set the `existing_private_dns_zone` with a valid existing private DNS zone name.
127+
128+
For more details: [Private Link for Azure Database for MySQL](https://docs.microsoft.com/en-us/azure/mysql/concepts-data-access-security-private-link)
129+
130+
> [!IMPORTANT]
131+
> There is a `publicNetworkAccess` flag which is `Disabled` by default. This flag is meant to allow you to optionally allow both public and private endpoint access to the cache if it is set to `Enabled`. If set to `Disabled`, it will only allow private endpoint access. You can set the value to `Disabled` or `Enabled`.
132+
>
133+
## Recommended naming and tagging conventions
134+
135+
Applying tags to your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. For example, you can apply the name `Environment` and the value `Production` to all the resources in production.
136+
For recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.
137+
138+
> [!IMPORTANT]
139+
> Tag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**
140+
>
141+
142+
An effective naming convention assembles resource names by using important resource information as parts of a resource's name. For example, using these [recommended naming conventions](https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging#example-names), a public IP resource for a production SharePoint workload is named like this: `pip-sharepoint-prod-westus-001`.
143+
144+
## Requirements
145+
146+
| Name | Version |
147+
|------|---------|
148+
| terraform | >= 0.13 |
149+
| azurerm | >= 2.59.0 |
150+
151+
## Providers
152+
153+
| Name | Version |
154+
|------|---------|
155+
| azurerm | >= 2.59.0 |
156+
| random |>= 3.1.0 |
157+
158+
## Inputs
159+
160+
| Name | Description | Type | Default |
161+
|--|--|--|--|
162+
`create_resource_group` | Whether to create resource group and use it for all networking resources | string | `"false"`
163+
`resource_group_name` | The name of the resource group in which resources are created | string | `""`
164+
`location` | The location of the resource group in which resources are created | string | `""`
165+
`log_analytics_workspace_name`|The name of log analytics workspace name|string|`null`
166+
`redis_instance_name`|The name of the Redis instance|string|`""`
167+
`redis_family`|The SKU family/pricing group to use. Valid values are `C` (for `Basic/Standard` SKU family) and `P` (for `Premium`)|map(any)|`{}`
168+
`redis_server_settings`|optional redis server setttings for both Premium and Standard/Basic SKU|map(object({}))|`{}`
169+
`patch_schedule`|The window for redis maintenance. The Patch Window lasts for 5 hours from the `start_hour_utc`|object({})|`null`
170+
`subnet_id`|The ID of the Subnet within which the Redis Cache should be deployed. Only available when using the Premium SKU|string|`null`
171+
`redis_configuration`|Memory and other optional configuration for the Redis instance|object({})|`{}`
172+
`storage_account_name`|The name of the storage account name|string|`null`
173+
`enable_data_persistence`|`Enable` or `disbale` Redis Database Backup. Only supported on Premium SKU's|string|`false`
174+
`data_persistence_backup_frequency`|The Backup Frequency in Minutes. Only supported on Premium SKU's. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`|number|`60`
175+
`data_persistence_backup_max_snapshot_count`|The maximum number of snapshots to create as a backup. Only supported for Premium SKU's|number|`1`
176+
`firewall_rules`|Range of IP addresses to allow firewall connections. Azure Cache for Redis firewall filter rules are used to provide specific source IP access. Azure Redis Cache access is determined based on start and end IP address range specified. As a rule, only specific IP addresses should be granted access, and all others denied.|map(object({}))|`null`
177+
`enable_private_endpoint`|Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link|string|`"false"`
178+
`virtual_network_name` | The name of the virtual network|string|`""`
179+
`private_subnet_address_prefix`|A list of subnets address prefixes inside virtual network| list |`[]`
180+
`existing_private_dns_zone`|Name of the existing private DNS zone|string|`null`
181+
`Tags` | A map of tags to add to all resources | map | `{}`
182+
183+
# Outputs
184+
185+
| Name | Description |
186+
|--|--|
187+
`redis_cache_instance_id`|The Route ID of Redis Cache Instance
188+
`redis_cache_hostname`|The Hostname of the Redis Instance
189+
`redis_cache_ssl_port`|The SSL Port of the Redis Instance
190+
`redis_cache_port`|The non-SSL Port of the Redis Instance
191+
`redis_cache_primary_access_key`|The Primary Access Key for the Redis Instance
192+
`redis_cache_secondary_access_key`|The Secondary Access Key for the Redis Instance
193+
`redis_cache_primary_connection_string`|The primary connection string of the Redis Instance
194+
`redis_cache_secondary_connection_string`|The secondary connection string of the Redis Instance
195+
`redis_configuration_maxclients`|Returns the max number of connected clients at the same time
196+
`redis_cache_private_endpoint`|id of the Redis Cache server Private Endpoint
197+
`redis_cache_private_dns_zone_domain`|DNS zone name of Redis Cache server Private endpoints dns name records
198+
`redis_cache_private_endpoint_ip`|Redis Cache server private endpoint IPv4 Addresses
199+
`redis_cache_private_endpoint_fqdn`|Redis Cache server private endpoint FQDN Addresses
200+
201+
## Resource Graph
202+
203+
![Resource Graph](graph.png)
204+
205+
## Authors
206+
207+
Originally created by [Kumaraswamy Vithanala](mailto:[email protected])
208+
209+
## Other resources
210+
211+
* [Azure Cache for Redis](https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/)
212+
* [Terraform AzureRM Provider Documentation](https://www.terraform.io/docs/providers/azurerm/index.html)

examples/Azure_Cache_for_Redis_with_Private_Endpoint/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module "redis" {
6666
# Creating Private Endpoint requires, VNet name and address prefix to create a subnet
6767
# By default this will create a `privatelink.mysql.database.azure.com` DNS zone.
6868
# To use existing private DNS zone specify `existing_private_dns_zone` with valid zone name
69-
# Private endpoints doesn't work If using `subnet_id` to create redis cache inside a specified virtual network
69+
# Private endpoints doesn't work If using `subnet_id` to create redis inside a specified VNet.
7070
enable_private_endpoint = true
7171
virtual_network_name = "vnet-shared-hub-westeurope-001"
7272
private_subnet_address_prefix = ["10.1.5.0/29"]

examples/Azure_Cache_for_Redis_with_Private_Endpoint/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module "redis" {
5757
# Creating Private Endpoint requires, VNet name and address prefix to create a subnet
5858
# By default this will create a `privatelink.mysql.database.azure.com` DNS zone.
5959
# To use existing private DNS zone specify `existing_private_dns_zone` with valid zone name
60-
# Private endpoints doesn't work If using `subnet_id` to create redis cache inside a specified virtual network
60+
# Private endpoints doesn't work If using `subnet_id` to create redis inside a specified VNet.
6161
enable_private_endpoint = true
6262
virtual_network_name = "vnet-shared-hub-westeurope-001"
6363
private_subnet_address_prefix = ["10.1.5.0/29"]

output.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ output "redis_cache_private_dns_zone_domain" {
5959
}
6060

6161
output "redis_cache_private_endpoint_ip" {
62-
description = "Redis Cache server private endpoint IPv4 Addresses "
62+
description = "Redis Cache server private endpoint IPv4 Addresses"
6363
value = var.enable_private_endpoint ? element(concat(data.azurerm_private_endpoint_connection.private-ip1.*.private_service_connection.0.private_ip_address, [""]), 0) : null
6464
}
6565

6666
output "redis_cache_private_endpoint_fqdn" {
67-
description = "Redis Cache server private endpoint FQDN Addresses "
67+
description = "Redis Cache server private endpoint FQDN Addresses"
6868
value = var.enable_private_endpoint ? element(concat(azurerm_private_dns_a_record.arecord1.*.fqdn, [""]), 0) : null
6969
}
7070

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ variable "patch_schedule" {
5959
}
6060

6161
variable "subnet_id" {
62-
description = "The ID of the Subnet within which the Redis Cache should be deployed. Only available when using the Premium SKU and this subnet s "
62+
description = "The ID of the Subnet within which the Redis Cache should be deployed. Only available when using the Premium SKU"
6363
default = null
6464
}
6565

@@ -82,7 +82,7 @@ variable "storage_account_name" {
8282
}
8383

8484
variable "enable_data_persistence" {
85-
description = " Enable or disbale Redis Database Backup. Only supported on Premium SKU's"
85+
description = "Enable or disbale Redis Database Backup. Only supported on Premium SKU's"
8686
default = false
8787
}
8888

@@ -106,7 +106,7 @@ variable "firewall_rules" {
106106
}
107107

108108
variable "enable_private_endpoint" {
109-
description = "Manages a Private Endpoint to Azure database for MySQL"
109+
description = "Manages a Private Endpoint to Azure database for Redis"
110110
default = false
111111
}
112112

0 commit comments

Comments
 (0)