@@ -321,7 +321,9 @@ func processAvailableResourcesResponse(resp *ecsclient.DescribeAvailableResource
321321 for _ , az := range resp .Body .AvailableZones .AvailableZone {
322322 // TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
323323 // 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" {
325327 continue
326328 }
327329 processAvailableResources (az , offerings )
@@ -342,7 +344,9 @@ func processAvailableResources(az *ecsclient.DescribeAvailableResourceResponseBo
342344 for _ , sr := range ar .SupportedResources .SupportedResource {
343345 // TODO: Later, `ClosedWithStock` will be tested to determine if `ClosedWithStock` should be added.
344346 // 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" {
346350 continue
347351 }
348352 if _ , ok := instanceTypesOfferings [* sr .Value ]; ! ok {
0 commit comments