d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
246 stars 102 forks source link

:bug: Environment type for non-us/global regions are not correctly determined #790

Closed FH-Inway closed 9 months ago

FH-Inway commented 9 months ago

The following part of the variables.ps1 script determines the type of the environment the d365fo.tools module is running on. This controls the behavior of several cmdlets (see search result for term EnvironmentType).

https://github.com/d365collaborative/d365fo.tools/blob/5030144da24e1def7b5ccafcbef84eaf0ea0905c/d365fo.tools/internal/scripts/variables.ps1#L62-L78

The logic does not take into account the URL patterns for environments that are deployed in regions that are not the US/global region (e.g. EU). For example, the pattern for an AzureHostedTier1 environment would be *cloudax.eu.dynamics.com*.