const route1table = new RouteTable(this, “route1table”, {
vpcId: vpcs.id,
route: [{
cidrBlock: route_block.stringValue,
gatewayId: gateway.id,
egressOnlyGatewayId: undefined ,
carrierGatewayId: undefined ,
instanceId: undefined,
natGatewayId: undefined ,
networkInterfaceId: undefined ,
ipv6CidrBlock: undefined ,
vpcEndpointId: undefined ,
vpcPeeringConnectionId: undefined ,
}],
count: 3
})
error │ Inappropriate value for attribute “route”: element 0: attributes
how to ignore those attributes in undefined and just use only defined attribute in route table for stack