File tree Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Original file line number Diff line number Diff 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
1514export 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." ,
Original file line number Diff line number Diff line change 44import * as fs from "fs" ;
55import { 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 ) {
Original file line number Diff line number Diff line change 11s3_bucket_name_prefix : " sdk-example-code"
2-
Original file line number Diff line number Diff 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" ] ;
You can’t perform that action at this time.
0 commit comments