Skip to content
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

implement addDeletionOverride for Terraform resources #1696

Closed
rirze opened this issue Apr 7, 2022 · 5 comments
Closed

implement addDeletionOverride for Terraform resources #1696

rirze opened this issue Apr 7, 2022 · 5 comments
Labels
cdktf enhancement New feature or request

Comments

@rirze
Copy link
Contributor

rirze commented Apr 7, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It would be helpful to be able to delete keys and their values from the generated Terraform output, similar to the CDK for Cloudformation. Would provide a stopgap for when bugs are found and resources need to be created with correct specifications.

References

CDK docs on escape hatches: https://docs.aws.amazon.com/cdk/v2/guide/cfn_layer.html#cfn_layer_raw

Historical PR in aws-cdk for escape hatches: aws/aws-cdk#784
Current implementation in aws-cdk: https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/core/lib/cfn-resource.ts

@rirze rirze added enhancement New feature or request new Un-triaged issue labels Apr 7, 2022
@ansgarm
Copy link
Member

ansgarm commented Apr 8, 2022

Hi @rirze,
this should already be possible by using .addOverride("some_attribute", undefined). Have you tried that?

@ansgarm ansgarm added cdktf waiting-on-answer and removed new Un-triaged issue labels Apr 8, 2022
@rirze
Copy link
Contributor Author

rirze commented Apr 8, 2022

Would that be .addOverride("some_attribute", None) in python?

@ansgarm
Copy link
Member

ansgarm commented Apr 11, 2022

@rirze sorry for the late reply: Yes, use None in Python 👍

@ansgarm
Copy link
Member

ansgarm commented Apr 11, 2022

I'm going to close this, as using undefined works to delete attributes 👍

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cdktf enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants