Deployment Args
data class DeploymentArgs(val appName: Output<String>? = null, val deploymentName: Output<String>? = null, val properties: Output<DeploymentResourcePropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val serviceName: Output<String>? = null, val sku: Output<SkuArgs>? = null) : ConvertibleToJava<DeploymentArgs>
Deployment resource payload Azure REST API version: 2023-05-01-preview. Prior API version in Azure Native 1.x: 2020-07-01. Other available API versions: 2023-07-01-preview, 2023-09-01-preview, 2023-11-01-preview.
Example Usage
Deployments_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deployment = new AzureNative.AppPlatform.Deployment("deployment", new()
{
AppName = "myapp",
DeploymentName = "mydeployment",
Properties = new AzureNative.AppPlatform.Inputs.DeploymentResourcePropertiesArgs
{
DeploymentSettings = new AzureNative.AppPlatform.Inputs.DeploymentSettingsArgs
{
AddonConfigs =
{
{ "ApplicationConfigurationService",
{
{ "patterns", new[]
{
"mypattern",
} },
} },
},
Apms = new[]
{
new AzureNative.AppPlatform.Inputs.ApmReferenceArgs
{
ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights",
},
},
EnvironmentVariables =
{
{ "env", "test" },
},
LivenessProbe = new AzureNative.AppPlatform.Inputs.ProbeArgs
{
DisableProbe = false,
FailureThreshold = 3,
InitialDelaySeconds = 30,
PeriodSeconds = 10,
ProbeAction = new AzureNative.AppPlatform.Inputs.HTTPGetActionArgs
{
Path = "/health",
Scheme = "HTTP",
Type = "HTTPGetAction",
},
},
ReadinessProbe = new AzureNative.AppPlatform.Inputs.ProbeArgs
{
DisableProbe = false,
FailureThreshold = 3,
InitialDelaySeconds = 30,
PeriodSeconds = 10,
ProbeAction = new AzureNative.AppPlatform.Inputs.HTTPGetActionArgs
{
Path = "/health",
Scheme = "HTTP",
Type = "HTTPGetAction",
},
},
ResourceRequests = new AzureNative.AppPlatform.Inputs.ResourceRequestsArgs
{
Cpu = "1000m",
Memory = "3Gi",
},
TerminationGracePeriodSeconds = 30,
},
Source = new AzureNative.AppPlatform.Inputs.SourceUploadedUserSourceInfoArgs
{
ArtifactSelector = "sub-module-1",
RelativePath = "resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc",
Type = "Source",
Version = "1.0",
},
},
ResourceGroupName = "myResourceGroup",
ServiceName = "myservice",
Sku = new AzureNative.AppPlatform.Inputs.SkuArgs
{
Capacity = 1,
Name = "S0",
Tier = "Standard",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/appplatform/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appplatform.NewDeployment(ctx, "deployment", &appplatform.DeploymentArgs{
AppName: pulumi.String("myapp"),
DeploymentName: pulumi.String("mydeployment"),
Properties: appplatform.DeploymentResourcePropertiesResponse{
DeploymentSettings: interface{}{
AddonConfigs: pulumi.AnyMap{
"ApplicationConfigurationService": pulumi.Any{
Patterns: []string{
"mypattern",
},
},
},
Apms: appplatform.ApmReferenceArray{
&appplatform.ApmReferenceArgs{
ResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights"),
},
},
EnvironmentVariables: pulumi.StringMap{
"env": pulumi.String("test"),
},
LivenessProbe: &appplatform.ProbeArgs{
DisableProbe: pulumi.Bool(false),
FailureThreshold: pulumi.Int(3),
InitialDelaySeconds: pulumi.Int(30),
PeriodSeconds: pulumi.Int(10),
ProbeAction: appplatform.HTTPGetAction{
Path: "/health",
Scheme: "HTTP",
Type: "HTTPGetAction",
},
},
ReadinessProbe: &appplatform.ProbeArgs{
DisableProbe: pulumi.Bool(false),
FailureThreshold: pulumi.Int(3),
InitialDelaySeconds: pulumi.Int(30),
PeriodSeconds: pulumi.Int(10),
ProbeAction: appplatform.HTTPGetAction{
Path: "/health",
Scheme: "HTTP",
Type: "HTTPGetAction",
},
},
ResourceRequests: &appplatform.ResourceRequestsArgs{
Cpu: pulumi.String("1000m"),
Memory: pulumi.String("3Gi"),
},
TerminationGracePeriodSeconds: pulumi.Int(30),
},
Source: appplatform.SourceUploadedUserSourceInfo{
ArtifactSelector: "sub-module-1",
RelativePath: "resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc",
Type: "Source",
Version: "1.0",
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ServiceName: pulumi.String("myservice"),
Sku: &appplatform.SkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("S0"),
Tier: pulumi.String("Standard"),
},
})
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.appplatform.Deployment;
import com.pulumi.azurenative.appplatform.DeploymentArgs;
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 deployment = new Deployment("deployment", DeploymentArgs.builder()
.appName("myapp")
.deploymentName("mydeployment")
.properties(Map.ofEntries(
Map.entry("deploymentSettings", Map.ofEntries(
Map.entry("addonConfigs", Map.of("ApplicationConfigurationService", Map.of("patterns", "mypattern"))),
Map.entry("apms", Map.of("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights")),
Map.entry("environmentVariables", Map.of("env", "test")),
Map.entry("livenessProbe", Map.ofEntries(
Map.entry("disableProbe", false),
Map.entry("failureThreshold", 3),
Map.entry("initialDelaySeconds", 30),
Map.entry("periodSeconds", 10),
Map.entry("probeAction", Map.ofEntries(
Map.entry("path", "/health"),
Map.entry("scheme", "HTTP"),
Map.entry("type", "HTTPGetAction")
))
)),
Map.entry("readinessProbe", Map.ofEntries(
Map.entry("disableProbe", false),
Map.entry("failureThreshold", 3),
Map.entry("initialDelaySeconds", 30),
Map.entry("periodSeconds", 10),
Map.entry("probeAction", Map.ofEntries(
Map.entry("path", "/health"),
Map.entry("scheme", "HTTP"),
Map.entry("type", "HTTPGetAction")
))
)),
Map.entry("resourceRequests", Map.ofEntries(
Map.entry("cpu", "1000m"),
Map.entry("memory", "3Gi")
)),
Map.entry("terminationGracePeriodSeconds", 30)
)),
Map.entry("source", Map.ofEntries(
Map.entry("artifactSelector", "sub-module-1"),
Map.entry("relativePath", "resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
Map.entry("type", "Source"),
Map.entry("version", "1.0")
))
))
.resourceGroupName("myResourceGroup")
.serviceName("myservice")
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("name", "S0"),
Map.entry("tier", "Standard")
))
.build());
}
}
Content copied to clipboard
Deployments_CreateOrUpdate_CustomContainer
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deployment = new AzureNative.AppPlatform.Deployment("deployment", new()
{
AppName = "myapp",
DeploymentName = "mydeployment",
Properties = new AzureNative.AppPlatform.Inputs.DeploymentResourcePropertiesArgs
{
DeploymentSettings = new AzureNative.AppPlatform.Inputs.DeploymentSettingsArgs
{
EnvironmentVariables =
{
{ "env", "test" },
},
LivenessProbe = new AzureNative.AppPlatform.Inputs.ProbeArgs
{
DisableProbe = false,
FailureThreshold = 3,
InitialDelaySeconds = 30,
PeriodSeconds = 10,
ProbeAction = new AzureNative.AppPlatform.Inputs.HTTPGetActionArgs
{
Path = "/health",
Scheme = "HTTP",
Type = "HTTPGetAction",
},
},
ReadinessProbe = new AzureNative.AppPlatform.Inputs.ProbeArgs
{
DisableProbe = false,
FailureThreshold = 3,
InitialDelaySeconds = 30,
PeriodSeconds = 10,
ProbeAction = new AzureNative.AppPlatform.Inputs.HTTPGetActionArgs
{
Path = "/health",
Scheme = "HTTP",
Type = "HTTPGetAction",
},
},
ResourceRequests = new AzureNative.AppPlatform.Inputs.ResourceRequestsArgs
{
Cpu = "1000m",
Memory = "3Gi",
},
TerminationGracePeriodSeconds = 30,
},
Source = new AzureNative.AppPlatform.Inputs.CustomContainerUserSourceInfoArgs
{
CustomContainer = new AzureNative.AppPlatform.Inputs.CustomContainerArgs
{
Args = new[]
{
"-c",
"while true; do echo hello; sleep 10;done",
},
Command = new[]
{
"/bin/sh",
},
ContainerImage = "myContainerImage:v1",
ImageRegistryCredential = new AzureNative.AppPlatform.Inputs.ImageRegistryCredentialArgs
{
Password = "myPassword",
Username = "myUsername",
},
LanguageFramework = "springboot",
Server = "myacr.azurecr.io",
},
Type = "Container",
},
},
ResourceGroupName = "myResourceGroup",
ServiceName = "myservice",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/appplatform/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appplatform.NewDeployment(ctx, "deployment", &appplatform.DeploymentArgs{
AppName: pulumi.String("myapp"),
DeploymentName: pulumi.String("mydeployment"),
Properties: appplatform.DeploymentResourcePropertiesResponse{
DeploymentSettings: interface{}{
EnvironmentVariables: pulumi.StringMap{
"env": pulumi.String("test"),
},
LivenessProbe: &appplatform.ProbeArgs{
DisableProbe: pulumi.Bool(false),
FailureThreshold: pulumi.Int(3),
InitialDelaySeconds: pulumi.Int(30),
PeriodSeconds: pulumi.Int(10),
ProbeAction: appplatform.HTTPGetAction{
Path: "/health",
Scheme: "HTTP",
Type: "HTTPGetAction",
},
},
ReadinessProbe: &appplatform.ProbeArgs{
DisableProbe: pulumi.Bool(false),
FailureThreshold: pulumi.Int(3),
InitialDelaySeconds: pulumi.Int(30),
PeriodSeconds: pulumi.Int(10),
ProbeAction: appplatform.HTTPGetAction{
Path: "/health",
Scheme: "HTTP",
Type: "HTTPGetAction",
},
},
ResourceRequests: &appplatform.ResourceRequestsArgs{
Cpu: pulumi.String("1000m"),
Memory: pulumi.String("3Gi"),
},
TerminationGracePeriodSeconds: pulumi.Int(30),
},
Source: appplatform.CustomContainerUserSourceInfo{
CustomContainer: appplatform.CustomContainer{
Args: []string{
"-c",
"while true; do echo hello; sleep 10;done",
},
Command: []string{
"/bin/sh",
},
ContainerImage: "myContainerImage:v1",
ImageRegistryCredential: appplatform.ImageRegistryCredential{
Password: "myPassword",
Username: "myUsername",
},
LanguageFramework: "springboot",
Server: "myacr.azurecr.io",
},
Type: "Container",
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ServiceName: pulumi.String("myservice"),
})
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.appplatform.Deployment;
import com.pulumi.azurenative.appplatform.DeploymentArgs;
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 deployment = new Deployment("deployment", DeploymentArgs.builder()
.appName("myapp")
.deploymentName("mydeployment")
.properties(Map.ofEntries(
Map.entry("deploymentSettings", Map.ofEntries(
Map.entry("environmentVariables", Map.of("env", "test")),
Map.entry("livenessProbe", Map.ofEntries(
Map.entry("disableProbe", false),
Map.entry("failureThreshold", 3),
Map.entry("initialDelaySeconds", 30),
Map.entry("periodSeconds", 10),
Map.entry("probeAction", Map.ofEntries(
Map.entry("path", "/health"),
Map.entry("scheme", "HTTP"),
Map.entry("type", "HTTPGetAction")
))
)),
Map.entry("readinessProbe", Map.ofEntries(
Map.entry("disableProbe", false),
Map.entry("failureThreshold", 3),
Map.entry("initialDelaySeconds", 30),
Map.entry("periodSeconds", 10),
Map.entry("probeAction", Map.ofEntries(
Map.entry("path", "/health"),
Map.entry("scheme", "HTTP"),
Map.entry("type", "HTTPGetAction")
))
)),
Map.entry("resourceRequests", Map.ofEntries(
Map.entry("cpu", "1000m"),
Map.entry("memory", "3Gi")
)),
Map.entry("terminationGracePeriodSeconds", 30)
)),
Map.entry("source", Map.ofEntries(
Map.entry("customContainer", Map.ofEntries(
Map.entry("args",
"-c",
"while true; do echo hello; sleep 10;done"),
Map.entry("command", "/bin/sh"),
Map.entry("containerImage", "myContainerImage:v1"),
Map.entry("imageRegistryCredential", Map.ofEntries(
Map.entry("password", "myPassword"),
Map.entry("username", "myUsername")
)),
Map.entry("languageFramework", "springboot"),
Map.entry("server", "myacr.azurecr.io")
)),
Map.entry("type", "Container")
))
))
.resourceGroupName("myResourceGroup")
.serviceName("myservice")
.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:appplatform:Deployment mydeployment /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}
Content copied to clipboard
Constructors
Link copied to clipboard
fun DeploymentArgs(appName: Output<String>? = null, deploymentName: Output<String>? = null, properties: Output<DeploymentResourcePropertiesArgs>? = null, resourceGroupName: Output<String>? = null, serviceName: Output<String>? = null, sku: Output<SkuArgs>? = null)