1- import { Fn , RemovalPolicy } from "aws-cdk-lib"
1+ import { RemovalPolicy } from "aws-cdk-lib"
22import {
33 IManagedPolicy ,
44 IRole ,
@@ -20,6 +20,7 @@ import {
2020} from "aws-cdk-lib/aws-stepfunctions"
2121import { Construct } from "constructs"
2222import { CfnDeliveryStream } from "aws-cdk-lib/aws-kinesisfirehose"
23+ import { ACCOUNT_RESOURCES , LAMBDA_RESOURCES } from "../constants"
2324
2425export interface StateMachineProps {
2526 /** Stack name, used as prefix for resource naming and DNS records. */
@@ -83,12 +84,12 @@ export class ExpressStateMachine extends Construct {
8384
8485 const {
8586 cloudWatchLogsKmsKey = Key . fromKeyArn (
86- this , "CloudWatchLogsKmsKey" , Fn . importValue ( "account-resources: CloudwatchLogsKmsKeyArn" ) ) ,
87+ this , "CloudWatchLogsKmsKey" , ACCOUNT_RESOURCES . CloudwatchLogsKmsKeyArn ) ,
8788 cloudwatchEncryptionKMSPolicy = ManagedPolicy . fromManagedPolicyArn (
88- this , "cloudwatchEncryptionKMSPolicy" , Fn . importValue ( "account-resources: CloudwatchEncryptionKMSPolicyArn" ) ) ,
89+ this , "cloudwatchEncryptionKMSPolicy" , ACCOUNT_RESOURCES . CloudwatchEncryptionKMSPolicyArn ) ,
8990 splunkDeliveryStream,
9091 splunkSubscriptionFilterRole = Role . fromRoleArn (
91- this , "splunkSubscriptionFilterRole" , Fn . importValue ( "lambda-resources: SplunkSubscriptionFilterRole" ) ) ,
92+ this , "splunkSubscriptionFilterRole" , LAMBDA_RESOURCES . SplunkSubscriptionFilterRole ) ,
9293 addSplunkSubscriptionFilter = true
9394 } = props
9495
@@ -118,7 +119,7 @@ export class ExpressStateMachine extends Construct {
118119 } )
119120 } else {
120121 const splunkDeliveryStreamImport = Stream . fromStreamArn (
121- this , "SplunkDeliveryStream" , Fn . importValue ( "lambda-resources: SplunkDeliveryStream" ) )
122+ this , "SplunkDeliveryStream" , LAMBDA_RESOURCES . SplunkDeliveryStream )
122123 new CfnSubscriptionFilter ( this , "LambdaLogsSplunkSubscriptionFilter" , {
123124 destinationArn : splunkDeliveryStreamImport . streamArn ,
124125 filterPattern : "" ,
0 commit comments