Skip to content
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

Add devx-backup tag to database #301

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

Georges-GNM
Copy link
Contributor

@Georges-GNM Georges-GNM commented Jan 24, 2024

Co-authored-by: @jorgeazevedo
Co-authored-by: michaelwmcnamara
Co-authored-by: @twrichards
Co-authored-by: @jacobwinch

What does this change?

Part of RDS Backups

Enables more robust backup processes powered by AWS backup service for the RDS database, as per this FAQ.

How to test

This was added to code, and we could verify this successfully enabled the desired backup in the AWS console.

@Georges-GNM Georges-GNM marked this pull request as ready for review January 25, 2024 11:49
@Georges-GNM Georges-GNM requested review from twrichards and a team as code owners January 25, 2024 11:49
@@ -110,6 +111,7 @@ export class PinBoardStack extends GuStack {
publiclyAccessible: false,
removalPolicy: RemovalPolicy.RETAIN,
});
Tags.of(database).add("devx-backup-enabled", "true");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this db instance instantiates a number of different objects and the 'devx-backup-enabled' tag is added to all of these rather than just the db engine. Hold off on merging this until we verify that this won't have any negative impacts.

Copy link

@michaelwmcnamara michaelwmcnamara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holding off on merge until we have verified according to above comment.

Copy link
Contributor

@jacobwinch jacobwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it'd be cleaner to back up the AWS::RDS::DBInstance resource type only, I don't think there is any real downside to adding this tag to the associated resources, which are of the following types:

  • AWS::IAM::Role
  • AWS::EC2::SecurityGroup
  • AWS::RDS::DBSubnetGroup
  • AWS::SecretsManager::Secret

IIUC AWS Backup doesn't understand any of these types anyway, so the backup tooling is not going to select them.

In other words, I think it's fine to merge this as is.

Update: if we really want to access the RDS instance only for tagging purposes, we have to access the L1 construct - there's an example of that here: #302.

@jacobwinch jacobwinch mentioned this pull request Jan 25, 2024
@Georges-GNM
Copy link
Contributor Author

Georges-GNM commented Jan 25, 2024

Update: if we really want to access the RDS instance only for tagging purposes, we have to access the L1 construct - there's an example of that here: #302.

As we've tested this particular implementation on code and were satisfied it works (and would also like to get this merged now to verify prod tomorrow), I'll go ahead and merge this one. If there's any issues caused by the tagging on the other resources, it's good to know how we can get it to be limited to the instance though.

@Georges-GNM Georges-GNM merged commit 6dff034 into main Jan 25, 2024
1 check passed
@Georges-GNM Georges-GNM deleted the mob/add-devx-backup-tags branch January 25, 2024 16:31
@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @Georges-GNM 4 minutes and 29 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants