Skip to content

Commit

Permalink
fix: pull only enabled subscriptions (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewelizondo authored Apr 4, 2022
1 parent 80f3611 commit aac728d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
subscription_ids = var.all_subscriptions ? (
// the user wants to grant access to all subscriptions
[for s in data.azurerm_subscriptions.available.subscriptions : s.subscription_id]
[for s in data.azurerm_subscriptions.available.subscriptions : s.subscription_id if s.state == "Enabled"]
) : (
// or, if the user wants to grant a list of subscriptions,
// if none then we default to the primary subscription
Expand Down

0 comments on commit aac728d

Please sign in to comment.