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

How to use dynamic Variable in Datum yml files? #175

Open
gabeKay opened this issue Nov 12, 2024 · 1 comment
Open

How to use dynamic Variable in Datum yml files? #175

gabeKay opened this issue Nov 12, 2024 · 1 comment

Comments

@gabeKay
Copy link

gabeKay commented Nov 12, 2024

Hello everyone,

I've been working with Datum, SharedDSC, SecretVaults, and so on for weeks. I've been dissecting your (Gael, Raandree) code for weeks, and sometimes it's been a real struggle, but I managed to build a professional-level environment that we can soon use in production. The idea behind Composite Configurations is fantastic – it makes my old DSC configurations look like monsters in comparison.

However, one thing I don’t understand is how I can interpret variables in the Datum YAML files. I see [X=...=] with variables in the YAMLs, but in the MOF files, they appear as strings. I'm using Get-SplattedResource.

image

Could you please give me a hint?

--------- EDIT -----------

I've partially figured it out. Setting variables simply works. However, when I need variables directly in the MOF build process, it doesn’t work. Is this even possible? In the workshop, encrypted credentials are already set in the YML, but that’s not an option for me. What does work is setting them directly in the SharedDSC. However, using the YML would be better

image

The certificate path also cannot be inserted dynamically; it is only interpreted in the final MOF.

image

RSOP YML
image

Best regards,
Gabe

@gabeKay gabeKay changed the title How to use dynmaic Variable in Datum yml files? How to use dynamic Variable in Datum yml files? Nov 12, 2024
@gabeKay
Copy link
Author

gabeKay commented Nov 13, 2024

I got it right. It is very well described, if I had looked in the right file

Datum.InvokeCommand makes the magic

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

1 participant