Scaling your CICD pipeline - Default parameter file is not being used

Wagner Nico 20 Reputation points
2024-07-16T09:17:24.5566667+00:00

I am currently working on a CICD pipeline in combination with MS Sentinel content. I just got in touch with the repository and the process of handling parameter files. I am just asking myself why the default parameter file is not being used. All of my contents are in one folder (content/xyz.json, content/abc.json, …) as well as the default parameter file (content/default.parameters.json). The default.parameters.json file looks like this:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "workspacename": {
            "Value": "xyz"
        }
    }
}

SmartDeployment is activated and works perfectly, if mapped in sentinel-deployment.config. Even if I name the parameter file like the content files, it is not being used. Am I doing something wrong here or misunderstood something?

I would appreciate it if someone could offer me some help!

Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,154 questions
{count} votes

Accepted answer
  1. Givary-MSFT 33,081 Reputation points Microsoft Employee
    2024-08-05T10:16:31.05+00:00

    @Wagner Nico I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    currently working on a CICD pipeline in combination with MS Sentinel content. I just got in touch with the repository and the process of handling parameter files. I am just asking myself why the default parameter file is not being used. All of my contents are in one folder (content/xyz.json, content/abc.json, …) as well as the default parameter file (content/default.parameters.json). The default.parameters.json file looks like this:

    {
        "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
            "workspacename": {
                "Value": "xyz"
            }
        }
    }
    

    SmartDeployment is activated and works perfectly, if mapped in sentinel-deployment.config. Even if I name the parameter file like the content files, it is not being used. Am I doing something wrong here or misunderstood something?

    Resolution: Resolved by @Wagner Nico could not locate where the error is comming from, but I did a workaround by modifying the GetParameterFile-function and setting the defaultParameterFile in the .ps to this:

    $defaultParameterFile = $Directory + "\parameters\default.parameters.json"

    That way, my default.parameters.json will always be the fallback.

    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Wagner Nico 20 Reputation points
    2024-07-31T08:11:23.4433333+00:00

    @Givary-MSFT Thank you for responding so fast. I could not locate where the error is comming from, but I did a workaround by modifying the GetParameterFile-function and setting the defaultParameterFile in the .ps to this:

    $defaultParameterFile = $Directory + "\parameters\default.parameters.json"
    
    

    That way, my default.parameters.json will always be the fallback.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.