Closed danjoneslf closed 3 years ago
Didn't get as far with this as I wanted to today:
There are also a bunch of references in XML files for the forwarder subscriptions and global policy objects. I think probably given the only way to replace those ones is (I think) to template them and populate the domain into a placeholder variable, it's probably easiest to do that for everything. So just iterate over everything in scripts and pass it through something like jinja to move it from a templates location to the scripts location and populate the placeholders.
In terms of how they're used the ec2 terraforms for the DC and WEC instance each have a remote-exec which clones the repo and runs the scripts so I guess the domain would be passed into the remote-exec script as an env var maybe and then we'd have to replace the content of that script with a wrapper script that dealt with the domain and then ran the same tasks.
Given it's just a string replace and we're in PS land it might be better to just do this: https://mcpmag.com/articles/2018/08/08/replace-text-with-powershell.aspx so we don't have to install a python runtime and requirements and whatnot.
Then you could just use Set-Content to overwrite the files in-place.
This is currently hard-coded in a lot of places.