https://pulumi.com logo
Title
s

swift-agency-29333

03/26/2021, 11:43 PM
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

broad-dog-22463

03/27/2021, 12:13 AM
Hi @swift-agency-29333 No Pulumi has no custom way to handle this at this time
👍 1
s

sparse-state-34229

03/27/2021, 3:08 AM
can you create an AMI or have ansible run from user data?
s

swift-agency-29333

03/27/2021, 11:37 AM
@broad-dog-22463 can we convert ec2.ID() i.e pulimi.IDOutput to string and *string?
w

worried-knife-31967

03/27/2021, 12:17 PM
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

swift-agency-29333

03/27/2021, 2:15 PM
Yup but I want to avoid using vanilla sdk if I am using pulumi.
w

worried-knife-31967

03/27/2021, 5:58 PM
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
😛artypus-8bit: 2