@@ -321,7 +321,9 @@ func processAvailableResourcesResponse(resp *ecsclient.DescribeAvailableResource
321
321
for _ , az := range resp .Body .AvailableZones .AvailableZone {
322
322
// TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
323
323
// WithStock, ClosedWithStock, WithoutStock, ClosedWithoutStock
324
- if * az .StatusCategory != "WithStock" {
324
+ // ClosedWithStock means there is available capacity, just the provider will not add more capacity.
325
+ if tea .StringValue (az .StatusCategory ) != "WithStock" &&
326
+ tea .StringValue (az .StatusCategory ) != "ClosedWithStock" {
325
327
continue
326
328
}
327
329
processAvailableResources (az , offerings )
@@ -342,7 +344,9 @@ func processAvailableResources(az *ecsclient.DescribeAvailableResourceResponseBo
342
344
for _ , sr := range ar .SupportedResources .SupportedResource {
343
345
// TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
344
346
// WithStock, ClosedWithStock, WithoutStock, ClosedWithoutStock
345
- if * sr .StatusCategory != "WithStock" {
347
+ // ClosedWithStock means there is available capacity, just the provider will not add more capacity.
348
+ if tea .StringValue (sr .StatusCategory ) != "WithStock" &&
349
+ tea .StringValue (sr .StatusCategory ) != "ClosedWithStock" {
346
350
continue
347
351
}
348
352
if _ , ok := instanceTypesOfferings [* sr .Value ]; ! ok {
0 commit comments