Skip to content
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

Enable deployment to Azure Government Cloud #3128

Closed
ms-mikerice opened this issue Jan 25, 2023 · 8 comments · Fixed by #3377
Closed

Enable deployment to Azure Government Cloud #3128

ms-mikerice opened this issue Jan 25, 2023 · 8 comments · Fixed by #3377
Assignees
Labels

Comments

@ms-mikerice
Copy link

Deployment fails immediately when attempting to deploy to Azure Gov regions because of the distinct endpoints hardcoded into TRE. Requesting assisting in removing hardcoded endpoints and allowing endpoints to be determined based on region. Anywhere the az libraries are used (so long as it is up to date) will use correct endpoints.

@marrobi marrobi changed the title AzureTRE can't deploy to Microsoft Azure Government regions because of hardcoded endpoints Enable deployment to Azure Government Cloud Jan 26, 2023
@marrobi
Copy link
Member

marrobi commented Jan 26, 2023

Looks like for terraform need to run:

az cloud set --name AzureUSGovernment

Prior to any commands. This would likely need to be run in all the bundles too.

With options of:

➜  ~ az cloud list -o table
IsActive    Name               Profile
----------  -----------------  ---------
False       AzureCloud         latest
False       AzureChinaCloud    latest
True        AzureUSGovernment  latest
False       AzureGermanCloud   latest

Actually, looks like this - https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#environment - might do it.

@marrobi
Copy link
Member

marrobi commented Jan 26, 2023

@marrobi
Copy link
Member

marrobi commented Jan 26, 2023

This is also worth a check:

https://learn.microsoft.com/en-us/azure/private-link/availability

Not sure how accurate it is as doesn't call out Government cloud for App Service private endpoint - https://learn.microsoft.com/en-us/azure/private-link/availability#web

@ms-mikerice thoughts?

@marrobi
Copy link
Member

marrobi commented Jan 26, 2023

@tamirkamara
Copy link
Collaborator

Looks like for terraform need to run:

az cloud set --name AzureUSGovernment

Prior to any commands. This would likely need to be run in all the bundles too.

With options of:

➜  ~ az cloud list -o table
IsActive    Name               Profile
----------  -----------------  ---------
False       AzureCloud         latest
False       AzureChinaCloud    latest
True        AzureUSGovernment  latest
False       AzureGermanCloud   latest

Shame this can't be done in the AzureRM provider configuration from what I can see.

The provider does support non-global clouds:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#environment

@marrobi
Copy link
Member

marrobi commented Jan 26, 2023

@tamirkamara you are too quick, just updated my post, although see some references on stack overflow where seems people have had to resort to the CLI!

@kevinpagliarulo
Copy link

Looks like for terraform need to run:
az cloud set --name AzureUSGovernment
Prior to any commands. This would likely need to be run in all the bundles too.
With options of:

➜  ~ az cloud list -o table
IsActive    Name               Profile
----------  -----------------  ---------
False       AzureCloud         latest
False       AzureChinaCloud    latest
True        AzureUSGovernment  latest
False       AzureGermanCloud   latest

Shame this can't be done in the AzureRM provider configuration from what I can see.

The provider does support non-global clouds: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#environment

Looks like for terraform need to run:
az cloud set --name AzureUSGovernment
Prior to any commands. This would likely need to be run in all the bundles too.
With options of:

➜  ~ az cloud list -o table
IsActive    Name               Profile
----------  -----------------  ---------
False       AzureCloud         latest
False       AzureChinaCloud    latest
True        AzureUSGovernment  latest
False       AzureGermanCloud   latest

Shame this can't be done in the AzureRM provider configuration from what I can see.

The provider does support non-global clouds: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#environment

The environment argument supports "usgovernment"

@tamirkamara
Copy link
Collaborator

tamirkamara commented Jan 29, 2023

Initial list of things to sort:

  • TRE_URL can be used to deal with internal usage of https://${TRE_ID}.${LOCATION}.cloudapp.azure.com
  • private dns zones
  • azcli login - docs state one should use az cloud set... but we heard that setting the region to some-gov one might be enough. If it's not enough there's many places where we call cli commands directly (not tre setup) like in the RP but also in template actions.
  • endpoints in firewall rules
  • Probably Nexus/Certs will require special attention due to how they work with private dns
  • Airlock - has assumptions around blob endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Status: Initial Scope Complete
Development

Successfully merging a pull request may close this issue.

5 participants