Skip to content
Brandon Olin edited this page May 13, 2016 · 6 revisions

What is a resolver?

Resolvers are various methods POSHOrigin can use to create a PowerShell credential object from data in the configuration file. These credentials are then passed to the DSC resource when it is compiled. Using resolvers, sensitive data like usernames / passwords can be stored separately from the configuration and pulled in when the configuration file is read.

Currently, POSHOrigin supports the following resolvers:

  • PasswordState

    Resolves a credential object using ClickStudio's PasswordState vault.

  • ProtectedData

    Resolves a credential object using the ProtectedData PowerShell module.

  • PSCredential

    Resolves a credential object using a plain text username and password. USE ONLY FOR TESTING!

EXAMPLE

resource 'vsphere:vm' 'VM01' @{
    ensure = 'present'
    description = 'Test VM'
    ###
    # Other options omitted for brevity
    ###
    vCenterCredentials = Get-POSHOriginSecret 'passwordstate' @{
        endpoint = 'https://passwordstate.local/api'
        credApiKey = '<your API key>'
        passwordId = 1234
    }
    guestCredentials = Get-POSHOriginSecret 'pscredential' @{
        username = 'administrator'
        password = '<your password>'
    }
}

Clone this wiki locally