Describe the feature
Hi,
Using the servicecatalog ProdutStackHistory I found out that there is no possibility to nest the directories for the version if the top directory does not exist. Have a look at the example:
const productStackHistory = new ProductStackHistory(this, 'ProductStackHistory', {
productStack: productStack,
currentVersionName: `${versionName}-${stage}`,
currentVersionLocked: false,
directory: `version-snapshots/${props.configDefinition.name}`,
})
In this example when I do not create the directory version-snapshots manually then the creation of the snapshot fails with follwing stacktrace:
Error: ENOENT: no such file or directory, mkdir 'version-snapshots/someName'
at Object.mkdirSync (node:fs:1349:3)
at ProductStackHistory._writeTemplateToSnapshot
Use Case
I mean there is no much effort on creating the empty directory and also some dummy file inside to do the version control on it. The product stack I have is generic and underlines a very specific account hierrchy, which I want to convert to an appropriate directories structure. But this is kind of annoying in the development process when I'm deleting the whole directory to see if all the nested directores are going to be created correctly and then I get this error. When someone from my team does it and don't know the issue then it's of course even worse for him to debug.
Proposed Solution
- Implement the nesting so the upper example works OR
- Throw an descriptive error like 'ProductStackHistory can just create one directory. Create the desired directories hierarchy manually and try again.'
Other Information
No response
Acknowledgements
CDK version used
2.27.0
Environment details (OS name and version, etc.)
Windows 10
Describe the feature
Hi,
Using the servicecatalog ProdutStackHistory I found out that there is no possibility to nest the directories for the version if the top directory does not exist. Have a look at the example:
In this example when I do not create the directory
version-snapshotsmanually then the creation of the snapshot fails with follwing stacktrace:Use Case
I mean there is no much effort on creating the empty directory and also some dummy file inside to do the version control on it. The product stack I have is generic and underlines a very specific account hierrchy, which I want to convert to an appropriate directories structure. But this is kind of annoying in the development process when I'm deleting the whole directory to see if all the nested directores are going to be created correctly and then I get this error. When someone from my team does it and don't know the issue then it's of course even worse for him to debug.
Proposed Solution
Other Information
No response
Acknowledgements
CDK version used
2.27.0
Environment details (OS name and version, etc.)
Windows 10