Project Environment Type
Represents an environment type. API Version: 2022-09-01-preview.
Example Usage
ProjectEnvironmentTypes_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var projectEnvironmentType = new AzureNative.DevCenter.ProjectEnvironmentType("projectEnvironmentType", new()
{
CreatorRoleAssignment = new AzureNative.DevCenter.Inputs.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentArgs
{
Roles =
{
{ "4cbf0b6c-e750-441c-98a7-10da8387e4d6", null },
},
},
DeploymentTargetId = "/subscriptions/00000000-0000-0000-0000-000000000000",
EnvironmentTypeName = "{environmentTypeName}",
Identity = new AzureNative.DevCenter.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", null },
},
},
ProjectName = "ContosoProj",
ResourceGroupName = "rg1",
Status = "Enabled",
Tags =
{
{ "CostCenter", "RnD" },
},
UserRoleAssignments =
{
{ "e45e3m7c-176e-416a-b466-0c5ec8298f8a", new AzureNative.DevCenter.Inputs.UserRoleAssignmentArgs
{
Roles =
{
{ "4cbf0b6c-e750-441c-98a7-10da8387e4d6", null },
},
} },
},
});
});
Content copied to clipboard
package main
import (
devcenter "github.com/pulumi/pulumi-azure-native-sdk/devcenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devcenter.NewProjectEnvironmentType(ctx, "projectEnvironmentType", &devcenter.ProjectEnvironmentTypeArgs{
CreatorRoleAssignment: &devcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentArgs{
Roles: pulumi.AnyMap{
"4cbf0b6c-e750-441c-98a7-10da8387e4d6": nil,
},
},
DeploymentTargetId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"),
EnvironmentTypeName: pulumi.String("{environmentTypeName}"),
Identity: &devcenter.ManagedServiceIdentityArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": nil,
},
},
ProjectName: pulumi.String("ContosoProj"),
ResourceGroupName: pulumi.String("rg1"),
Status: pulumi.String("Enabled"),
Tags: pulumi.StringMap{
"CostCenter": pulumi.String("RnD"),
},
UserRoleAssignments: devcenter.UserRoleAssignmentMap{
"e45e3m7c-176e-416a-b466-0c5ec8298f8a": &devcenter.UserRoleAssignmentArgs{
Roles: pulumi.AnyMap{
"4cbf0b6c-e750-441c-98a7-10da8387e4d6": nil,
},
},
},
})
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.devcenter.ProjectEnvironmentType;
import com.pulumi.azurenative.devcenter.ProjectEnvironmentTypeArgs;
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 projectEnvironmentType = new ProjectEnvironmentType("projectEnvironmentType", ProjectEnvironmentTypeArgs.builder()
.creatorRoleAssignment(Map.of("roles", Map.of("4cbf0b6c-e750-441c-98a7-10da8387e4d6", )))
.deploymentTargetId("/subscriptions/00000000-0000-0000-0000-000000000000")
.environmentTypeName("{environmentTypeName}")
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", ))
))
.projectName("ContosoProj")
.resourceGroupName("rg1")
.status("Enabled")
.tags(Map.of("CostCenter", "RnD"))
.userRoleAssignments(Map.of("e45e3m7c-176e-416a-b466-0c5ec8298f8a", Map.of("roles", Map.of("4cbf0b6c-e750-441c-98a7-10da8387e4d6", ))))
.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:devcenter:ProjectEnvironmentType {environmentTypeName} /subscriptions/{subscriptionId}/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProj/environmentTypes/{environmentTypeName}
Content copied to clipboard
Properties
Link copied to clipboard
val creatorRoleAssignment: Output<ProjectEnvironmentTypeUpdatePropertiesResponseCreatorRoleAssignment>?
The role definition assigned to the environment creator on backing resources.
Link copied to clipboard
Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription.
Link copied to clipboard
Managed identity properties
Link copied to clipboard
The provisioning state of the resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Link copied to clipboard
Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.