AWS CDK - how can I retrieve the ID of my primary network interface?

0

In AWS CDK I am creating an EC2 instance. CDK automatically creates a default primary network interface for this instance. How can I access this network interface's id? I'd need this in the output.

TheBlob
feita há 2 anos705 visualizações
1 Resposta
0

The challenge here is that the ENI identifier isn't known until it is created which happens during stack creation, not when CDK is executin (which is when the CloudFormation template is being written).

Why do you need the identifier? What are you trying to do?

profile pictureAWS
ESPECIALISTA
respondido há 2 anos
  • I know that the the actual ENI identifier isn't known during execution - that's OK. I'd need the value as an Output. Why do I need it? I want to use the identifier to attach secondary IP addresses to it via CLI .

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas