Skip to content

Commit dfd981e

Browse files
FHS-5749 module policy and instance names variables-document updated with values
1 parent 003e096 commit dfd981e

1 file changed

Lines changed: 16 additions & 39 deletions

File tree

docs/usage.md

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module "my_backup" {
6060
backup_vault_immutability = "Unlocked"
6161
log_analytics_workspace_id = azurerm_log_analytics_workspace.my_workspace.id
6262
use_extended_retention = true
63+
soft_delete = "Off"
6364
6465
tags = {
6566
tagOne = "tagOneValue"
@@ -76,20 +77,13 @@ module "my_backup" {
7677
storage_account_containers = ["container1", "container2"]
7778
}
7879
backup2 = {
79-
backup_name = "storage2"
80-
retention_period = "P30D"
81-
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
82-
storage_account_id = azurerm_storage_account.my_storage_account_2.id
83-
storage_account_containers = ["container1", "container2"]
84-
}
85-
backup3 = {
86-
backup_name = "storage3"
80+
backup_name = "storage2"
8781
retention_period = "P30D"
8882
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
8983
storage_account_id = azurerm_storage_account.my_storage_account_2.id
9084
storage_account_containers = ["container1", "container2"]
91-
backup_policy_naming_template = nhsuk-bkpol-blob3-uks
92-
backup_instance_naming_template = nhsuk-bkinst-blob3-uks
85+
backup_policy_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
86+
backup_instance_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
9387
}
9488
}
9589
managed_disk_backups = {
@@ -104,22 +98,12 @@ module "my_backup" {
10498
}
10599
}
106100
backup2 = {
107-
backup_name = "disk2"
108-
retention_period = "P30D"
109-
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
110-
managed_disk_id = azurerm_managed_disk.my_managed_disk_2.id
111-
managed_disk_resource_group = {
112-
id = azurerm_resource_group.my_resource_group.id
113-
name = azurerm_resource_group.my_resource_group.name
114-
}
115-
}
116-
backup3 = {
117-
backup_name = "disk3"
101+
backup_name = "disk2"
118102
retention_period = "P30D"
119103
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
120104
managed_disk_id = azurerm_managed_disk.my_managed_disk_2.id
121-
backup_policy_naming_template = nhsuk-bkpol-disk3-uks
122-
backup_instance_naming_template = nhsuk-bkinst-disk3-uks
105+
backup_policy_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
106+
backup_instance_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
123107
managed_disk_resource_group = {
124108
id = azurerm_resource_group.my_resource_group.id
125109
name = azurerm_resource_group.my_resource_group.name
@@ -135,20 +119,13 @@ module "my_backup" {
135119
server_resource_group_id = azurerm_resource_group.my_resource_group.id
136120
}
137121
backup2 = {
138-
backup_name = "server2"
139-
retention_period = "P30D"
140-
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
141-
server_id = azurerm_postgresql_flexible_server.my_server_2.id
142-
server_resource_group_id = azurerm_resource_group.my_resource_group.id
143-
}
144-
backup3 = {
145-
backup_name = "server3"
122+
backup_name = "server2"
146123
retention_period = "P30D"
147124
backup_intervals = ["R/2024-01-01T00:00:00+00:00/P2D"]
148125
server_id = azurerm_postgresql_flexible_server.my_server_2.id
149126
server_resource_group_id = azurerm_resource_group.my_resource_group.id
150-
backup_policy_naming_template = nhsuk-bkpol-pgflex3-uks
151-
backup_instance_naming_template = nhsuk-bkinst-pgflex3-uks
127+
backup_policy_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
128+
backup_instance_naming_template = "nhsuk-{resource_abbreviation}-{resource_type}-{backup_name}"
152129
}
153130
}
154131
}
@@ -174,22 +151,22 @@ module "my_backup" {
174151
| `blob_storage_backups.backup_name` | The name of the backup, which must be unique across blob storage backups. | Yes | n/a |
175152
| `blob_storage_backups.retention_period` | How long the backed up data will be retained for, which should be in `ISO 8601` duration format. This must be specified in days, and can be up to 7 days unless `use_extended_retention` is on. [See the following link for more information about the format](https://en.wikipedia.org/wiki/ISO_8601#Durations). | Yes | n/a |
176153
| `blob_storage_backups.backup_intervals` | A list of intervals at which backups should be taken, which should be in `ISO 8601` duration format. [See the following link for the possible values](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals). | Yes | n/a |
177-
| `blob_storage_backups.backup_policy_naming_template` | Naming template allows existing teams to preserve pre-existing blob policy names while enabling consistent naming. | No | {resource_abbreviation}-blob-{backup_name} |
178-
| `blob_storage_backups.backup_instance_naming_template` | Naming template allows existing teams to preserve pre-existing blob instance names while enabling consistent naming. | No | {resource_abbreviation}-blob-{backup_name} |
154+
| `blob_storage_backups.backup_policy_naming_template` | Naming template used to construct the blob backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkpol`, `{resource_type}``blob`, `{backup_name}` → value of `blob_storage_backups.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |
155+
| `blob_storage_backups.backup_instance_naming_template` | Naming template used to construct the blob backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkinst`, `{resource_type}``blob`, `{backup_name}` → value of `blob_storage_backups.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |
179156
| `blob_storage_backups.time_zone` | The time zone to apply to the backup policy schedule (eg. Europe/London). If not specified, Azure’s default time zone behaviour is used. | No | n/a |
180157
| `blob_storage_backups.enable_daily_retention_rule` | Enables an additional daily retention rule on the backup policy. This is optional and intended for scenarios that require explicit daily retention behaviour beyond the default policy configuration. | No | false |
181158
| `managed_disk_backups` | A map of managed disk backups that should be created. For each backup the following values should be provided: `managed_disk_id`, `backup_name` and `retention_period`. When no value is provided then no backups are created. | No | n/a |
182159
| `managed_disk_backups.managed_disk_id` | The id of the managed disk that should be backed up. | Yes | n/a |
183160
| `managed_disk_backups.backup_name` | The name of the backup, which must be unique across managed disk backups. | Yes | n/a |
184161
| `managed_disk_backups.retention_period` | How long the backed up data will be retained for, which should be in `ISO 8601` duration format. This must be specified in days, and can be up to 7 days unless `use_extended_retention` is on. [See the following link for more information about the format](https://en.wikipedia.org/wiki/ISO_8601#Durations). | Yes | n/a |
185162
| `managed_disk_backups.backup_intervals` | A list of intervals at which backups should be taken, which should be in `ISO 8601` duration format. [See the following link for the possible values](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals). | Yes | n/a |
186-
| `managed_disk_backup.backup_policy_naming_template` | Naming template allows existing teams to preserve pre-existing disk policy names while enabling consistent naming. | No | {resource_abbreviation}-disk-{backup_name} |
187-
| `managed_disk_backup.backup_instance_naming_template` | Naming template allows existing teams to preserve pre-existing disk instance names while enabling consistent naming. | No | {resource_abbreviation}-disk-{backup_name} |
163+
| `managed_disk_backup.backup_policy_naming_template` | Naming template used to construct the disk backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkpol`, `{resource_type}``disk`, `{backup_name}` → value of `managed_disk_backup.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |
164+
| `managed_disk_backup.backup_instance_naming_template` | Naming template used to construct the disk backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkinst`, `{resource_type}``disk`, `{backup_name}` → value of `managed_disk_backup.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |
188165
| `postgresql_flexible_server_backups` | A map of postgresql flexible server backups that should be created. For each backup the following values should be provided: `backup_name`, `server_id`, `server_resource_group_id`, `retention_period` and `backup_intervals`. When no value is provided then no backups are created. | No | n/a |
189166
| `postgresql_flexible_server_backups.backup_name` | The name of the backup, which must be unique across postgresql flexible server backups. | Yes | n/a |
190167
| `postgresql_flexible_server_backups.server_id` | The id of the postgresql flexible server that should be backed up. | Yes | n/a |
191168
| `postgresql_flexible_server_backups.server_resource_group_id` | The id of the resource group which the postgresql flexible server resides in. | Yes | n/a |
192169
| `postgresql_flexible_server_backups.retention_period` | How long the backed up data will be retained for, which should be in `ISO 8601` duration format. This must be specified in days, and can be up to 7 days unless `use_extended_retention` is on. [See the following link for more information about the format](https://en.wikipedia.org/wiki/ISO_8601#Durations). | Yes | n/a |
193170
| `postgresql_flexible_server_backups.backup_intervals` | A list of intervals at which backups should be taken, which should be in `ISO 8601` duration format. [See the following link for the possible values](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals). | Yes | n/a |
194-
| `postgresql_flexible_server_backup.backup_policy_naming_template` | Naming template allows existing teams to preserve pre-existing pgflex policy names while enabling consistent naming. | No | {resource_abbreviation}-pgflex-{backup_name} |
195-
| `postgresql_flexible_server_backup.backup_instance_naming_template` | Naming template allows existing teams to preserve pre-existing pgflex instance names while enabling consistent naming. | No | {resource_abbreviation}-pgflex-{backup_name} |
171+
| `postgresql_flexible_server_backup.backup_policy_naming_template` | Naming template used to construct the pgflex server backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkpol`, `{resource_type}``pgflex`, `{backup_name}` → value of `postgresql_flexible_server_backup.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |
172+
| `postgresql_flexible_server_backup.backup_instance_naming_template` | Naming template used to construct the pgflex server backup instance name. The following placeholders are supported and will be replaced by the module: `{resource_abbreviation}``bkinst`, `{resource_type}``pgflex`, `{backup_name}` → value of `postgresql_flexible_server_backup.backup_name` | No | {resource_abbreviation}-{resource_type}-{backup_name} |

0 commit comments

Comments
 (0)