azure-native.devtestlab.Environment
Explore with Pulumi AI
An environment, which is essentially an ARM template deployment. API Version: 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"
"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.EnvironmentDeploymentPropertiesResponse{
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 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(Map.ofEntries(
Map.entry("armTemplateId", "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"),
Map.entry("parameters", )
))
.labName("{labName}")
.name("{environmentName}")
.resourceGroupName("resourceGroupName")
.userName("@me")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
environment = azure_native.devtestlab.Environment("environment",
deployment_properties=azure_native.devtestlab.EnvironmentDeploymentPropertiesResponseArgs(
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")
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",
});
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 environmentResource = new AzureNative.Devtestlab.Environment("environmentResource", new()
{
LabName = "string",
ResourceGroupName = "string",
UserName = "string",
ArmTemplateDisplayName = "string",
DeploymentProperties =
{
{ "armTemplateId", "string" },
{ "parameters", new[]
{
{
{ "name", "string" },
{ "value", "string" },
},
} },
},
Location = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := devtestlab.NewEnvironment(ctx, "environmentResource", &devtestlab.EnvironmentArgs{
LabName: "string",
ResourceGroupName: "string",
UserName: "string",
ArmTemplateDisplayName: "string",
DeploymentProperties: map[string]interface{}{
"armTemplateId": "string",
"parameters": []map[string]interface{}{
map[string]interface{}{
"name": "string",
"value": "string",
},
},
},
Location: "string",
Name: "string",
Tags: map[string]interface{}{
"string": "string",
},
})
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
.labName("string")
.resourceGroupName("string")
.userName("string")
.armTemplateDisplayName("string")
.deploymentProperties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.location("string")
.name("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
environment_resource = azure_native.devtestlab.Environment("environmentResource",
lab_name=string,
resource_group_name=string,
user_name=string,
arm_template_display_name=string,
deployment_properties={
armTemplateId: string,
parameters: [{
name: string,
value: string,
}],
},
location=string,
name=string,
tags={
string: string,
})
const environmentResource = new azure_native.devtestlab.Environment("environmentResource", {
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:
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- User
Name string - The name of the user profile.
- Arm
Template stringDisplay Name - The display name of the Azure Resource Manager template that produced the environment.
- Deployment
Properties 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.
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- User
Name string - The name of the user profile.
- Arm
Template stringDisplay 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 string
- The location of the resource.
- Name string
- The name of the environment.
- map[string]string
- The tags of the resource.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- user
Name String - The name of the user profile.
- arm
Template StringDisplay Name - The display name of the Azure Resource Manager template that produced the environment.
- deployment
Properties 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.
- lab
Name string - The name of the lab.
- resource
Group stringName - The name of the resource group.
- user
Name string - The name of the user profile.
- arm
Template stringDisplay Name - The display name of the Azure Resource Manager template that produced the environment.
- deployment
Properties 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.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- user
Name String - The name of the user profile.
- arm
Template StringDisplay Name - The display name of the Azure Resource Manager template that produced the environment.
- deployment
Properties 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:
- Created
By stringUser - The creator of the environment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Resource
Group stringId - The identifier of the resource group containing the environment's resources.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- Created
By stringUser - The creator of the environment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Resource
Group stringId - The identifier of the resource group containing the environment's resources.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- created
By StringUser - The creator of the environment.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- resource
Group StringId - The identifier of the resource group containing the environment's resources.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
- created
By stringUser - The creator of the environment.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State string - The provisioning status of the resource.
- resource
Group stringId - The identifier of the resource group containing the environment's resources.
- type string
- The type of the resource.
- unique
Identifier 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).
- created
By StringUser - The creator of the environment.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- resource
Group StringId - The identifier of the resource group containing the environment's resources.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
Supporting Types
ArmTemplateParameterProperties, ArmTemplateParameterPropertiesArgs
ArmTemplateParameterPropertiesResponse, ArmTemplateParameterPropertiesResponseArgs
EnvironmentDeploymentProperties, EnvironmentDeploymentPropertiesArgs
- Arm
Template 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.
- Arm
Template stringId - The Azure Resource Manager template's identifier.
- Parameters
[]Arm
Template Parameter Properties - The parameters of the Azure Resource Manager template.
- arm
Template StringId - The Azure Resource Manager template's identifier.
- parameters
List<Arm
Template Parameter Properties> - The parameters of the Azure Resource Manager template.
- arm
Template stringId - The Azure Resource Manager template's identifier.
- parameters
Arm
Template Parameter Properties[] - The parameters of the Azure Resource Manager template.
- arm_
template_ strid - The Azure Resource Manager template's identifier.
- parameters
Sequence[Arm
Template Parameter Properties] - The parameters of the Azure Resource Manager template.
- arm
Template StringId - The Azure Resource Manager template's identifier.
- parameters List<Property Map>
- The parameters of the Azure Resource Manager template.
EnvironmentDeploymentPropertiesResponse, EnvironmentDeploymentPropertiesResponseArgs
- Arm
Template 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.
- Arm
Template stringId - The Azure Resource Manager template's identifier.
- Parameters
[]Arm
Template Parameter Properties Response - The parameters of the Azure Resource Manager template.
- arm
Template StringId - The Azure Resource Manager template's identifier.
- parameters
List<Arm
Template Parameter Properties Response> - The parameters of the Azure Resource Manager template.
- arm
Template stringId - The Azure Resource Manager template's identifier.
- parameters
Arm
Template Parameter Properties Response[] - The parameters of the Azure Resource Manager template.
- arm_
template_ strid - The Azure Resource Manager template's identifier.
- parameters
Sequence[Arm
Template Parameter Properties Response] - The parameters of the Azure Resource Manager template.
- arm
Template 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/{uniqueIdentifier}/environments/{environmentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0