How to set Termination Protection for an EC2 Instance? #21779
Answered
by
khushail
mikelhamer
asked this question in
Q&A
-
I'm not seeing any way in the EC2 construct to set Termination Protection. Is this possible? To clarify, I'm talking about the setting for the actual EC2 Instance, not the Stack. |
Beta Was this translation helpful? Give feedback.
Answered by
khushail
Sep 20, 2024
Replies: 2 comments
-
Present in L1 but not L2 construct, so set via escape hatch |
Beta Was this translation helpful? Give feedback.
0 replies
-
Adding more reference to @PatMyron answer, the property is -
like this - const instance = new ec2.CfnInstance(this, "myInstance", {
disableApiTermination :true,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
khushail
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adding more reference to @PatMyron answer, the property is -
like this -