File tree Expand file tree Collapse file tree 5 files changed +27
-11
lines changed Expand file tree Collapse file tree 5 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,17 @@ module "azure-mysql" {
23
23
<!-- BEGIN_TF_DOCS -->
24
24
## Requirements
25
25
26
- No requirements.
26
+ The following requirements are needed by this module:
27
+
28
+ - terraform (>=1.0.0)
29
+
30
+ - azurerm (>=3.63.0)
27
31
28
32
## Providers
29
33
30
34
The following providers are used by this module:
31
35
32
- - azurerm
36
+ - azurerm (>=3.63.0)
33
37
34
38
## Modules
35
39
@@ -113,8 +117,10 @@ Default: `"mysqladmin"`
113
117
### allowed\_ ips
114
118
115
119
Description: A hash of permissions to access the database server by ip. The hash key is the name suffix and each value
116
- has a start and an end value. For public access set start\_ ip\_ address to 0.0.0.0 and end\_ ip\_ address to
117
- 255.255.255.255. This variable is not used if public\_ access = false.
120
+ has a start and an end value.
121
+
122
+ * For public access set start to 0.0.0.0 and end to 255.255.255.255
123
+ * To allow access from all Azure services to this database, set start and end to 0.0.0.0
118
124
119
125
Type:
120
126
@@ -258,7 +264,6 @@ Description: FQDN of the database service
258
264
259
265
## Development
260
266
261
- Use [ terraform-docs ] ( https://terraform-docs.io/ ) to generate the API documentation by running
267
+ Use [ the terraform module tools ] ( https://github.com/dodevops/terraform-module-tools ) to check and generate the documentation by running
262
268
263
- terraform fmt .
264
- terraform-docs .
269
+ docker run -v "$PWD":/terraform ghcr.io/dodevops/terraform-module-tools:latest
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ resource "azurerm_mysql_flexible_database" "db" {
2
2
for_each = toset (var. database_suffixes )
3
3
resource_group_name = var. resource_group
4
4
server_name = azurerm_mysql_flexible_server. server . name
5
- name = " ${ var . project } ${ var . stage } db${ each . value } "
5
+ name = " ${ var . project } ${ var . stage } db${ var . suffix } ${ each . value } "
6
6
charset = var. charset
7
7
collation = var. collation
8
8
}
Original file line number Diff line number Diff line change 1
1
resource "azurerm_mysql_flexible_server" "server" {
2
- name = " ${ var . project } ${ var . stage } dbsrv"
2
+ name = " ${ var . project } ${ var . stage } dbsrv${ var . suffix } "
3
3
location = var. location
4
4
resource_group_name = var. resource_group
5
5
administrator_login = var. admin_login
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_version = " >=1.0.0"
3
+ required_providers {
4
+ azurerm = {
5
+ source = " hashicorp/azurerm"
6
+ version = " >=3.63.0"
7
+ }
8
+ }
9
+ }
Original file line number Diff line number Diff line change @@ -93,8 +93,10 @@ variable "database_storage_iops" {
93
93
variable "allowed_ips" {
94
94
description = << EOF
95
95
A hash of permissions to access the database server by ip. The hash key is the name suffix and each value
96
- has a start and an end value. For public access set start_ip_address to 0.0.0.0 and end_ip_address to
97
- 255.255.255.255. This variable is not used if public_access = false.
96
+ has a start and an end value.
97
+
98
+ * For public access set start to 0.0.0.0 and end to 255.255.255.255
99
+ * To allow access from all Azure services to this database, set start and end to 0.0.0.0
98
100
EOF
99
101
type = map (object ({
100
102
start = string ,
You can’t perform that action at this time.
0 commit comments