Explicit dependencies in Terraform

depends_on allows you to create an explicit dependency between two resources.
Multiple dependencies can be passed to the depends_on argument using a comma-separated list of resources.
Example:

resource "aws_s3_bucket" "createfirst" {
  bucket = "bucketname55667788"
  acl    = "private"
}

resource "aws_instance" "server" {
  ami           = "ami-123456789"
  instance_type = "t3.nano"

  # Tells Terraform that this EC2 instance must be created only after the
  # S3 bucket has been created.
  depends_on = [aws_s3_bucket.createfirst]
}