I've been using the Pulumi AI <https://www.pulumi....
# general
p
I've been using the Pulumi AI https://www.pulumi.com/ai/ and whilst it is quite handy it does seem to make up stuff, i.e. produce code that is more wishful thinking than actually viable. The other day I asked it about base64 encoding of userData in an aws-native launchTemplate and it happily told me that I didn't need to base64 encode it, but on reading the docs I couldn't find a launchTemplate function in the aws-native provider, and the one in the aws provider needs the userData to be base64 encoded. Today I asked it how to add an instance role to a launch template, and it correctly told me I need to add an instance profile to the template, but the code it provided
Copy code
// Create the launch template that uses the instance profile and IAM role
const launchTemplate = new aws.ec2.LaunchTemplate("launchTemplate", {
    imageId: "ami-0c94855ba95b798c7", // Replace with the desired AMI ID
    instanceType: "t2.micro", // Change to desired instance type
    instanceProfileName: instanceProfile.name,
    // Additional launch template settings can be added here, such as security groups
});
uses instanceProfileName, which the compiler complained about and the docs say doesn't exist. There is iamInstanceProfile which takes an arn, so I was able to make it work. I'm not complaining, I do find the AI to be useful, but it is worth noting that its code needs checking.
m
This is unfortunately just how ChatGPT behaves currently; it can be confidently incorrect. Take everything it says with a grain of salt.
I once had normal ChatGPT telling me to install some "custom resources" for Chef InSpec from a GitHub repository and documentation website that didn't exist. I prompted it, it figured out key bits of information I said to it, and used the models it has to produce something intelligible based on what it knows about other resources following that pattern.
It's a great tool in that it can fill gaps in reference documentation and examples, but there is no interpreter involved in running/analyzing/testing the solutions.
p
a confident liar. maybe ChatGPT should run for office