azure.core.Subscription
Manages an Alias for a Subscription - which adds an Alias to an existing Subscription, allowing it to be managed in the provider - or create a new Subscription with a new Alias.
NOTE: Destroying a Subscription controlled by this resource will place the Subscription into a cancelled state. It is possible to re-activate a subscription within 90-days of cancellation, after which time the Subscription is irrevocably deleted, and the Subscription ID cannot be re-used. For further information see here. Users can optionally delete a Subscription once 72 hours have passed, however, this functionality is not suitable for this provider. A
Deleted
subscription cannot be reactivated.
NOTE: It is not possible to destroy (cancel) a subscription if it contains resources. If resources are present that are not managed by the provider then these will need to be removed before the Subscription can be destroyed.
NOTE: Azure supports Multiple Aliases per Subscription, however, to reliably manage this resource in this provider only a single Alias is supported.
Example Usage
Creating A New Alias And Subscription For An Enrollment Account
using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleEnrollmentAccountScope = Azure.Billing.GetEnrollmentAccountScope.Invoke(new()
{
BillingAccountName = "1234567890",
EnrollmentAccountName = "0123456",
});
var exampleSubscription = new Azure.Core.Subscription("exampleSubscription", new()
{
SubscriptionName = "My Example EA Subscription",
BillingScopeId = exampleEnrollmentAccountScope.Apply(getEnrollmentAccountScopeResult => getEnrollmentAccountScopeResult.Id),
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleEnrollmentAccountScope, err := billing.GetEnrollmentAccountScope(ctx, &billing.GetEnrollmentAccountScopeArgs{
BillingAccountName: "1234567890",
EnrollmentAccountName: "0123456",
}, nil)
if err != nil {
return err
}
_, err = core.NewSubscription(ctx, "exampleSubscription", &core.SubscriptionArgs{
SubscriptionName: pulumi.String("My Example EA Subscription"),
BillingScopeId: *pulumi.String(exampleEnrollmentAccountScope.Id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.billing.BillingFunctions;
import com.pulumi.azure.billing.inputs.GetEnrollmentAccountScopeArgs;
import com.pulumi.azure.core.Subscription;
import com.pulumi.azure.core.SubscriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleEnrollmentAccountScope = BillingFunctions.getEnrollmentAccountScope(GetEnrollmentAccountScopeArgs.builder()
.billingAccountName("1234567890")
.enrollmentAccountName("0123456")
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.subscriptionName("My Example EA Subscription")
.billingScopeId(exampleEnrollmentAccountScope.applyValue(getEnrollmentAccountScopeResult -> getEnrollmentAccountScopeResult.id()))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_enrollment_account_scope = azure.billing.get_enrollment_account_scope(billing_account_name="1234567890",
enrollment_account_name="0123456")
example_subscription = azure.core.Subscription("exampleSubscription",
subscription_name="My Example EA Subscription",
billing_scope_id=example_enrollment_account_scope.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleEnrollmentAccountScope = azure.billing.getEnrollmentAccountScope({
billingAccountName: "1234567890",
enrollmentAccountName: "0123456",
});
const exampleSubscription = new azure.core.Subscription("exampleSubscription", {
subscriptionName: "My Example EA Subscription",
billingScopeId: exampleEnrollmentAccountScope.then(exampleEnrollmentAccountScope => exampleEnrollmentAccountScope.id),
});
resources:
exampleSubscription:
type: azure:core:Subscription
properties:
subscriptionName: My Example EA Subscription
billingScopeId: ${exampleEnrollmentAccountScope.id}
variables:
exampleEnrollmentAccountScope:
fn::invoke:
Function: azure:billing:getEnrollmentAccountScope
Arguments:
billingAccountName: '1234567890'
enrollmentAccountName: '0123456'
Creating A New Alias And Subscription For A Microsoft Customer Account
using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleMcaAccountScope = Azure.Billing.GetMcaAccountScope.Invoke(new()
{
BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
BillingProfileName = "PE2Q-NOIT-BG7-TGB",
InvoiceSectionName = "MTT4-OBS7-PJA-TGB",
});
var exampleSubscription = new Azure.Core.Subscription("exampleSubscription", new()
{
SubscriptionName = "My Example MCA Subscription",
BillingScopeId = exampleMcaAccountScope.Apply(getMcaAccountScopeResult => getMcaAccountScopeResult.Id),
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleMcaAccountScope, err := billing.GetMcaAccountScope(ctx, &billing.GetMcaAccountScopeArgs{
BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
BillingProfileName: "PE2Q-NOIT-BG7-TGB",
InvoiceSectionName: "MTT4-OBS7-PJA-TGB",
}, nil)
if err != nil {
return err
}
_, err = core.NewSubscription(ctx, "exampleSubscription", &core.SubscriptionArgs{
SubscriptionName: pulumi.String("My Example MCA Subscription"),
BillingScopeId: *pulumi.String(exampleMcaAccountScope.Id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.billing.BillingFunctions;
import com.pulumi.azure.billing.inputs.GetMcaAccountScopeArgs;
import com.pulumi.azure.core.Subscription;
import com.pulumi.azure.core.SubscriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleMcaAccountScope = BillingFunctions.getMcaAccountScope(GetMcaAccountScopeArgs.builder()
.billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
.billingProfileName("PE2Q-NOIT-BG7-TGB")
.invoiceSectionName("MTT4-OBS7-PJA-TGB")
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.subscriptionName("My Example MCA Subscription")
.billingScopeId(exampleMcaAccountScope.applyValue(getMcaAccountScopeResult -> getMcaAccountScopeResult.id()))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_mca_account_scope = azure.billing.get_mca_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
billing_profile_name="PE2Q-NOIT-BG7-TGB",
invoice_section_name="MTT4-OBS7-PJA-TGB")
example_subscription = azure.core.Subscription("exampleSubscription",
subscription_name="My Example MCA Subscription",
billing_scope_id=example_mca_account_scope.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleMcaAccountScope = azure.billing.getMcaAccountScope({
billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
billingProfileName: "PE2Q-NOIT-BG7-TGB",
invoiceSectionName: "MTT4-OBS7-PJA-TGB",
});
const exampleSubscription = new azure.core.Subscription("exampleSubscription", {
subscriptionName: "My Example MCA Subscription",
billingScopeId: exampleMcaAccountScope.then(exampleMcaAccountScope => exampleMcaAccountScope.id),
});
resources:
exampleSubscription:
type: azure:core:Subscription
properties:
subscriptionName: My Example MCA Subscription
billingScopeId: ${exampleMcaAccountScope.id}
variables:
exampleMcaAccountScope:
fn::invoke:
Function: azure:billing:getMcaAccountScope
Arguments:
billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
billingProfileName: PE2Q-NOIT-BG7-TGB
invoiceSectionName: MTT4-OBS7-PJA-TGB
Creating A New Alias And Subscription For A Microsoft Partner Account
using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleMpaAccountScope = Azure.Billing.GetMpaAccountScope.Invoke(new()
{
BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
CustomerName = "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
});
var exampleSubscription = new Azure.Core.Subscription("exampleSubscription", new()
{
SubscriptionName = "My Example MPA Subscription",
BillingScopeId = exampleMpaAccountScope.Apply(getMpaAccountScopeResult => getMpaAccountScopeResult.Id),
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleMpaAccountScope, err := billing.GetMpaAccountScope(ctx, &billing.GetMpaAccountScopeArgs{
BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
CustomerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
}, nil)
if err != nil {
return err
}
_, err = core.NewSubscription(ctx, "exampleSubscription", &core.SubscriptionArgs{
SubscriptionName: pulumi.String("My Example MPA Subscription"),
BillingScopeId: *pulumi.String(exampleMpaAccountScope.Id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.billing.BillingFunctions;
import com.pulumi.azure.billing.inputs.GetMpaAccountScopeArgs;
import com.pulumi.azure.core.Subscription;
import com.pulumi.azure.core.SubscriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleMpaAccountScope = BillingFunctions.getMpaAccountScope(GetMpaAccountScopeArgs.builder()
.billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
.customerName("2281f543-7321-4cf9-1e23-edb4Oc31a31c")
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.subscriptionName("My Example MPA Subscription")
.billingScopeId(exampleMpaAccountScope.applyValue(getMpaAccountScopeResult -> getMpaAccountScopeResult.id()))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_mpa_account_scope = azure.billing.get_mpa_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
customer_name="2281f543-7321-4cf9-1e23-edb4Oc31a31c")
example_subscription = azure.core.Subscription("exampleSubscription",
subscription_name="My Example MPA Subscription",
billing_scope_id=example_mpa_account_scope.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleMpaAccountScope = azure.billing.getMpaAccountScope({
billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
customerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
});
const exampleSubscription = new azure.core.Subscription("exampleSubscription", {
subscriptionName: "My Example MPA Subscription",
billingScopeId: exampleMpaAccountScope.then(exampleMpaAccountScope => exampleMpaAccountScope.id),
});
resources:
exampleSubscription:
type: azure:core:Subscription
properties:
subscriptionName: My Example MPA Subscription
billingScopeId: ${exampleMpaAccountScope.id}
variables:
exampleMpaAccountScope:
fn::invoke:
Function: azure:billing:getMpaAccountScope
Arguments:
billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
customerName: 2281f543-7321-4cf9-1e23-edb4Oc31a31c
Adding An Alias To An Existing Subscription
using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.Subscription("example", new()
{
Alias = "examplesub",
SubscriptionId = "12345678-12234-5678-9012-123456789012",
SubscriptionName = "My Example Subscription",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := core.NewSubscription(ctx, "example", &core.SubscriptionArgs{
Alias: pulumi.String("examplesub"),
SubscriptionId: pulumi.String("12345678-12234-5678-9012-123456789012"),
SubscriptionName: pulumi.String("My Example Subscription"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.Subscription;
import com.pulumi.azure.core.SubscriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Subscription("example", SubscriptionArgs.builder()
.alias("examplesub")
.subscriptionId("12345678-12234-5678-9012-123456789012")
.subscriptionName("My Example Subscription")
.build());
}
}
import pulumi
import pulumi_azure as azure
example = azure.core.Subscription("example",
alias="examplesub",
subscription_id="12345678-12234-5678-9012-123456789012",
subscription_name="My Example Subscription")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.Subscription("example", {
alias: "examplesub",
subscriptionId: "12345678-12234-5678-9012-123456789012",
subscriptionName: "My Example Subscription",
});
resources:
example:
type: azure:core:Subscription
properties:
alias: examplesub
subscriptionId: 12345678-12234-5678-9012-123456789012
subscriptionName: My Example Subscription
Create Subscription Resource
new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);
@overload
def Subscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
billing_scope_id: Optional[str] = None,
subscription_id: Optional[str] = None,
subscription_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
workload: Optional[str] = None)
@overload
def Subscription(resource_name: str,
args: SubscriptionArgs,
opts: Optional[ResourceOptions] = None)
func NewSubscription(ctx *Context, name string, args SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions? opts = null)
public Subscription(String name, SubscriptionArgs args)
public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
type: azure:core:Subscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Subscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Subscription resource accepts the following input properties:
- Subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- Alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- Billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- Subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- Dictionary<string, string>
A mapping of tags to assign to the Subscription.
- Workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- Subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- Alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- Billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- Subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- map[string]string
A mapping of tags to assign to the Subscription.
- Workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- subscription
Name String The Name of the Subscription. This is the Display Name in the portal.
- alias String
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope StringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id String The ID of the Subscription. Changing this forces a new Subscription to be created.
- Map<String,String>
A mapping of tags to assign to the Subscription.
- workload String
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- {[key: string]: string}
A mapping of tags to assign to the Subscription.
- workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- subscription_
name str The Name of the Subscription. This is the Display Name in the portal.
- alias str
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing_
scope_ strid The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription_
id str The ID of the Subscription. Changing this forces a new Subscription to be created.
- Mapping[str, str]
A mapping of tags to assign to the Subscription.
- workload str
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- subscription
Name String The Name of the Subscription. This is the Display Name in the portal.
- alias String
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope StringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id String The ID of the Subscription. Changing this forces a new Subscription to be created.
- Map<String>
A mapping of tags to assign to the Subscription.
- workload String
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:
Look up Existing Subscription Resource
Get an existing Subscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SubscriptionState, opts?: CustomResourceOptions): Subscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
billing_scope_id: Optional[str] = None,
subscription_id: Optional[str] = None,
subscription_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tenant_id: Optional[str] = None,
workload: Optional[str] = None) -> Subscription
func GetSubscription(ctx *Context, name string, id IDInput, state *SubscriptionState, opts ...ResourceOption) (*Subscription, error)
public static Subscription Get(string name, Input<string> id, SubscriptionState? state, CustomResourceOptions? opts = null)
public static Subscription get(String name, Output<String> id, SubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- Billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- Subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- Subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- Dictionary<string, string>
A mapping of tags to assign to the Subscription.
- Tenant
Id string The ID of the Tenant to which the subscription belongs.
- Workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- Alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- Billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- Subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- Subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- map[string]string
A mapping of tags to assign to the Subscription.
- Tenant
Id string The ID of the Tenant to which the subscription belongs.
- Workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- alias String
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope StringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id String The ID of the Subscription. Changing this forces a new Subscription to be created.
- subscription
Name String The Name of the Subscription. This is the Display Name in the portal.
- Map<String,String>
A mapping of tags to assign to the Subscription.
- tenant
Id String The ID of the Tenant to which the subscription belongs.
- workload String
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- alias string
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope stringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id string The ID of the Subscription. Changing this forces a new Subscription to be created.
- subscription
Name string The Name of the Subscription. This is the Display Name in the portal.
- {[key: string]: string}
A mapping of tags to assign to the Subscription.
- tenant
Id string The ID of the Tenant to which the subscription belongs.
- workload string
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- alias str
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing_
scope_ strid The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription_
id str The ID of the Subscription. Changing this forces a new Subscription to be created.
- subscription_
name str The Name of the Subscription. This is the Display Name in the portal.
- Mapping[str, str]
A mapping of tags to assign to the Subscription.
- tenant_
id str The ID of the Tenant to which the subscription belongs.
- workload str
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
- alias String
The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created.
- billing
Scope StringId The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID.
- subscription
Id String The ID of the Subscription. Changing this forces a new Subscription to be created.
- subscription
Name String The Name of the Subscription. This is the Display Name in the portal.
- Map<String>
A mapping of tags to assign to the Subscription.
- tenant
Id String The ID of the Tenant to which the subscription belongs.
- workload String
The workload type of the Subscription. Possible values are
Production
(default) andDevTest
. Changing this forces a new Subscription to be created.
Import
Subscriptions can be imported using the resource id
, e.g.
$ pulumi import azure:core/subscription:Subscription example "/providers/Microsoft.Subscription/aliases/subscription1"
In this scenario, the subscription_id
property can be completed and the provider will assume control of the existing subscription by creating an Alias. See the adding an Alias to an existing Subscription
above. This provider requires an alias to correctly manage Subscription resources due to Azure Subscription API design.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.