Here is my code in index.ts
import {Key, ServiceAccount} from "@pulumi/google-native/iam/v1";
const serviceAccountKey = new Key('service-account-key-' + new Date().toISOString(), {
serviceAccountId: serviceAccount.email
});
export const serviceAccountKeyStr = serviceAccountKey.privateKeyData.apply(
async privateKeyData => {
console.log("========privateKeyData=========",privateKeyData);
return privateKeyData;
}
but the output is
========privateKeyData========= undefined
what's wrong with my code ?
I want to update my google cloud IAM service Account key with Pulumi. but serviceAccountKey.privateKeyData is null. however others params is not null(eg:serviceAccountKey.name & serviceAccountKey.serviceAccountId ...)
so,I really want to know why it is