DeploymentScriptArgs

data class DeploymentScriptArgs constructor(val identity: Output<ManagedServiceIdentityArgs>? = null, val kind: Output<Either<String, ScriptType>>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scriptName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DeploymentScriptArgs>

Deployment script object. API Version: 2020-10-01.

Example Usage

DeploymentScriptsCreate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deploymentScript = new AzureNative.Resources.DeploymentScript("deploymentScript", new()
{
Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", null },
},
},
Kind = "AzurePowerShell",
Location = "westus",
ResourceGroupName = "script-rg",
ScriptName = "MyDeploymentScript",
});
});
package main
import (
resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resources.NewDeploymentScript(ctx, "deploymentScript", &resources.DeploymentScriptArgs{
Identity: &resources.ManagedServiceIdentityArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
},
},
Kind: pulumi.String("AzurePowerShell"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("script-rg"),
ScriptName: pulumi.String("MyDeploymentScript"),
})
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.resources.DeploymentScript;
import com.pulumi.azurenative.resources.DeploymentScriptArgs;
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 deploymentScript = new DeploymentScript("deploymentScript", DeploymentScriptArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
))
.kind("AzurePowerShell")
.location("westus")
.resourceGroupName("script-rg")
.scriptName("MyDeploymentScript")
.build());
}
}

DeploymentScriptsCreateNoUserManagedIdentity

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deploymentScript = new AzureNative.Resources.DeploymentScript("deploymentScript", new()
{
Kind = "AzurePowerShell",
Location = "westus",
ResourceGroupName = "script-rg",
ScriptName = "MyDeploymentScript",
});
});
package main
import (
resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resources.NewDeploymentScript(ctx, "deploymentScript", &resources.DeploymentScriptArgs{
Kind: pulumi.String("AzurePowerShell"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("script-rg"),
ScriptName: pulumi.String("MyDeploymentScript"),
})
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.resources.DeploymentScript;
import com.pulumi.azurenative.resources.DeploymentScriptArgs;
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 deploymentScript = new DeploymentScript("deploymentScript", DeploymentScriptArgs.builder()
.kind("AzurePowerShell")
.location("westus")
.resourceGroupName("script-rg")
.scriptName("MyDeploymentScript")
.build());
}
}

DeploymentScriptsCreate_MinCreate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deploymentScript = new AzureNative.Resources.DeploymentScript("deploymentScript", new()
{
Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", null },
},
},
Kind = "AzurePowerShell",
Location = "westus",
ResourceGroupName = "script-rg",
ScriptName = "MyDeploymentScript",
});
});
package main
import (
resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resources.NewDeploymentScript(ctx, "deploymentScript", &resources.DeploymentScriptArgs{
Identity: &resources.ManagedServiceIdentityArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
},
},
Kind: pulumi.String("AzurePowerShell"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("script-rg"),
ScriptName: pulumi.String("MyDeploymentScript"),
})
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.resources.DeploymentScript;
import com.pulumi.azurenative.resources.DeploymentScriptArgs;
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 deploymentScript = new DeploymentScript("deploymentScript", DeploymentScriptArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
))
.kind("AzurePowerShell")
.location("westus")
.resourceGroupName("script-rg")
.scriptName("MyDeploymentScript")
.build());
}
}

DeploymentScriptsCreate_UsingCustomACIName

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deploymentScript = new AzureNative.Resources.DeploymentScript("deploymentScript", new()
{
Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", null },
},
},
Kind = "AzurePowerShell",
Location = "westus",
ResourceGroupName = "script-rg",
ScriptName = "MyDeploymentScript",
});
});
package main
import (
resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resources.NewDeploymentScript(ctx, "deploymentScript", &resources.DeploymentScriptArgs{
Identity: &resources.ManagedServiceIdentityArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
},
},
Kind: pulumi.String("AzurePowerShell"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("script-rg"),
ScriptName: pulumi.String("MyDeploymentScript"),
})
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.resources.DeploymentScript;
import com.pulumi.azurenative.resources.DeploymentScriptArgs;
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 deploymentScript = new DeploymentScript("deploymentScript", DeploymentScriptArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
))
.kind("AzurePowerShell")
.location("westus")
.resourceGroupName("script-rg")
.scriptName("MyDeploymentScript")
.build());
}
}

DeploymentScriptsCreate_UsingExistingStorageAccount

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deploymentScript = new AzureNative.Resources.DeploymentScript("deploymentScript", new()
{
Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", null },
},
},
Kind = "AzurePowerShell",
Location = "westus",
ResourceGroupName = "script-rg",
ScriptName = "MyDeploymentScript",
});
});
package main
import (
resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resources.NewDeploymentScript(ctx, "deploymentScript", &resources.DeploymentScriptArgs{
Identity: &resources.ManagedServiceIdentityArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
},
},
Kind: pulumi.String("AzurePowerShell"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("script-rg"),
ScriptName: pulumi.String("MyDeploymentScript"),
})
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.resources.DeploymentScript;
import com.pulumi.azurenative.resources.DeploymentScriptArgs;
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 deploymentScript = new DeploymentScript("deploymentScript", DeploymentScriptArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
))
.kind("AzurePowerShell")
.location("westus")
.resourceGroupName("script-rg")
.scriptName("MyDeploymentScript")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:resources:DeploymentScript myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}

Constructors

Link copied to clipboard
fun DeploymentScriptArgs(identity: Output<ManagedServiceIdentityArgs>? = null, kind: Output<Either<String, ScriptType>>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, scriptName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): DeploymentScriptArgs

Properties

Link copied to clipboard

Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.

Link copied to clipboard
val kind: Output<Either<String, ScriptType>>? = null

Type of the script.

Link copied to clipboard
val location: Output<String>? = null

The location of the ACI and the storage account for the deployment script.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val scriptName: Output<String>? = null

Name of the deployment script.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.