I joined a team already using Pulumi and am workin...
# aws
a
I joined a team already using Pulumi and am working to spin up a new resource. In spinning up an ec2 instance, it seems as though setting
associatePublicIpAddress
to false doesn't actually do anything and it assigns it anyway and tracks it as true. I'm new to Pulumi so I may be missing something, or maybe just be missing some odd default behavior in AWS. Code in thread.
Copy code
const web = new aws.ec2.Instance('my-instance', {
  ami: recentAmazonLinuxAmi().id,
  instanceType: 't4g.nano',
  associatePublicIpAddress: false,
});
b
It's set to true in the state? Which subnet are you using, if the subnet is public that takes precedence
a
Oh of course. I was trying small, incremental examples but I just charged forward and once I set all that the problem went away. That makes sense - shoulda thought of that.