colossal-boots-62227
11/22/2021, 10:50 AMSecretVersion
and then run pulumi up
on my local machine, I expect the secret to created directly in the AWS Secrets Manager. The secret is also stored in Pulumi state (encrypted as per the document above) and also in the activity / diff log available from the web console (which appears to be in plaintext)secretsprovider
(using a key in AWS KMS) and then created a new Secret
/ SecretVersion
. As before, the activity section of the Pulumi web console show the secret in plaintext, clearly indicating that the secrets are being transferred to the Pulumi web console backend in plaintext (over TLS of course, but that isn’t the point)pulumi -v 999 up --logtostderr
) this can clearly be seen in the JSON payload uploaded to Pulumi (i.e. calls to `https://api.pulumi.com/api/stacks/fuji/secrettest/dev/update/xxx/checkpoint`) contains the resource for the SecretVersion
which includes the inputs
which contains the secretString
plaintext:
"inputs": {
"secretId": "arn:aws:secretsmanager:...",
"secretString": "xxx1234yyy"
}
hallowed-horse-57635
11/24/2021, 4:26 AMred-match-15116
11/24/2021, 4:52 AMSecret
as a pulumi secret it will not be stored in plaintext. So like:
const cfg = new pulumi.Config()
const param = new aws.ssm.Parameter("a-secret-param", {
type: "SecureString",
value: cfg.requireSecret("my-secret-value"),
});
Will never be stored as plaintext in the checkpoint file.
You can also use your own secret provider and the service will never have access to the decrypted secret.colossal-boots-62227
11/24/2021, 5:48 AMred-match-15116
11/24/2021, 6:55 AMWhat I want is to avoid placing my secrets in Pulumi at all, regardless of whether Pulumi is able to decrypt them or notYeah, that's not possible unless you use self-managed or self-hosted as you described above.
colossal-boots-62227
11/24/2021, 7:46 AMfaint-table-42725
11/24/2021, 2:45 PMignoreChanges
and feeding in an initial dummy value that you later change out of band of Pulumi.pulumi refresh
would read the value and update the underlying state.red-match-15116
11/24/2021, 6:22 PMRationale: Creating an encrypted/secret config entry to avoid plaintext secrets from being sent to the backend (as part of the checkpoint data) is an undesirable workaround when you consider that the Pulumi backend doesn’t actually need the secret at all.The Pulumi backend does need the secret if you are creating the secret in Pulumi because it is part of the `Secret`'s state. It also needs the secret if you are passing it as an input into another resource (because it is part of that resource's state). If you are using Pulumi to manage your state, it seems inconceivable that it wouldn't need your secret in some form - since that secret is inherently part of the state that you are asking Pulumi to manage.
colossal-boots-62227
11/25/2021, 4:38 AMignoreChanges
@faint-table-42725, thank you for flagging that, it is certainly useful here.Instance
with an ephemeral bootstrap password (lets call it p1
) with ignoreChanges
on password
• Create a Secret
(s1
) and SecretVersion
with a secret_string
that contains p1
with ignoreChanges
on secret_string
• Create a SecretRotation
for s1
(and associated Lambda function)
• Create an application which reads the RDS password from s1
pulumi refresh
would update the password (is that still true when ignoreChanges
is used? p1
but that felt like overkillred-match-15116
11/25/2021, 8:24 AMIs this operation ever invoked as part of another command or only ever explicitly?Refresh is only ever called explicitly or by setting a Pulumi.yaml config setting to always refresh on update. Your approach sounds reasonable to me!
colossal-boots-62227
11/26/2021, 1:20 AM