availabilityZone is mandatory inside SubnetAttributes while using Subnet.fromSubnetAttributes #6607
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
❓ 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
Other information
The text was updated successfully, but these errors were encountered: