Data Source: azurermSubscription
Use this data source to access information about an existing Subscription.
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 dataAzurermSubscriptionCurrent =
new azurerm.dataAzurermSubscription.DataAzurermSubscription(
this,
"current",
{}
);
new cdktf.TerraformOutput(this, "current_subscription_display_name", {
value: dataAzurermSubscriptionCurrent.displayName,
});
Argument Reference
subscriptionId
- (Optional) Specifies the ID of the subscription. If this argument is omitted, the subscription ID of the current Azure Resource Manager provider is used.
Attributes Reference
id
- The ID of the 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 Subscription.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Subscription.