Data Source: azurermSubscriptions
Use this data source to access information about all the Subscriptions currently available.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermSubscriptionsAvailable =
new azurerm.dataAzurermSubscriptions.DataAzurermSubscriptions(
this,
"available",
{}
);
new cdktf.TerraformOutput(this, "available_subscriptions", {
value: dataAzurermSubscriptionsAvailable.subscriptions,
});
new cdktf.TerraformOutput(this, "first_available_subscription_display_name", {
value: `\${${dataAzurermSubscriptionsAvailable.subscriptions.fqn}[0].display_name}`,
});
Argument Reference
displayNamePrefix
- (Optional) A case-insensitive prefix which can be used to filter on thedisplayName
fielddisplayNameContains
- (Optional) A case-insensitive value which must be contained within thedisplayName
field, used to filter the results
Attributes Reference
subscriptions
- One or moresubscription
blocks as defined below.
The subscription
block contains:
id
- The ID of this subscription.subscriptionId
- The subscription GUID.displayName
- The subscription display name.tenantId
- The subscription tenant ID.state
- The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.locationPlacementId
- The subscription location placement ID.quotaId
- The subscription quota ID.spendingLimit
- The subscription spending limit.tags
- A mapping of tags assigned to the resource.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the subscriptions.