PRO: Domains #
All features described on this page are part of the Professional Edition.
While in beta, you can enable the Professional Edition by creating an account and downloading a license from https://portal.sqldsc.com.
The PRO edition will become a paid version. Until then, PRO features expire 60 days after the build date. Please see https://www.scalesql.com for updated builds or run
Domain Targets #
The PRO version can use domain specific target files. If you do nothing different, it will continue to use
You can create domain specific target files. For example,
DOMAIN1.targets.hclfor domain1 (it’s not case-sensitive)
By default, the PRO version will run for the domain specified in the
USERDOMAIN environment variable. This variable is automaticallly set by Windows for all domain joined computers. SQLDSC will search for a target file for that domain. If it doesn’t find one it will fall back to
targets.hcl. If you’re using domain specific target files, you should probably delete
targets.hcl or leave it empty.
To run for a differnt domain than the current one, specify a domain using the the
--domain parameter. This parameter only applies to the
apply commands. For example,
sqldsc test --domain other-domain --verbose
This will process the targets listed in
targets.hcl if that file isn’t found). Processing for a separate domain is often used to handle multiple domains where a trust relationship and connectivity are available.
Domain Defaults #
The PRO version also support domain specific defaults. After processing
defaults.hcl, it will look for domain specific defaults.
The order of default files processed is
- All role files in order (see Roles)
Remember that later processed files override values in earlier files.
NOTE: The domain targets aren’t strict. You could put reachable targets in DOMAIN_ONE.defaults.hcl that aren’t actually in the domain. When getting the configuration files, it looks at the server’s domain (using
USER_DOMAIN()) to determine which domain default file to use. Be very careful crossing domain lines.