Hi Team , I am deploying EC2 machine using golang ...
# golang
Hi Team , I am deploying EC2 machine using golang api. After provisioning we would like to confirm if the machine is fully provisioned before deploying other services. Is there a way to check using pulumi automation api to confirm that machine is fully provisioned?
I’m not sure what fully provisioned here means, but my guess is that your best hope is to use the
module with the
command to verify this.
Thanks @bored-table-20691, What I meant with provisioned the machine is ready for ssh connection . I am looking to deploy docker compose file after creating the ec2 machine and I guess we need to ssh . Can command module confirm if the machine is ready for ssh connection ?
Also one more question please . I have a following docker-compose file which i would like to deploying using Pulumi, is this possible ? on the newly created ec2 machine with pulumi
Copy code
    image: '<http://mcr.microsoft.com/mssql/server|mcr.microsoft.com/mssql/server>'
        - '1433:1433'
        - ACCEPT_EULA=Y
        - SA_PASSWORD=Secret1234
        - './drive:/var/opt/mssql'
This might be a great task to use cloud-init aka userdata for. TLDR all the ssh commands you want to do you provide in a "script" for the machine to run at boot. You could hydrate the secret at deploy time by having cloudinit perform a shell command to fetch secret from aws Secret Manager or Parameter Store. I did this at previous gig and it was super reliable.
@astonishing-solstice-53645 Thanks for the suggestion , Is there s a example in golang I can follow as starting point
https://yetiops.net/posts/pulumi-iac-terraform/#pulumi-using-go This came up on a quick search. I skimmed it and a follow up post about other cloud providers but looks good. Also cloudinit.readthedocs.io is invaluable.
You can also use the Pulumi provider for this, but I only have TS examples
Thanks @quiet-wolf-18467, If you can share the TS example please , i will try to see how can I convert to go code