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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cdk/lib/__snapshots__/stack.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,10 @@ Object {
"StorageEncrypted": true,
"StorageType": "gp2",
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down Expand Up @@ -720,6 +724,10 @@ Object {
"Version": "2012-10-17",
},
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down Expand Up @@ -751,6 +759,10 @@ Object {
},
],
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down Expand Up @@ -938,6 +950,10 @@ Object {
},
],
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down Expand Up @@ -1044,6 +1060,10 @@ Object {
"Ref": "pinboardPrivateSubnets",
},
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down Expand Up @@ -1989,6 +2009,10 @@ Object {
"SecretStringTemplate": "{\\"username\\":\\"pinboard\\"}",
},
"Tags": Array [
Object {
"Key": "devx-backup-enabled",
"Value": "true",
},
Object {
"Key": "gu:cdk:version",
"Value": "49.5.0",
Expand Down
2 changes: 2 additions & 0 deletions cdk/lib/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
Fn,
RemovalPolicy,
Stack,
Tags,
} from "aws-cdk-lib";
import * as appsync from "@aws-cdk/aws-appsync-alpha";
import { join } from "path";
Expand Down Expand Up @@ -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.


const roleToInvokeLambdaFromRDS = new iam.Role(
this,
Expand Down
Loading