Executing remote-exec via terraform led to my resource to stuck at still creating

This page summarizes the projects mentioned and recommended in the original post on /r/Terraform

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • golangapp

    Repository created by AWS CodeStar.

  • resource "null_resource" "instance" { depends_on = [ aws_instance.main ] connection { type = "ssh" host = aws_instance.main.public_ip user = "ubuntu" private_key = file("${path.module}/main_key.pem") } provisioner "remote-exec" { inline = [ "sleep 10", "sudo apt update -y", "sudo apt install git -y", "sudo apt install golang -y", "sudo git clone https://github.com/viveksiddhartha/golangapp.git /home/ubuntu/golangapp", "cd golangapp", "sudo go build ./", "./main", "sleep 10" ] } }

  • terraform-aws-ssh-bastion-service

    Terraform plan to deploy ssh bastion as a containerised, stateless service on AWS with IAM based authentication

  • You should try to avoid using remote exec with terraform wherever possible. It's not a great fit with the declarative approach that Terraform aims for. Here you would be better off using 'user data' to provision your instance. I have a public project that deploys and builds a Golang app on EC2. It's a bit more complicated than your example here, but it does demonstrate a method for doing what you're trying to do with the approach that I have suggested.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Create and Deploy AWS EKS Cluster with Terraform.

    1 project | dev.to | 4 May 2024
  • No More Passwords! Terraform Module Makes GCP-GitHub Authentication a Breeze

    1 project | dev.to | 1 May 2024
  • Open Source Infrastructure Deployment Tool for Early Stage Startups

    1 project | news.ycombinator.com | 30 Apr 2024
  • Stack Grafana deployed on AWS ECS -Part 1 - Create a Cluster

    1 project | dev.to | 26 Apr 2024
  • Terraform Starter Boilerplate for GCP using Terragrunt

    2 projects | dev.to | 26 Apr 2024