Skip to content

Conversation

tbrand
Copy link
Contributor

@tbrand tbrand commented Oct 1, 2025

Description of Changes

  • props.vpc.selectSubnets()で、SubnetFilter.byIds(props.subnetIds)を使ってサブネットをフィルタしている
  • しかし、props.vpcはec2.Vpc.fromLookup()で取得された既存VPCの参照
  • CDKのfromLookup()では、指定されたサブネットIDの詳細情報(AZ情報など)が正しく解決されない場合がある
  • 結果としてsubnets配列が空になり、58行目のif (ipAddresses.length < 2)でエラーが発生

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots

Related Issues

#1295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants