Skip to content

Commit 68a1f17

Browse files
committed
fix
1 parent 1a2da9f commit 68a1f17

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

.tools/test/stacks/config/resources.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ interface ResourceConfig {
99
bucket_name: string;
1010
admin_acct: string;
1111
aws_region: string;
12-
s3_bucket_name_prefix: string;
1312
}
1413

1514
export function readResourceConfig(filePath: string): ResourceConfig {
@@ -22,8 +21,7 @@ export function readResourceConfig(filePath: string): ResourceConfig {
2221
!data.topic_name ||
2322
!data.bucket_name ||
2423
!data.admin_acct ||
25-
!data.aws_region ||
26-
!data.s3_bucket_name_prefix
24+
!data.aws_region
2725
) {
2826
throw new Error(
2927
"Validation failed: Missing required AWS configuration fields.",

.tools/test/stacks/config/variables.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
import * as fs from "fs";
55
import { parse } from "yaml";
66

7-
interface ResourceConfig {
7+
interface VariableConfig {
88
s3_bucket_name_prefix: string;
99
}
1010

11-
export function readResourceConfig(filePath: string): ResourceConfig {
11+
export function readVariableConfig(filePath: string): VariableConfig {
1212
try {
1313
const fileContents = fs.readFileSync(filePath, "utf8");
14-
const data: ResourceConfig = parse(fileContents);
14+
const data: VariableConfig = parse(fileContents);
15+
console.log(data);
1516

1617
// Validate the required field
1718
if (!data.s3_bucket_name_prefix) {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
s3_bucket_name_prefix: "sdk-example-code"
2-

.tools/test/stacks/plugin/typescript/plugin_stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PluginStack extends cdk.Stack {
3131

3232
const acctConfig = readAccountConfig("../../config/targets.yaml");
3333
const resourceConfig = readResourceConfig("../../config/resources.yaml");
34-
const variableConfig = readResourceConfig("../../config/resources.yaml");
34+
const variableConfig = readVariableConfig("../../config/variables.yaml");
3535

3636

3737
const adminTopicName = resourceConfig["topic_name"];

0 commit comments

Comments
 (0)