-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOAZ-372 Support for deployment in Azure Government Cloud (Cromwell) #7670
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
967cd61
add azure gov azure environment
bennettn4 6d981cc
Update AzureConfiguration.scala
bennettn4 73cb567
remove unused imports
bennettn4 84214c9
Update AzureConfiguration.scala
bennettn4 ec6dfdf
Update AzureConfiguration.scala
bennettn4 03979c0
Add remaining active national clouds (#7666)
BMurri d2ce462
Merge branch 'develop' into bennettn/azure-gov-update
bennettn4 69a00e6
Update reference.conf
bennettn4 74c4680
Merge branch 'develop' into bennettn/azure-gov-update
jsaun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
cloudSupport/src/main/scala/cromwell/cloudsupport/azure/AzureConfiguration.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,28 @@ | ||
package cromwell.cloudsupport.azure | ||
|
||
import com.azure.core.management.AzureEnvironment | ||
import com.typesafe.config.ConfigFactory | ||
import net.ceedubs.ficus.Ficus._ | ||
|
||
object AzureConfiguration { | ||
private val conf = ConfigFactory.load().getConfig("azure") | ||
val azureEnvironment = | ||
AzureEnvironmentConverter.fromString( | ||
conf.as[Option[String]]("azure-environment").getOrElse(AzureEnvironmentConverter.Azure) | ||
) | ||
val azureTokenScopeManagement = conf.as[String]("token-scope-management") | ||
} | ||
|
||
object AzureEnvironmentConverter { | ||
val Azure: String = "AzureCloud" | ||
val AzureGov: String = "AzureUSGovernmentCloud" | ||
val AzureChina: String = "AzureChinaCloud" | ||
|
||
def fromString(s: String): AzureEnvironment = s match { | ||
case AzureGov => AzureEnvironment.AZURE_US_GOVERNMENT | ||
case AzureChina => AzureEnvironment.AZURE_CHINA | ||
Check warning on line 23 in cloudSupport/src/main/scala/cromwell/cloudsupport/azure/AzureConfiguration.scala Codecov / codecov/patchcloudSupport/src/main/scala/cromwell/cloudsupport/azure/AzureConfiguration.scala#L22-L23
|
||
// a bit redundant, but I want to have a explicit case for Azure for clarity, even though it's the default | ||
case Azure => AzureEnvironment.AZURE | ||
case _ => AzureEnvironment.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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
AzureCloud
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed