azure-native.devtestlab.Environment
Explore with Pulumi AI
An environment, which is essentially an ARM template deployment. Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
Example Usage
Environments_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var environment = new AzureNative.DevTestLab.Environment("environment", new()
    {
        DeploymentProperties = new AzureNative.DevTestLab.Inputs.EnvironmentDeploymentPropertiesArgs
        {
            ArmTemplateId = "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
            Parameters = new() { },
        },
        LabName = "{labName}",
        Name = "{environmentName}",
        ResourceGroupName = "resourceGroupName",
        UserName = "@me",
    });
});
package main
import (
	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devtestlab.NewEnvironment(ctx, "environment", &devtestlab.EnvironmentArgs{
			DeploymentProperties: &devtestlab.EnvironmentDeploymentPropertiesArgs{
				ArmTemplateId: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"),
				Parameters:    devtestlab.ArmTemplateParameterPropertiesArray{},
			},
			LabName:           pulumi.String("{labName}"),
			Name:              pulumi.String("{environmentName}"),
			ResourceGroupName: pulumi.String("resourceGroupName"),
			UserName:          pulumi.String("@me"),
		})
		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.azurenative.devtestlab.Environment;
import com.pulumi.azurenative.devtestlab.EnvironmentArgs;
import com.pulumi.azurenative.devtestlab.inputs.EnvironmentDeploymentPropertiesArgs;
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 environment = new Environment("environment", EnvironmentArgs.builder()
            .deploymentProperties(EnvironmentDeploymentPropertiesArgs.builder()
                .armTemplateId("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}")
                .parameters()
                .build())
            .labName("{labName}")
            .name("{environmentName}")
            .resourceGroupName("resourceGroupName")
            .userName("@me")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const environment = new azure_native.devtestlab.Environment("environment", {
    deploymentProperties: {
        armTemplateId: "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
        parameters: [],
    },
    labName: "{labName}",
    name: "{environmentName}",
    resourceGroupName: "resourceGroupName",
    userName: "@me",
});
import pulumi
import pulumi_azure_native as azure_native
environment = azure_native.devtestlab.Environment("environment",
    deployment_properties={
        "arm_template_id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
        "parameters": [],
    },
    lab_name="{labName}",
    name="{environmentName}",
    resource_group_name="resourceGroupName",
    user_name="@me")
resources:
  environment:
    type: azure-native:devtestlab:Environment
    properties:
      deploymentProperties:
        armTemplateId: /subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}
        parameters: []
      labName: '{labName}'
      name: '{environmentName}'
      resourceGroupName: resourceGroupName
      userName: '@me'
Create Environment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);@overload
def Environment(resource_name: str,
                args: EnvironmentArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def Environment(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                lab_name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                user_name: Optional[str] = None,
                arm_template_display_name: Optional[str] = None,
                deployment_properties: Optional[EnvironmentDeploymentPropertiesArgs] = None,
                location: Optional[str] = None,
                name: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: azure-native:devtestlab:Environment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EnvironmentArgs
- 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 EnvironmentArgs
- 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 EnvironmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var azure_nativeEnvironmentResource = new AzureNative.DevTestLab.Environment("azure-nativeEnvironmentResource", new()
{
    LabName = "string",
    ResourceGroupName = "string",
    UserName = "string",
    ArmTemplateDisplayName = "string",
    DeploymentProperties = new AzureNative.DevTestLab.Inputs.EnvironmentDeploymentPropertiesArgs
    {
        ArmTemplateId = "string",
        Parameters = new[]
        {
            new AzureNative.DevTestLab.Inputs.ArmTemplateParameterPropertiesArgs
            {
                Name = "string",
                Value = "string",
            },
        },
    },
    Location = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := devtestlab.NewEnvironment(ctx, "azure-nativeEnvironmentResource", &devtestlab.EnvironmentArgs{
	LabName:                pulumi.String("string"),
	ResourceGroupName:      pulumi.String("string"),
	UserName:               pulumi.String("string"),
	ArmTemplateDisplayName: pulumi.String("string"),
	DeploymentProperties: &devtestlab.EnvironmentDeploymentPropertiesArgs{
		ArmTemplateId: pulumi.String("string"),
		Parameters: devtestlab.ArmTemplateParameterPropertiesArray{
			&devtestlab.ArmTemplateParameterPropertiesArgs{
				Name:  pulumi.String("string"),
				Value: pulumi.String("string"),
			},
		},
	},
	Location: pulumi.String("string"),
	Name:     pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var azure_nativeEnvironmentResource = new Environment("azure-nativeEnvironmentResource", EnvironmentArgs.builder()
    .labName("string")
    .resourceGroupName("string")
    .userName("string")
    .armTemplateDisplayName("string")
    .deploymentProperties(EnvironmentDeploymentPropertiesArgs.builder()
        .armTemplateId("string")
        .parameters(ArmTemplateParameterPropertiesArgs.builder()
            .name("string")
            .value("string")
            .build())
        .build())
    .location("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
azure_native_environment_resource = azure_native.devtestlab.Environment("azure-nativeEnvironmentResource",
    lab_name="string",
    resource_group_name="string",
    user_name="string",
    arm_template_display_name="string",
    deployment_properties={
        "arm_template_id": "string",
        "parameters": [{
            "name": "string",
            "value": "string",
        }],
    },
    location="string",
    name="string",
    tags={
        "string": "string",
    })
const azure_nativeEnvironmentResource = new azure_native.devtestlab.Environment("azure-nativeEnvironmentResource", {
    labName: "string",
    resourceGroupName: "string",
    userName: "string",
    armTemplateDisplayName: "string",
    deploymentProperties: {
        armTemplateId: "string",
        parameters: [{
            name: "string",
            value: "string",
        }],
    },
    location: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
type: azure-native:devtestlab:Environment
properties:
    armTemplateDisplayName: string
    deploymentProperties:
        armTemplateId: string
        parameters:
            - name: string
              value: string
    labName: string
    location: string
    name: string
    resourceGroupName: string
    tags:
        string: string
    userName: string
Environment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Environment resource accepts the following input properties:
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- UserName string
- The name of the user profile.
- ArmTemplate stringDisplay Name 
- The display name of the Azure Resource Manager template that produced the environment.
- DeploymentProperties Pulumi.Azure Native. Dev Test Lab. Inputs. Environment Deployment Properties 
- The deployment properties of the environment.
- Location string
- The location of the resource.
- Name string
- The name of the environment.
- Dictionary<string, string>
- The tags of the resource.
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- UserName string
- The name of the user profile.
- ArmTemplate stringDisplay Name 
- The display name of the Azure Resource Manager template that produced the environment.
- DeploymentProperties EnvironmentDeployment Properties Args 
- The deployment properties of the environment.
- Location string
- The location of the resource.
- Name string
- The name of the environment.
- map[string]string
- The tags of the resource.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- userName String
- The name of the user profile.
- armTemplate StringDisplay Name 
- The display name of the Azure Resource Manager template that produced the environment.
- deploymentProperties EnvironmentDeployment Properties 
- The deployment properties of the environment.
- location String
- The location of the resource.
- name String
- The name of the environment.
- Map<String,String>
- The tags of the resource.
- labName string
- The name of the lab.
- resourceGroup stringName 
- The name of the resource group.
- userName string
- The name of the user profile.
- armTemplate stringDisplay Name 
- The display name of the Azure Resource Manager template that produced the environment.
- deploymentProperties EnvironmentDeployment Properties 
- The deployment properties of the environment.
- location string
- The location of the resource.
- name string
- The name of the environment.
- {[key: string]: string}
- The tags of the resource.
- lab_name str
- The name of the lab.
- resource_group_ strname 
- The name of the resource group.
- user_name str
- The name of the user profile.
- arm_template_ strdisplay_ name 
- The display name of the Azure Resource Manager template that produced the environment.
- deployment_properties EnvironmentDeployment Properties Args 
- The deployment properties of the environment.
- location str
- The location of the resource.
- name str
- The name of the environment.
- Mapping[str, str]
- The tags of the resource.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- userName String
- The name of the user profile.
- armTemplate StringDisplay Name 
- The display name of the Azure Resource Manager template that produced the environment.
- deploymentProperties Property Map
- The deployment properties of the environment.
- location String
- The location of the resource.
- name String
- The name of the environment.
- Map<String>
- The tags of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:
- CreatedBy stringUser 
- The creator of the environment.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- ResourceGroup stringId 
- The identifier of the resource group containing the environment's resources.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- CreatedBy stringUser 
- The creator of the environment.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- ResourceGroup stringId 
- The identifier of the resource group containing the environment's resources.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- createdBy StringUser 
- The creator of the environment.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- resourceGroup StringId 
- The identifier of the resource group containing the environment's resources.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
- createdBy stringUser 
- The creator of the environment.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioningState string
- The provisioning status of the resource.
- resourceGroup stringId 
- The identifier of the resource group containing the environment's resources.
- type string
- The type of the resource.
- uniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- created_by_ struser 
- The creator of the environment.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_state str
- The provisioning status of the resource.
- resource_group_ strid 
- The identifier of the resource group containing the environment's resources.
- type str
- The type of the resource.
- unique_identifier str
- The unique immutable identifier of a resource (Guid).
- createdBy StringUser 
- The creator of the environment.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- resourceGroup StringId 
- The identifier of the resource group containing the environment's resources.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
Supporting Types
ArmTemplateParameterProperties, ArmTemplateParameterPropertiesArgs        
ArmTemplateParameterPropertiesResponse, ArmTemplateParameterPropertiesResponseArgs          
EnvironmentDeploymentProperties, EnvironmentDeploymentPropertiesArgs      
- ArmTemplate stringId 
- The Azure Resource Manager template's identifier.
- Parameters
List<Pulumi.Azure Native. Dev Test Lab. Inputs. Arm Template Parameter Properties> 
- The parameters of the Azure Resource Manager template.
- ArmTemplate stringId 
- The Azure Resource Manager template's identifier.
- Parameters
[]ArmTemplate Parameter Properties 
- The parameters of the Azure Resource Manager template.
- armTemplate StringId 
- The Azure Resource Manager template's identifier.
- parameters
List<ArmTemplate Parameter Properties> 
- The parameters of the Azure Resource Manager template.
- armTemplate stringId 
- The Azure Resource Manager template's identifier.
- parameters
ArmTemplate Parameter Properties[] 
- The parameters of the Azure Resource Manager template.
- arm_template_ strid 
- The Azure Resource Manager template's identifier.
- parameters
Sequence[ArmTemplate Parameter Properties] 
- The parameters of the Azure Resource Manager template.
- armTemplate StringId 
- The Azure Resource Manager template's identifier.
- parameters List<Property Map>
- The parameters of the Azure Resource Manager template.
EnvironmentDeploymentPropertiesResponse, EnvironmentDeploymentPropertiesResponseArgs        
- ArmTemplate stringId 
- The Azure Resource Manager template's identifier.
- Parameters
List<Pulumi.Azure Native. Dev Test Lab. Inputs. Arm Template Parameter Properties Response> 
- The parameters of the Azure Resource Manager template.
- ArmTemplate stringId 
- The Azure Resource Manager template's identifier.
- Parameters
[]ArmTemplate Parameter Properties Response 
- The parameters of the Azure Resource Manager template.
- armTemplate StringId 
- The Azure Resource Manager template's identifier.
- parameters
List<ArmTemplate Parameter Properties Response> 
- The parameters of the Azure Resource Manager template.
- armTemplate stringId 
- The Azure Resource Manager template's identifier.
- parameters
ArmTemplate Parameter Properties Response[] 
- The parameters of the Azure Resource Manager template.
- arm_template_ strid 
- The Azure Resource Manager template's identifier.
- parameters
Sequence[ArmTemplate Parameter Properties Response] 
- The parameters of the Azure Resource Manager template.
- armTemplate StringId 
- The Azure Resource Manager template's identifier.
- parameters List<Property Map>
- The parameters of the Azure Resource Manager template.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devtestlab:Environment {environmentName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0