Azure Native

Pulumi Official
Package maintained by Pulumi
v1.67.0 published on Tuesday, Jul 12, 2022 by Pulumi

ResourceGroup

Resource group information. API Version: 2019-05-01.

Example Usage

Create or update a resource group

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var resourceGroup = new AzureNative.Resources.ResourceGroup("resourceGroup", new AzureNative.Resources.ResourceGroupArgs
        {
            Location = "eastus",
            ResourceGroupName = "myResourceGroup",
        });
    }

}
package main

import (
	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewResourceGroup(ctx, "resourceGroup", &resources.ResourceGroupArgs{
			Location:          pulumi.String("eastus"),
			ResourceGroupName: pulumi.String("myResourceGroup"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var resourceGroup = new ResourceGroup("resourceGroup", ResourceGroupArgs.builder()        
            .location("eastus")
            .resourceGroupName("myResourceGroup")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

resource_group = azure_native.resources.ResourceGroup("resourceGroup",
    location="eastus",
    resource_group_name="myResourceGroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const resourceGroup = new azure_native.resources.ResourceGroup("resourceGroup", {
    location: "eastus",
    resourceGroupName: "myResourceGroup",
});
resources:
  resourceGroup:
    type: azure-native:resources:ResourceGroup
    properties:
      location: eastus
      resourceGroupName: myResourceGroup

Create a ResourceGroup Resource

new ResourceGroup(name: string, args?: ResourceGroupArgs, opts?: CustomResourceOptions);
@overload
def ResourceGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  location: Optional[str] = None,
                  managed_by: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None)
@overload
def ResourceGroup(resource_name: str,
                  args: Optional[ResourceGroupArgs] = None,
                  opts: Optional[ResourceOptions] = None)
func NewResourceGroup(ctx *Context, name string, args *ResourceGroupArgs, opts ...ResourceOption) (*ResourceGroup, error)
public ResourceGroup(string name, ResourceGroupArgs? args = null, CustomResourceOptions? opts = null)
public ResourceGroup(String name, ResourceGroupArgs args)
public ResourceGroup(String name, ResourceGroupArgs args, CustomResourceOptions options)
type: azure-native:resources:ResourceGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ResourceGroupArgs
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 ResourceGroupArgs
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 ResourceGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourceGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ResourceGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ResourceGroup 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 ResourceGroup resource accepts the following input properties:

Location string

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

ManagedBy string

The ID of the resource that manages this resource group.

ResourceGroupName string

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

Tags Dictionary<string, string>

The tags attached to the resource group.

Location string

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

ManagedBy string

The ID of the resource that manages this resource group.

ResourceGroupName string

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

Tags map[string]string

The tags attached to the resource group.

location String

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

managedBy String

The ID of the resource that manages this resource group.

resourceGroupName String

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

tags Map<String,String>

The tags attached to the resource group.

location string

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

managedBy string

The ID of the resource that manages this resource group.

resourceGroupName string

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

tags {[key: string]: string}

The tags attached to the resource group.

location str

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

managed_by str

The ID of the resource that manages this resource group.

resource_group_name str

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

tags Mapping[str, str]

The tags attached to the resource group.

location String

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

managedBy String

The ID of the resource that manages this resource group.

resourceGroupName String

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

tags Map<String>

The tags attached to the resource group.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceGroup resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource group.

Properties Pulumi.AzureNative.Resources.Outputs.ResourceGroupPropertiesResponse

The resource group properties.

Type string

The type of the resource group.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource group.

Properties ResourceGroupPropertiesResponse

The resource group properties.

Type string

The type of the resource group.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource group.

properties ResourceGroupPropertiesResponse

The resource group properties.

type String

The type of the resource group.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the resource group.

properties ResourceGroupPropertiesResponse

The resource group properties.

type string

The type of the resource group.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the resource group.

properties ResourceGroupPropertiesResponse

The resource group properties.

type str

The type of the resource group.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource group.

properties Property Map

The resource group properties.

type String

The type of the resource group.

Supporting Types

ResourceGroupPropertiesResponse

ProvisioningState string

The provisioning state.

ProvisioningState string

The provisioning state.

provisioningState String

The provisioning state.

provisioningState string

The provisioning state.

provisioning_state str

The provisioning state.

provisioningState String

The provisioning state.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:resources:ResourceGroup myResourceGroup /subscriptions/{subscription-id}/resourceGroups/myResourceGroup 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0