Skip to content

Commit bb964f2

Browse files
authored
fix: DToSS-7699 Azure SQL Backup Retention config (#759)
* Fix: DTOSS-7699: Add Azure SQL Backup Retention * Fix: DTOSS-7699: Add Azure SQL Backup Retention * Fix: DTOSS-7699: Add Azure SQL Backup Retention * Template versions refs
1 parent 41e0a08 commit bb964f2

11 files changed

Lines changed: 27 additions & 8 deletions

.azuredevops/pipelines/cd-infrastructure-dev-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-dev-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-int-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-int-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-nft-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-nft-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-preprod-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

.azuredevops/pipelines/cd-infrastructure-preprod-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: aa87e2c36c4c3c88d4aeadcef6813e464d68621d
16+
ref: 2f8731f9c7d6b9d53b7044979e381377b2c85bcd
1717
endpoint: NHSDigital
1818

1919
variables:

infrastructure/tf-core/environments/preprod.tfvars

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,14 @@ sqlserver = {
10831083
sku = "S7"
10841084
storage_account_type = "GeoZone"
10851085
zone_redundant = false
1086+
1087+
short_term_retention_policy = 35
1088+
long_term_retention_policy = {
1089+
weekly_retention = "P4W"
1090+
monthly_retention = "P12M"
1091+
yearly_retention = "P10Y"
1092+
week_of_year = 1
1093+
}
10861094
}
10871095
}
10881096

infrastructure/tf-core/sql_server.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ module "azure_sql_server" {
4747
# FW Rules
4848
firewall_rules = var.sqlserver.fw_rules
4949

50+
# Backup Retention Policies
51+
short_term_retention_policy = var.sqlserver.dbs.cohman.short_term_retention_policy
52+
long_term_retention_policy = var.sqlserver.dbs.cohman.long_term_retention_policy
53+
5054
# Private Endpoint Configuration if enabled
5155
private_endpoint_properties = var.features.private_endpoints_enabled ? {
5256
private_dns_zone_ids_sql = [data.terraform_remote_state.hub.outputs.private_dns_zones["${each.key}-azure_sql"].id]

0 commit comments

Comments
 (0)