Module core

@pulumi/azure > core

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azure repo.

class ResourceGroup

extends CustomResource

Manages a resource group on Azure.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = new azure.core.ResourceGroup("test", {
    location: "West US",
    name: "testResourceGroup1",
    tags: {
        environment: "Production",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/resource_group.html.markdown.

constructor

new ResourceGroup(name: string, args?: ResourceGroupArgs, opts?: pulumi.CustomResourceOptions)

Create a ResourceGroup resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceGroupState, opts?: pulumi.CustomResourceOptions): ResourceGroup

Get an existing ResourceGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of ResourceGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property location

public location: pulumi.Output<string>;

The location where the resource group should be created. For a list of all Azure locations, please consult this link or run az account list-locations --output table.

property name

public name: pulumi.Output<string>;

The name of the resource group. Must be unique on your Azure subscription.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class TemplateDeployment

extends CustomResource

constructor

new TemplateDeployment(name: string, args: TemplateDeploymentArgs, opts?: pulumi.CustomResourceOptions)

Create a TemplateDeployment resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TemplateDeploymentState, opts?: pulumi.CustomResourceOptions): TemplateDeployment

Get an existing TemplateDeployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of TemplateDeployment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property deploymentMode

public deploymentMode: pulumi.Output<string>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Specifies the name of the template deployment. Changing this forces a new resource to be created.

property outputs

public outputs: pulumi.Output<{[key: string]: any}>;

A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].

property parameters

public parameters: pulumi.Output<{[key: string]: any} | undefined>;

Specifies the name and value pairs that define the deployment parameters for the template.

property parametersBody

public parametersBody: pulumi.Output<string | undefined>;

Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which to create the template deployment.

property templateBody

public templateBody: pulumi.Output<string>;

Specifies the JSON definition for the template.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

function getClientConfig

getClientConfig(opts?: pulumi.InvokeOptions): Promise<GetClientConfigResult>

Use this data source to access the configuration of the AzureRM provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const current = pulumi.output(azure.core.getClientConfig({}));

export const accountId = current.servicePrincipalApplicationId;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/client_config.html.markdown.

function getResourceGroup

getResourceGroup(args: GetResourceGroupArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceGroupResult>

Use this data source to access information about an existing Resource Group.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = pulumi.output(azure.core.getResourceGroup({
    name: "dsrg_test",
}));
const testManagedDisk = new azure.compute.ManagedDisk("test", {
    createOption: "Empty",
    diskSizeGb: 1,
    location: testResourceGroup.location,
    name: "managed_disk_name",
    resourceGroupName: testResourceGroup.name,
    storageAccountType: "Standard_LRS",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/resource_group.html.markdown.

function getSubscription

getSubscription(args?: GetSubscriptionArgs, opts?: pulumi.InvokeOptions): Promise<GetSubscriptionResult>

Use this data source to access information about an existing Subscription.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const current = pulumi.output(azure.core.getSubscription({}));

export const currentSubscriptionDisplayName = current.displayName;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/subscription.html.markdown.

function getSubscriptions

getSubscriptions(args?: GetSubscriptionsArgs, opts?: pulumi.InvokeOptions): Promise<GetSubscriptionsResult>

Use this data source to access information about all the Subscriptions currently available.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const available = pulumi.output(azure.core.getSubscriptions({}));

export const availableSubscriptions = available.subscriptions;
export const firstAvailableSubscriptionDisplayName = available.subscriptions[0].displayName;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/subscriptions.html.markdown.

function getUserAssignedIdentity

getUserAssignedIdentity(args: GetUserAssignedIdentityArgs, opts?: pulumi.InvokeOptions): Promise<GetUserAssignedIdentityResult>

Use this data source to access information about an existing User Assigned Identity.

Example Usage (reference an existing)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = pulumi.output(azure.core.getUserAssignedIdentity({
    name: "name_of_user_assigned_identity",
    resourceGroupName: "name_of_resource_group",
}));

export const uaiClientId = example.clientId;
export const uaiPrincipalId = example.principalId;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/user_assigned_identity.html.markdown.

interface GetClientConfigResult

A collection of values returned by getClientConfig.

property clientId

clientId: string;

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property servicePrincipalApplicationId

servicePrincipalApplicationId: string;

property servicePrincipalObjectId

servicePrincipalObjectId: string;

property subscriptionId

subscriptionId: string;

property tenantId

tenantId: string;

interface GetResourceGroupArgs

A collection of arguments for invoking getResourceGroup.

property name

name: string;

Specifies the name of the resource group.

interface GetResourceGroupResult

A collection of values returned by getResourceGroup.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property location

location: string;

The location of the resource group.

property name

name: string;

property tags

tags: {[key: string]: any};

A mapping of tags assigned to the resource group.

interface GetSubscriptionArgs

A collection of arguments for invoking getSubscription.

property subscriptionId

subscriptionId?: undefined | string;

Specifies the ID of the subscription. If this argument is omitted, the subscription ID of the current Azure Resource Manager provider is used.

interface GetSubscriptionResult

A collection of values returned by getSubscription.

property displayName

displayName: string;

The subscription display name.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property locationPlacementId

locationPlacementId: string;

The subscription location placement ID.

property quotaId

quotaId: string;

The subscription quota ID.

property spendingLimit

spendingLimit: string;

The subscription spending limit.

property state

state: string;

The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.

property subscriptionId

subscriptionId: string;

The subscription GUID.

interface GetSubscriptionsArgs

A collection of arguments for invoking getSubscriptions.

property displayNameContains

displayNameContains?: undefined | string;

A case-insensitive value which must be contained within the display_name field, used to filter the results

property displayNamePrefix

displayNamePrefix?: undefined | string;

A case-insensitive prefix which can be used to filter on the display_name field

interface GetSubscriptionsResult

A collection of values returned by getSubscriptions.

property displayNameContains

displayNameContains?: undefined | string;

property displayNamePrefix

displayNamePrefix?: undefined | string;

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property subscriptions

subscriptions: {
    displayName: string;
    locationPlacementId: string;
    quotaId: string;
    spendingLimit: string;
    state: string;
    subscriptionId: string;
}[];

One or more subscription blocks as defined below.

interface GetUserAssignedIdentityArgs

A collection of arguments for invoking getUserAssignedIdentity.

property name

name: string;

The name of the User Assigned Identity.

property resourceGroupName

resourceGroupName: string;

The name of the Resource Group in which the User Assigned Identity exists.

interface GetUserAssignedIdentityResult

A collection of values returned by getUserAssignedIdentity.

property clientId

clientId: string;

The Client ID of the User Assigned Identity.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property location

location: string;

The Azure location where the User Assigned Identity exists.

property name

name: string;

property principalId

principalId: string;

The Service Principal ID of the User Assigned Identity.

property resourceGroupName

resourceGroupName: string;

property tags

tags: {[key: string]: any};

A mapping of tags assigned to the User Assigned Identity.

interface ResourceGroupArgs

The set of arguments for constructing a ResourceGroup resource.

property location

location?: pulumi.Input<string>;

The location where the resource group should be created. For a list of all Azure locations, please consult this link or run az account list-locations --output table.

property name

name?: pulumi.Input<string>;

The name of the resource group. Must be unique on your Azure subscription.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface ResourceGroupState

Input properties used for looking up and filtering ResourceGroup resources.

property location

location?: pulumi.Input<string>;

The location where the resource group should be created. For a list of all Azure locations, please consult this link or run az account list-locations --output table.

property name

name?: pulumi.Input<string>;

The name of the resource group. Must be unique on your Azure subscription.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface TemplateDeploymentArgs

The set of arguments for constructing a TemplateDeployment resource.

property deploymentMode

deploymentMode: pulumi.Input<string>;

property name

name?: pulumi.Input<string>;

Specifies the name of the template deployment. Changing this forces a new resource to be created.

property parameters

parameters?: pulumi.Input<{[key: string]: any}>;

Specifies the name and value pairs that define the deployment parameters for the template.

property parametersBody

parametersBody?: pulumi.Input<string>;

Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which to create the template deployment.

property templateBody

templateBody?: pulumi.Input<string>;

Specifies the JSON definition for the template.

interface TemplateDeploymentState

Input properties used for looking up and filtering TemplateDeployment resources.

property deploymentMode

deploymentMode?: pulumi.Input<string>;

property name

name?: pulumi.Input<string>;

Specifies the name of the template deployment. Changing this forces a new resource to be created.

property outputs

outputs?: pulumi.Input<{[key: string]: any}>;

A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].

property parameters

parameters?: pulumi.Input<{[key: string]: any}>;

Specifies the name and value pairs that define the deployment parameters for the template.

property parametersBody

parametersBody?: pulumi.Input<string>;

Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which to create the template deployment.

property templateBody

templateBody?: pulumi.Input<string>;

Specifies the JSON definition for the template.