Skip to content

Commit

Permalink
Fix issue: wrong region westus in Azure China subs (#121)
Browse files Browse the repository at this point in the history
* Fix issue: wrong region westus in Azure China subs

* Fix issue: wrong region westus in Azure China subs
  • Loading branch information
andxu committed Sep 27, 2021
1 parent 44b2bd0 commit 12de745
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ private AppServiceConfig buildDefaultConfig(String subscriptionId, String resour
}

private Region getParsedRegion() {
return Optional.ofNullable(ctx.getRegion()).map(Region::fromName).orElse(Region.US_WEST);
return Optional.ofNullable(ctx.getRegion()).map(Region::fromName).orElse(null);
}

private PricingTier getParsedPricingTier() {
String pricingTier = ctx.getPricingTier();
if (StringUtils.isEmpty(pricingTier)) {
return PricingTier.CONSUMPTION;
return null;
}
return Optional.ofNullable(PricingTier.fromString(pricingTier))
.orElseThrow(() -> new AzureToolkitRuntimeException(String.format("Invalid pricing tier %s", pricingTier)));
Expand Down

0 comments on commit 12de745

Please sign in to comment.