/
getResourceGroup.ts
72 lines (66 loc) · 2.12 KB
/
getResourceGroup.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Use this data source to access information about an existing Resource Group.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
*
* const exampleResourceGroup = azure.core.getResourceGroup({
* name: "dsrgTest",
* });
* const exampleManagedDisk = new azure.compute.ManagedDisk("example", {
* createOption: "Empty",
* diskSizeGb: 1,
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.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.
*/
export function getResourceGroup(args: GetResourceGroupArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceGroupResult> & GetResourceGroupResult {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
const promise: Promise<GetResourceGroupResult> = pulumi.runtime.invoke("azure:core/getResourceGroup:getResourceGroup", {
"name": args.name,
}, opts);
return pulumi.utils.liftProperties(promise, opts);
}
/**
* A collection of arguments for invoking getResourceGroup.
*/
export interface GetResourceGroupArgs {
/**
* Specifies the name of the resource group.
*/
readonly name: string;
}
/**
* A collection of values returned by getResourceGroup.
*/
export interface GetResourceGroupResult {
/**
* The location of the resource group.
*/
readonly location: string;
readonly name: string;
/**
* A mapping of tags assigned to the resource group.
*/
readonly tags: {[key: string]: string};
/**
* id is the provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}