-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure EBS_snapshot_archive using terraform #6262
Configure EBS_snapshot_archive using terraform #6262
Conversation
@@ -22,6 +22,7 @@ backup_plan: | |||
weekly_retention: 14 | |||
monthly_retention: 62 | |||
quarterly_retention: 180 | |||
cold_storage_after : 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cold_storage_after : 8 indicating that recovery points created by the backup system will be moved to cold storage after 8 days from their creation, as mentioned on the console as well in staging environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dannyroberts This PR looks in good shape, before merging it, I want to ensure that you are okay with the change where we move our quarterly backups to cold storage after 8 days? Let me know if you want this value to be larger or smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We chatted in the meeting today, but yeah 8 days sounds good to me!
@@ -88,6 +88,8 @@ resource "aws_backup_plan" "business_continuity_plan" { | |||
|
|||
lifecycle { | |||
delete_after = max(var.quarterly_retention, var.monthly_retention) | |||
cold_storage_after = var.cold_storage_after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cold_storage_after : this determines how many days after being created a recovery point gets moved to cold storage.
We hardcoded the value of the cold_storage_after parameter as a variable. So, we specified the value in the environmental files under terraform.yml.
@@ -88,6 +88,8 @@ resource "aws_backup_plan" "business_continuity_plan" { | |||
|
|||
lifecycle { | |||
delete_after = max(var.quarterly_retention, var.monthly_retention) | |||
cold_storage_after = var.cold_storage_after | |||
opt_in_to_archive_for_supported_resources = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opt_in_to_archive_for_supported_resources : this allows backup plan to transition supported resources to archive (cold) storage based on lifecycle settings.
For the opt_in_to_archive_for_supported_resources parameter, we set the value to true because we are enabling the Cold Storage option for Amazon EBS on the console.
|
||
variable "cold_storage_after" { | ||
type = number | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are defining the variable name and variable type. This variable will be used to specify the number of days after creation that a recovery point is moved to cold storage.
@@ -104,6 +104,7 @@ class BackupPlan(jsonobject.JsonObject): | |||
weekly_retention = jsonobject.IntegerProperty() | |||
monthly_retention = jsonobject.IntegerProperty() | |||
quarterly_retention = jsonobject.IntegerProperty() | |||
cold_storage_after = jsonobject.IntegerProperty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are defining a property named cold_storage_after as an IntegerProperty.
Ticket : https://dimagi.atlassian.net/browse/SAAS-15185
Environments Affected : Staging