Create Azure subscription and its resources in one stack

Looking to build a Terraform stack that uses the AzureRm provider to manage an Azure subscription and any related resources in unison anytime the stack is operated upon.

  • terraform apply
    • create/update the Azure subscription
    • create/update its Azure resources
  • terraform destroy
    • delete the Azure resources
    • cancel their Azure subscription

Is this possible?

Looks like I’m not the only one wondering if this is possible: https://www.reddit.com/r/Terraform/comments/sbgfdo/how_to_create_and_reference_subscriptions_in/

1 Like

This was a long time ago, but have answered here: How to create Azure Subscription and deploy into it in same stream