How to Bootstrap EC2 Instance with user data script in Terraform | Terraform userdata example

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

ความคิดเห็น • 29

  • @mounireddy3514
    @mounireddy3514 2 ปีที่แล้ว

    Ur videos very useful to learn less time, ur channel have great future all d best

    • @cloudchamp
      @cloudchamp  2 ปีที่แล้ว

      Thanks man. So glad it helped you 🤗

  • @UniqueAB247
    @UniqueAB247 หลายเดือนก่อน

    2:30 - 2:45 valid. Thank you.

  • @gamingchamp3070
    @gamingchamp3070 ปีที่แล้ว

    Very useful information. Completely understood using user data scripts bow

  • @edithcherotich742
    @edithcherotich742 6 หลายเดือนก่อน

    can the same be used in a launch template?

  • @inthecloud1043
    @inthecloud1043 2 ปีที่แล้ว

    Your videos are extremely helpful 👍

    • @cloudchamp
      @cloudchamp  2 ปีที่แล้ว

      Happy to help you

  • @mohamedsabry4219
    @mohamedsabry4219 ปีที่แล้ว

    Thank you brother , this helped me

    • @cloudchamp
      @cloudchamp  ปีที่แล้ว

      Means a lot to me!
      Happy to help ☺️

  • @aksnish1
    @aksnish1 11 หลายเดือนก่อน

    Useful explanation..

    • @cloudchamp
      @cloudchamp  11 หลายเดือนก่อน

      Glad you liked it

  • @mounireddy3514
    @mounireddy3514 2 ปีที่แล้ว

    Ur doing great job

  • @mohdfaiz9197
    @mohdfaiz9197 ปีที่แล้ว

    How to use two different script

  • @inthecloud1043
    @inthecloud1043 2 ปีที่แล้ว

    Thank you man!

    • @cloudchamp
      @cloudchamp  2 ปีที่แล้ว

      Your welcome 🙏

  • @anushaaravind3406
    @anushaaravind3406 2 ปีที่แล้ว

    Hello Champ, Can you please explain how to pass multi line user_data using cloudinit_config.

  • @DevOpsPulse
    @DevOpsPulse 2 ปีที่แล้ว

    Thanks for sharing

    • @cloudchamp
      @cloudchamp  2 ปีที่แล้ว

      Your welcome 🤗

  • @susanca8443
    @susanca8443 ปีที่แล้ว

    Even after removing the s, I get This site can’t be reached

    • @cloudchamp
      @cloudchamp  ปีที่แล้ว

      Do you have security group with proper ports opened?

  • @davidoh6342
    @davidoh6342 ปีที่แล้ว

    What is user data?

    • @cloudchamp
      @cloudchamp  ปีที่แล้ว

      User data is a bash script used to bootstrap ec2 instances

  • @susanca8443
    @susanca8443 ปีที่แล้ว

    Seems helpful but it is not working for me.

    • @cloudchamp
      @cloudchamp  ปีที่แล้ว

      Whats the error you are getting??

    • @susanca8443
      @susanca8443 ปีที่แล้ว

      @@cloudchamp I connection denied but I am d igging into it using a new ec2 instance I created manually from the console. I also manually created a new vpc and sg and made the necessary route etc tested it and finally it works from the console. Tomorrow I redo it using terraform. Also, i am not sure is userdata will work since I did that manually by ssh-ing into the manual ec2 and sudo-ing all your commands. At least it now works mon the manually created ec2. I will see tomorrow using terraform.

    • @susanca8443
      @susanca8443 ปีที่แล้ว

      ​@@cloudchamp I am faced by course deadlines so I hurried and got back to this today. Yeah, the ec2 set from the console worked because I created a vpc, subnet, and igw and also linked . Unfortunately I have tried to directly use the vpc_id of the in terraform's security group block and got an error when I do terraform apply: │ Error: creating EC2 Instance: InvalidParameter: Security group sg-0xxxxxx and subnet subnet-a44132c2 belong to different networks. (It does not make sense because I did not spacify any subnet. So why is it forcing me with that subnet?)

    • @cloudchamp
      @cloudchamp  ปีที่แล้ว

      @@susanca8443 always remember security group are az and vpc bounded so they should be in same az and vpc as subnet

    • @susanca8443
      @susanca8443 ปีที่แล้ว

      @@cloudchamp Thanks a lot. Done. Do you have any cool app I can buy and deploy, not a course. I have taken too many courses. Please just email me a list for me to see if the instructions would be easy to follow before I pay. I hope they are affordable. I am just a student but one of my friends will buy it for me. I really need to deploy stuff in aws and make them visible to the outside world. That is the only way I can learn for now. End-to end.