https://pulumi.com logo
Title
m

microscopic-xylophone-85966

09/03/2020, 2:13 PM
hello ppl, I have a question about AWS SDK trying to get aws account id, found following method:
acc, err := iam.LookupAccountAlias(ctx)
        ctx.Export("account_id", pulumi.String(acc.Id))
I expect numeric ID like here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity but I have the following
account_id   : "2020-09-03 11:45:17.12209 +0000 UTC"
Is it a bug or I should use other approaches?
l

lemon-agent-27707

09/03/2020, 3:19 PM
That does not seem right, would you mind opening an issue with repro instructions?
b

breezy-account-4110

09/03/2020, 4:15 PM
the .Id isn't the
AccountId
it's the pulumi resource Id: https://github.com/pulumi/pulumi-aws/blob/v3.2.1/sdk/go/aws/iam/getAccountAlias.go#L47-L48 although the docs show
ctx.Export("accountId", current.AccountAlias)
which also doesn't look right