-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProductStackProps should extend StackProps #31924
Comments
I've found a workaround where the ProductStack template will not include the AWS::CDK::METADATA resource if I include |
@bdoyle0182 Good afternoon. Could you please share self-contained minimal code to reproduce the issue that demonstrates CDK modules and constructs you are trying to use? Are you using ProductStackProps from aws-cdk-lib » aws_servicecatalog package? If yes, I do see that ProductStackProps interface doesn't extend StackProps interface, which would have provided access to other stack level properties like StackProps.analyticsReporting is used to set Stack's I'm unsure if ProductStackProps interface could be modified to extend StackProps interface since it could be a breaking change. Also, most of the constructs use pattern of defining property interface with relevant fields for construct and using it as one of the parameters for L2 construct. The documentation for analyticsReporting specifies that it is an optional property with the default value as Thanks, |
Hi Ashish, Unfortunately I can't share any code. But your assessment is correct, we're using that ProductStack from aws_servicecatalog. Here is how the project looks
I am actually using your work around right now by setting the config in my cdk.json of my project and it successfully does what I need. However, it is limiting. I have no issue with having version reporting enabled, it is just that AWS::CDK::METADATA does not exist in govcloud so there is no way to have version reporting enabled when one of my stack instances for my app is going to govcloud. If I wanted to have an override for just this region so that my commercial regions can still report, that does not work with the work around since it's app level and I can't override the setting on the ProductStack conditionally for the current region. So there's really two issues here:
|
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
…rting and stack descriptions (aws#31985) ### Issue # (if applicable) Closes aws#31924 ### Reason for this change Product Stack cannot override analytics reporting and descriptions. Support these two props. ### Description of changes The reason I didn't choose to allow ProductStackProps to extend StackProps and instead manually add these two properties are because all of the other properties, i.e. `stackName`, `env`, `notificationArns`, `terminationProtection`, `crossRegionReferences`, `permissionsBoundary`, `suppressTemplateIndentation`, do not mutate the stack template but are used by CDK CLI. These properties have no impact on the Product Stack template generated and thus I did not include them. ### Description of how you validated changes Unit and integ tests added. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
ProductStack
does not allow configuration of the underlying stack template for stack level configuration. This means you can't disable things likeanalyticsReporting
on the stack template that theProductStack
generates.ProductStack
constructor currently takesProductStackProps
which doesn't extend the base levelStackProps
even thoughProductStack
extendsStack
SinceCDK::AWS::METADATA
resource type does not exist in GovCloud, this means a Stack with a StackSet that references a ProductStack cannot be deployed to GovCloud.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Being able to configure the Stack template that is generated by a ProductStack
Current Behavior
ProductStack doesn't allow configuring stack level options for how it synthesizes its stack templates.
Reproduction Steps
The text was updated successfully, but these errors were encountered: