@digitraffic/common 2025.1.15-1 → 2025.1.16-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,7 @@ export interface ClusterConfiguration {
|
|
29
29
|
export interface ClusterImportConfiguration {
|
30
30
|
readonly clusterReadEndpoint: string;
|
31
31
|
readonly clusterWriteEndpoint: string;
|
32
|
+
readonly clusterIdentifier: string;
|
32
33
|
}
|
33
34
|
/**
|
34
35
|
* Stack that creates DatabaseCluster.
|
@@ -42,6 +42,7 @@ export class DbStack extends Stack {
|
|
42
42
|
if (configuration.clusterImport) {
|
43
43
|
createParameter(this, "cluster.reader", configuration.clusterImport.clusterReadEndpoint);
|
44
44
|
createParameter(this, "cluster.writer", configuration.clusterImport.clusterWriteEndpoint);
|
45
|
+
this.clusterIdentifier = configuration.clusterImport.clusterIdentifier;
|
45
46
|
}
|
46
47
|
}
|
47
48
|
createParameterGroups(customVersions, workmem) {
|
@@ -129,10 +130,13 @@ export class DbStack extends Stack {
|
|
129
130
|
})
|
130
131
|
: new DatabaseCluster(this, instanceName, parameters);
|
131
132
|
// this workaround should prevent stack failing on version upgrade
|
133
|
+
// https://github.com/aws/aws-cdk/issues/21758
|
134
|
+
// https://github.com/aws/aws-cdk/pull/22185
|
135
|
+
// Maybe this could be removed completely as we don't update db with the CDK?
|
132
136
|
const cfnInstances = cluster.node.children.filter((child) => child instanceof CfnDBInstance);
|
133
|
-
if (cfnInstances.length === 0) {
|
134
|
-
|
135
|
-
}
|
137
|
+
// if (cfnInstances.length === 0) {
|
138
|
+
// throw new Error("Couldn't pull CfnDBInstances from the L1 constructs!");
|
139
|
+
// }
|
136
140
|
cfnInstances.forEach((cfnInstance) => delete cfnInstance.engineVersion);
|
137
141
|
return cluster;
|
138
142
|
}
|