-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pre Build (Merge and Test Data Files) - [ERROR] Environment configuration for '[ENV]' contains Mandatory settings, which is not allowed! #12
Comments
You've got a way to go yet Paul. Easiest thing to do at the moment is make all of the mandatory files blank. You'll have plenty of time to work on that bit later. |
Hi @martincaddick, However, I'm confused. I would have thought that by taking the repo exactly as it is, I would be able to deploy a basic setup, by following the whitepaper. So far I've hit a couple of roadblocks that has required me to change the files/pipelines to move onto the next step. Can you explain to me what in the mandatory files is causing the error I can just make the Mandatory files blank, but if I don't understand why this is happening, I'm not going to avoid this issue again in the future. |
From 5.1.1 in the pdf. So, if Mandatory says There are bugs in the repo(s) which I and a few others are working thru, however, persevere because it is worth it and you will learn a heap along the way. It's worthwhile reading thru all of the issues including the pending pull request. I spent days trying to unxderstand why I was getting stuck on the deployment.yaml / yml file issue in postbuild.ps1 |
@martincaddick thank you for pointing step 5.1.1 out. I must have skimmed over that. I will continue with this knowledge. I personally think Mandatory is being used incorrectly in it's logic, as if all files have to be in Basic and cannot be in Environment, why not just say all Basic are mandatory? ( I understand this probably wasn't your decision). I feel that the logic should be as follows:
I work in multi tenant environment which is growing, hence why I believe the logic should be the above. |
@pmatthews05 On a more practical note, Try this in your Mandatory Exchange file
This in your Basic Exchange file
and finally this in your Environment Exchange file
Your security people has said you absolutely must have those settings, at your enterprise level (basic) all of your tenants will comply with the security settings and will have some preferred defaults and then the specific environment will be able to customise the settings that it can without going against the security requirements. |
Hi @pmatthews05, @martincaddick, sorry for not replying sooner. Have been a little busy. Great to see you are supporting each other solving these issues! To provide you with some more insights: Data files setup
These two layers are merged into a single data set which is then used to compile the MOF file for the environment. The Mandatory layer are all settings that should be set exactly as specified in these files. In the past the solution just merged this on top of the merge of the Basic/Environment overriding all settings that were set in the other two layers. But then I had a discussion with someone that had an interesting view:
Because of this, we decided to change the merge approach to a unit test approach. Now the Mandatory layer is validated against:
Using this method, the values in the data files are always consistent with the current state of the environment. Which was not the case with the merge method. I have also added this explanation to paragraph 5.1.1 of the whitepaper, which will be release soon. Files in repositoryI have checked the files in the repository and found that the Mandatory file for Teams contained information. I have now removed that. So if you start from scratch, it should not start complaining about mandatory settings. These updates will be push shortly. |
Working through Walkthrough guide. Using Microsoft Hosted Agent.
After uploading the certificates to my Keyvault, and creating an environment using the following script https://github.com/ykuijs/M365DSC_CICD/blob/main/Supportscripts/PrepareKeyvault.ps1
I've updated the [env]#Generic.psd1 file, but not really changed anything else within the Data files.
When I'm running the following pipeline https://github.com/ykuijs/M365DSC_CICD/blob/main/Pipelines/build-template.yaml pipeline, I've reached the step in the pipeline "Pre Build (Merge and Test Data Files)" and I'm hitting the following errors.
I require guidance what I need to do to get rid of this error.
The text was updated successfully, but these errors were encountered: