Environment
An environment, which is essentially an ARM template deployment. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used 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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
The display name of the Azure Resource Manager template that produced the environment.
Link copied to clipboard
The Azure API version of the resource.
Link copied to clipboard
The creator of the environment.
Link copied to clipboard
The deployment properties of the environment.
Link copied to clipboard
The provisioning status of the resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The identifier of the resource group containing the environment's resources.
Link copied to clipboard
The unique immutable identifier of a resource (Guid).