https://pulumi.com logo
#general
Title
# general
s

salmon-account-74572

05/08/2019, 8:13 PM
Hi all, I'm using Pulumi via JavaScript with AWS and seeing some strange behavior with the
getAmi
function. (I freely admit this could be due to my lack of experience with JavaScript.) Here's the code in question:
Copy code
const bionicAmi  = aws.getAmi({
    filter: [
        { name: "name", values: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server*" },
        { name: "virtualization-type", values: "hvm" },
        { name: "root-device-type", values: "ebs" },
    ],
    mostRecent: true,
    owners: [ "099720109477" ],
});
Using this set of filters with the AWS CLI works perfectly, but here it returns a completely different AMI. What am I missing?
c

chilly-crayon-57653

05/09/2019, 6:04 PM
This is why I love TypeScript!
Note the squiggles 🙂
s

salmon-account-74572

05/09/2019, 6:53 PM
Hmmm...for a newbie (to JS/TS) such as myself, that could prove quite useful.
c

chilly-crayon-57653

05/09/2019, 7:41 PM
you bet! trust me, you'll get hooked, and i'm not just saying that because @white-balloon-205 has literally given me hours of my life back, ever since he started Strada (initial name for TypeScript)