Created
October 27, 2021 19:00
-
-
Save 1davidmichael/52b910a00c8090eb2f9045dea4d0a058 to your computer and use it in GitHub Desktop.
Convert CDK VPC subnet list into CFN subnet list type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var subnetIds:String[] = []; | |
vpc.privateSubnets.forEach((value: ISubnet)=>{ | |
subnetIds.push(value.subnetId) | |
}); | |
const template = new cfninc.CfnInclude(this, "Template", { | |
templateFile: 'template.yaml', | |
parameters: { | |
"ClusterName": cluster.clusterName, | |
"Subnets": cdk.Fn.split(",", subnetIds.join(",")), | |
LogGroupName: logGroup.logGroupName | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment