Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
389 stars 84 forks source link

Azure Database for MySQL should have backup configured #1835

Closed BenjaminEngeset closed 1 year ago

BenjaminEngeset commented 1 year ago

Rule request

Suggested rule change

Azure Database for MySQL should have backups of the data files and the transaction log.

Applies to the following

The rule applies to the following:

Additional context

Lets use the Reliability pillar for this one.

BernieWhite commented 1 year ago

@bengeset96 From my understanding backup is always on and can't be turned off. Based on this:

Azure Database for MySQL takes backups of the data files and the transaction log. These backups allow you to restore a server to any point-in-time within your configured backup retention period. The default backup retention period is seven days. You can optionally configure it up to 35 days.

https://learn.microsoft.com/en-gb/azure/mysql/single-server/concepts-backup#backups

The primary means of controlling the backup storage cost is by setting the appropriate backup retention period and choosing the right backup redundancy options to meet your desired recovery goals. You can select a retention period from a range of 7 to 35 days. General Purpose and Memory Optimized servers can choose to have geo-redundant storage for backups.

https://learn.microsoft.com/en-gb/azure/mysql/single-server/concepts-backup#backup-storage-cost

BenjaminEngeset commented 1 year ago

@BernieWhite

You are correct. I taught when setting explictly a value of int 0 on the property, it would not be configured. That is for sure not the case, since I did a test deployment now with the property declared and gave it 0. Backup retention period was 7 days.

Lets close this issue as wont do due to the obvious now.

BernieWhite commented 1 year ago

A rule like this to require the minimum retention would probably be a good idea for PSRule for CAF but from a WAF point of view I don't think we have a strong case for requiring a minimum retention.

BenjaminEngeset commented 1 year ago

A rule like this to require the minimum retention would probably be a good idea for PSRule for CAF but from a WAF point of view I don't think we have a strong case for requiring a minimum retention.

Agreed. Lets try to stick to things that is particularly relevant for PSRule for Azure and gives value.