My code in index.ts is as follows:
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;
}
However, the output shows:
========privateKeyData========= undefined
I'm currently facing an issue with my code. I am trying to update my Google Cloud IAM service Account key using Pulumi, but for some reason, serviceAccountKey.privateKeyData is null. Even though other parameters such as serviceAccountKey.name and serviceAccountKey.serviceAccountId are not null.
I'm really puzzled by this behavior and would appreciate any insights into what might be causing this.