-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for deployment in Azure Government Cloud (Workbench-Libs) (#1713
) * azure gov environment support * Update AzureVmServiceInterp.scala * Update AzureEnvironmentConfig.scala * scalafmt * scalafmt * Bump azure version --------- Co-authored-by: Jonathon Saunders <[email protected]>
- Loading branch information
Showing
7 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
azure/src/main/scala/org/broadinstitute/dsde/workbench/azure/AzureEnvironmentConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.broadinstitute.dsde.workbench.azure | ||
|
||
import com.azure.core.management.AzureEnvironment | ||
|
||
object AzureEnvironmentConfig { | ||
val AZURE_ENVIRONMENT_CONFIG = "AZURE_ENVIRONMENT" | ||
|
||
private val Azure: String = "AzureCloud" | ||
private val AzureGov: String = "AzureUSGovernmentCloud" | ||
|
||
def fromString(s: String): AzureEnvironment = s match { | ||
case AzureGov => AzureEnvironment.AZURE_US_GOVERNMENT | ||
case Azure => AzureEnvironment.AZURE | ||
case _ => throw new IllegalArgumentException(s"Unknown Azure environment: $s") | ||
} | ||
|
||
def fromCurrentHostingEnv(): AzureEnvironment = | ||
fromString(scala.util.Properties.envOrElse(AZURE_ENVIRONMENT_CONFIG, Azure)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters