@@ -318,7 +318,9 @@ func processAvailableResourcesResponse(resp *ecsclient.DescribeAvailableResource
318318 for _ , az := range resp .Body .AvailableZones .AvailableZone {
319319 // TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
320320 // WithStock, ClosedWithStock, WithoutStock, ClosedWithoutStock
321- if * az .StatusCategory != "WithStock" {
321+ // ClosedWithStock means there is available capacity, just the provider will not add more capacity.
322+ if tea .StringValue (az .StatusCategory ) != "WithStock" &&
323+ tea .StringValue (az .StatusCategory ) != "ClosedWithStock" {
322324 continue
323325 }
324326 processAvailableResources (az , offerings )
@@ -339,7 +341,9 @@ func processAvailableResources(az *ecsclient.DescribeAvailableResourceResponseBo
339341 for _ , sr := range ar .SupportedResources .SupportedResource {
340342 // TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
341343 // WithStock, ClosedWithStock, WithoutStock, ClosedWithoutStock
342- if * sr .StatusCategory != "WithStock" {
344+ // ClosedWithStock means there is available capacity, just the provider will not add more capacity.
345+ if tea .StringValue (sr .StatusCategory ) != "WithStock" &&
346+ tea .StringValue (sr .StatusCategory ) != "ClosedWithStock" {
343347 continue
344348 }
345349 if _ , ok := instanceTypesOfferings [* sr .Value ]; ! ok {
0 commit comments