Skip to content
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

Convert-M365DSCExportToPowerShellDataFile hashtable becomes a array - new workload #26

Open
hvdbrink opened this issue Oct 10, 2024 · 3 comments

Comments

@hvdbrink
Copy link

When converting the new fabric workload while using the Convert-M365DSCExportToPowerShellDataFile it outputs a datafile where it becomes a array

@{ NonNodeData = @{ Fabric = @{ AdminTenantSettings = @( @{ AADSSOForGateway = @{ canSpecifySecurityGroups = $False enabled = $False

from Node localhost { FabricAdminTenantSettings "FabricAdminTenantSettings" { AADSSOForGateway = MSFT_FabricTenantSetting { settingName = 'AADSSOForGateway' canSpecifySecurityGroups = $False

expected behaviour is that it becomes an hashtable since that's required in the composite resource.

@ph4s3r
Copy link

ph4s3r commented Nov 21, 2024

another example:

    Node localhost
    {
        AADAuthenticationFlowPolicy "AADAuthenticationFlowPolicy-cfa2cb79-d82b-4a55-834a-15c16e5ae4fc"
        {
...
        }
    }

--->

@{
    NonNodeData = @{
        AzureAd = @{
            AuthenticationFlowPolicy = @(
                @{
...
                }
            )
        }
    }
}

ph4s3r added a commit to ph4s3r/M365DSCTools that referenced this issue Nov 21, 2024
Modify Convert-M365DSCExportToPowerShellDataFile to correctly handle singleton resources.

based on the type of data in exampleresourcedata just move the resource object as-is (if hashmap) to the result struct or wrap the elements into an array (original)
ph4s3r added a commit to ph4s3r/M365DSCTools that referenced this issue Nov 26, 2024
based on the type of data in exampleresourcedata just move the resource object as-is (if hashmap) to the result struct or wrap the elements into an array (original)
@ykuijs
Copy link
Owner

ykuijs commented Dec 3, 2024

We are currently working on updating this function. If will contain a lot of improvements and checks to make sure the generated output is valid.

Unfortunately we do not have an ETA yet

@ykuijs
Copy link
Owner

ykuijs commented Dec 3, 2024

Related to issue #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants