Definition Args
data class DefinitionArgs(val authorizations: Output<List<DefinitionAuthorizationArgs>>? = null, val createUiDefinition: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val location: Output<String>? = null, val lockLevel: Output<String>? = null, val mainTemplate: Output<String>? = null, val name: Output<String>? = null, val packageEnabled: Output<Boolean>? = null, val packageFileUri: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DefinitionArgs>
Manages a Managed Application Definition.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleDefinition = new azure.managedapplication.Definition("example", {
name: "examplemanagedapplicationdefinition",
location: example.location,
resourceGroupName: example.name,
lockLevel: "ReadOnly",
packageFileUri: "https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip",
displayName: "TestManagedApplicationDefinition",
description: "Test Managed Application Definition",
authorizations: [{
servicePrincipalId: current.then(current => current.objectId),
roleDefinitionId: "a094b430-dad3-424d-ae58-13f72fd72591",
}],
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_definition = azure.managedapplication.Definition("example",
name="examplemanagedapplicationdefinition",
location=example.location,
resource_group_name=example.name,
lock_level="ReadOnly",
package_file_uri="https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip",
display_name="TestManagedApplicationDefinition",
description="Test Managed Application Definition",
authorizations=[{
"service_principal_id": current.object_id,
"role_definition_id": "a094b430-dad3-424d-ae58-13f72fd72591",
}])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var current = Azure.Core.GetClientConfig.Invoke();
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleDefinition = new Azure.ManagedApplication.Definition("example", new()
{
Name = "examplemanagedapplicationdefinition",
Location = example.Location,
ResourceGroupName = example.Name,
LockLevel = "ReadOnly",
PackageFileUri = "https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip",
DisplayName = "TestManagedApplicationDefinition",
Description = "Test Managed Application Definition",
Authorizations = new[]
{
new Azure.ManagedApplication.Inputs.DefinitionAuthorizationArgs
{
ServicePrincipalId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
RoleDefinitionId = "a094b430-dad3-424d-ae58-13f72fd72591",
},
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedapplication"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = managedapplication.NewDefinition(ctx, "example", &managedapplication.DefinitionArgs{
Name: pulumi.String("examplemanagedapplicationdefinition"),
Location: example.Location,
ResourceGroupName: example.Name,
LockLevel: pulumi.String("ReadOnly"),
PackageFileUri: pulumi.String("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip"),
DisplayName: pulumi.String("TestManagedApplicationDefinition"),
Description: pulumi.String("Test Managed Application Definition"),
Authorizations: managedapplication.DefinitionAuthorizationArray{
&managedapplication.DefinitionAuthorizationArgs{
ServicePrincipalId: pulumi.String(current.ObjectId),
RoleDefinitionId: pulumi.String("a094b430-dad3-424d-ae58-13f72fd72591"),
},
},
})
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.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.managedapplication.Definition;
import com.pulumi.azure.managedapplication.DefinitionArgs;
import com.pulumi.azure.managedapplication.inputs.DefinitionAuthorizationArgs;
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) {
final var current = CoreFunctions.getClientConfig();
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleDefinition = new Definition("exampleDefinition", DefinitionArgs.builder()
.name("examplemanagedapplicationdefinition")
.location(example.location())
.resourceGroupName(example.name())
.lockLevel("ReadOnly")
.packageFileUri("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip")
.displayName("TestManagedApplicationDefinition")
.description("Test Managed Application Definition")
.authorizations(DefinitionAuthorizationArgs.builder()
.servicePrincipalId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.roleDefinitionId("a094b430-dad3-424d-ae58-13f72fd72591")
.build())
.build());
}
}
Content copied to clipboard
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleDefinition:
type: azure:managedapplication:Definition
name: example
properties:
name: examplemanagedapplicationdefinition
location: ${example.location}
resourceGroupName: ${example.name}
lockLevel: ReadOnly
packageFileUri: https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip
displayName: TestManagedApplicationDefinition
description: Test Managed Application Definition
authorizations:
- servicePrincipalId: ${current.objectId}
roleDefinitionId: a094b430-dad3-424d-ae58-13f72fd72591
variables:
current:
fn::invoke:
function: azure:core:getClientConfig
arguments: {}
Content copied to clipboard
Import
Managed Application Definition can be imported using the resource id
, e.g.
$ pulumi import azure:managedapplication/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applicationDefinitions/appDefinition1
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(authorizations: Output<List<DefinitionAuthorizationArgs>>? = null, createUiDefinition: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, location: Output<String>? = null, lockLevel: Output<String>? = null, mainTemplate: Output<String>? = null, name: Output<String>? = null, packageEnabled: Output<Boolean>? = null, packageFileUri: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
One or more authorization
block defined below.
Link copied to clipboard
Specifies the createUiDefinition
JSON for the backing template with Microsoft.Solutions/applications
resource.
Link copied to clipboard
Specifies the managed application definition description.
Link copied to clipboard
Specifies the managed application definition display name.
Link copied to clipboard
Specifies the inline main template JSON which has resources to be provisioned.
Link copied to clipboard
Is the package enabled? Defaults to true
.
Link copied to clipboard
Specifies the managed application definition package file Uri.
Link copied to clipboard
The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.