This message was deleted.
# general
s
This message was deleted.
b
can you share your code?
b
Copy code
const kmsKey = new aws.kms.Key("config", { deletionWindowInDays: 10, enableKeyRotation: true });

new aws.kms.Alias("config", { name: `alias/foo`, targetKeyId: kmsKey.keyId });
l
Use
targetKeyId: kmsKey.id
, that's working for me.
b
Copy code
error: aws:kms/alias:Alias resource 'config' has a problem: Invalid or unknown key
i get this with kmsKey.arn, kmsKey.id, kmsKey.keyId
l
And the alias and key are in the same account / provider?
b
yes
this is the first issue i've seen like this in any provider, probably 5k+ lines of pulumi ts
b
i've just run this example and it had zero issues, i'm wondering if you've redefined
kmsKey
somehow?
l
Or any change that the key rotation auto-happens immediately, and the key id is invalid?
Maybe try it with rotation off, and if it works, turn rotation on?
b
it was an unrelated transformer in a deeper part of the project
thanks for the help, this was a super strange error
l
Ooo. What did it do?
b
add AWS tags
l
And that caused the key id to be changed?
🤔
b
you can't add tags to an AWS KMS key alias
l
Ah.
b
invalid api call
b
that is a strange error, glad you figured it out
b
"invalid key" == invalid hash/object/dict key, not invalid KMS key
l
Cool. I've just double-checked my isTaggable function and glad to say, no key/alias:Alias in there 🙂
b
yeah this transformer is blacklist vs whitelist
very few items don't support aws tags
l
It's like the .gitignore policy.. whitelisting is safer but way more verbose...