I'm running into an issue with creating a Provider...
# general
a
I'm running into an issue with creating a Provider instance for Vault. I'm trying to use the
auth_logins
parameter, and as part of that I'm setting the
address
in the initialization and setting the token to an empty string. Until I set the environment variable myself (
VAULT_ADDR
) I kept getting errors saying that I needed to set the
vault:address
parameter in the stack (which was already there). Now I'm getting an error of
no vault token found
. Has anyone had experience of using username/password login for the Vault provider? This is the code I'm using to create the provider:
Copy code
vault_provider = vault.Provider(
    "vault-provider",
    address=vault_address.apply("https://{}".format),
    add_address_to_env=True,
    token="",
    auth_logins=[
        vault.ProviderAuthLoginArgs(
            path=f"auth/pulumi/login/{pulumi_vault_creds['auth_username']}",
            method="userpass",
            parameters={
                "password": pulumi_vault_creds["auth_password"],
            },
        )
    ],
)
(vault_address is a stack output from another stack)