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
질문됨 2년 전705회 조회
1개 답변
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
전문가
답변함 2년 전
  • 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 .

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠