q

    quick-fall-21011

    7 months ago
    Dear helpful community, I'm at a dead end with the https://github.com/pulumi/pulumi-keycloak resource provider. I'm creating my keycloak deployment as a helm chart in Project A, which saves the
    keycloak:url
    and
    keycloak:password
    as Stack Outputs. In Project B, I'd like to create a new Realm, and other related objects, however the login depends on these credentials being in Project B's config, or environment variables. I'd like it all to be automated, so although I can manually set the configuration in Project B, I'd like to avoid that. I tried the suggested alternative method, using Environment variables and setting them inside the project, e.g.
    Environment.SetEnvironmentVariable("KEYCLOAK_CLIENT_ID", "admin-cli");
    But seems the process can't access them, as it still complains that they're not set
    Diagnostics:
      keycloak:index:Realm (pinostrats):
        error: 2 errors occurred:
            * missing required configuration key "keycloak:clientId":
        Set a value using the command `pulumi config set keycloak:clientId <value>`.
            * missing required configuration key "keycloak:url": The base URL of the Keycloak instance, before `/auth`
        Set a value using the command `pulumi config set keycloak:url <value>`.
    Any ideas on how to get around this? Somehow manually instantiate the provider?
    Ah.. hang on a second.. maybe I did just answer my own question... let me explore a little
    e

    echoing-dinner-19531

    7 months ago
    Sounds like you want explicit providers and stack references
    q

    quick-fall-21011

    7 months ago
    Sorry for the late reply. Got that sorted, thanks