Order of resource creation

Suppose I have these 2 resources in my configuration:

resource "azurerm_resource_group" "rg" {
  for_each = tomap({
    a_group       = "eastus"
    another_group = "westus2"
  })
  name     = each.key
  location = each.value
}
resource "aws_s3_bucket" "example" {
  # Because var.name includes each.key in the calling
  # module block, its value will be different for
  # each instance of this module.
  bucket = var.name

  # ...
}

Since there is no dependency/reference between these 2 resources will terraform create them concurrently ?

Is there some way to see the planned execution graph (maybe by CLI) ?

Yes, if there is no dependency between the two resources Terraform may create them concurrently.

You can see some forms of the graph using the terraform graph command. The default output is somewhat oversimplified, but will show the configured resources and how they interconnect.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.