Skip to content

Commit

Permalink
Add devx-backup tag to database
Browse files Browse the repository at this point in the history
  • Loading branch information
Georges-GNM committed Jan 24, 2024
1 parent 04e9003 commit 0ea5cc4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
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");

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

0 comments on commit 0ea5cc4

Please sign in to comment.