1

I'm currently using Pulumi TypeScript's Infrastructure as Code and I've been enjoying it so far. Unfortunately, I've hit a major roadblock. I was trying to create a SSM Parameter's store in my Pulumi config:


const config = new pulumi.Config();
const auth0ClientSecret = config.requireSecret("auth0-client_secret");
const auth0ClientId = config.requireSecret("auth0-client_id");

const auth0ClientSecretSSM = new aws.ssm.Parameter(
  "auth0-client_secret",
  {
    name: "auth0_client_secret_" + env,
    type: "SecureString",
    value: auth0ClientSecret,
  }
);

const auth0ClientIdSecretSSM = new aws.ssm.Parameter("auth0-client_id", {
  type: "SecureString",
  value: auth0ClientId,
});

I tried doing this. I set up the secrets to the config accordingly:

pulumi config set --secret auth0-client_secret thesecret pulumi config set --secret auth0-client_id theId

After that, and running pulumi up, I got hit with:

Diagnostics:
  aws:iam:Policy (schon-SQS-send-messages-dev):
    error: could not validate provider configuration: 2 errors occurred:
        * : invalid or unknown key: auth0_client_id
        * : invalid or unknown key: auth0_client_secret

And I haven't been able to get rid of that error ever since! I've been hitting my head for over 40 minutes by turning off/on pieces of code, and the only thing that it seems to work is if I start in blank state, in which Pulumi asks to delete all of my resources (something, of course, that I don't want to do).

I've tried: - pulumi config rm auth0_client_secret - pulumi config rm auth0-client_secret

I went into the User:/.pulumi folder in my Windows machine to see where could it be lying. No answer.

It seems that the problem lies in how Pulumi tends to see the hyphen - .

Is there a way to reset Pulumi's config? I even tried looking at the Yaml files and re-creating the keys and deleting them again to no avail. I can't seem to find anything online either.

Just this: https://www.pulumi.com/docs/intro/concepts/config/#changing-the-secrets-provider-for-a-stack

Any ideas?

Thank you!!

Jose A
  • 10,053
  • 11
  • 75
  • 108
  • 1
    The config values are stored in `Pulumi..yaml` file in your project directory. You should be able to clean it up if needed without deleting resources. – Mikhail Shilkov May 28 '20 at 18:42
  • Thanks Mikhail! I ended up learning that it was a name conflict that caused the issue! – Jose A May 29 '20 at 12:16

1 Answers1

3

I ended up posting the issue on GitHub as well. Thanks to the promptly reply from the team, it was pointed out that I was using aws as the project name, and that created a namespace problem. Renaming my stack to something else made everything work as expected.

I did

pulumi stack rename /my_user/new_project_name/dev

pulumi stack rename /my_user/new_project_name/prod

Jose A
  • 10,053
  • 11
  • 75
  • 108