I am creating EC2 machine and right after that I a...
# general
s
I am creating EC2 machine and right after that I am running ansible. But the problem is machine state gets to “running” after some time and due to that ansible fails to reach the server. Is there await or anything in native pulumi as an option while creating EC2? I know we can add our own custom loop and check state of the machine and then continue but I want to try pulumi option if available.
b
Hi @swift-agency-29333 No Pulumi has no custom way to handle this at this time
👍 1
s
can you create an AMI or have ansible run from user data?
s
@broad-dog-22463 can we convert ec2.ID() i.e pulimi.IDOutput to string and *string?
w
You could go to the AWS SDK in your pulumi code and run a loop waiting for the state of the machine to change to running before hitting ansible.
1
s
Yup but I want to avoid using vanilla sdk if I am using pulumi.
w
To me, this is WHY I use pulumi. The ability to piggy back on the authentication, and seamlessly integrate is awesome. No shelling out, custom provisioners... Just code.
❤️ 2
partypus 8bit 2