Skip to content

availabilityZone is mandatory inside SubnetAttributes while using Subnet.fromSubnetAttributes #6607

@nirvana124

Description

@nirvana124

❓ General Issue

The Question

To get subnet details if we are using Subnet.fromSubnetAttributes we are required to pass SubnetAttributes. Inside SubnetAttributes we have availabilityZone which is defined as mandatory.
Even if we do not pass empty string there it works fine.
Can we make availabilityZone optional or i am missing something here ?

Subnet.fromSubnetAttributes(this, 'MySubnet', {
subnetId: 'sb-123456789',
availabilityZone: ''
})
Also inside cfn template only subnet ids are present.

Environment

  • CDK CLI Version: 1.27.0
  • Module Version: 1.27.0
  • OS: Windows 10
  • Language: TypeScript

Other information

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-ec2Related to Amazon Elastic Compute Cloudeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.in-progressThis issue is being actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions