missing properties in InstanceProps interface

0

Hi team,

I'm creating an ec2 instance via CDK, but I can't find how to set:

  • Termination protection (Enabled)
  • Answer private resource DNS name (IPv4 (A))

I can't find those 2 properties on InstanceProps interface

are they supported by CDK?

Thank you!

1 Risposta
0

From the CDK documentation (2) , we are unable to enable instance termination protection; although we can enable CDK stack terminationProtection (1). We can configure private DNS Name (IPv4 A) using instancePrivateIp Properties (2).

For more details, refers to:

  1. https://bobbyhadz.com/blog/enable-termination-protection-cdk
  2. https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-ec2.Instance.html
AWS
con risposta 2 anni fa
  • Thank you for your answer,

    if I use instancePrivateIp, I force my instance to have a specific IP so I just want the instance to get one available private IP address at the time of deploying the stack

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande