SpringCloudBuildDeployment

class SpringCloudBuildDeployment : KotlinCustomResource

Manages a Spring Cloud Build Deployment.

Note: This resource is applicable only for Spring Cloud Service with enterprise tier. !>Note: Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the azure.appplatform.SpringCloudBuildDeployment resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example",
location: "West Europe",
});
const exampleSpringCloudService = new azure.appplatform.SpringCloudService("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
skuName: "E0",
});
const exampleSpringCloudApp = new azure.appplatform.SpringCloudApp("example", {
name: "example",
resourceGroupName: exampleSpringCloudService.resourceGroupName,
serviceName: exampleSpringCloudService.name,
});
const exampleSpringCloudBuildDeployment = new azure.appplatform.SpringCloudBuildDeployment("example", {
name: "example",
springCloudAppId: exampleSpringCloudApp.id,
buildResultId: "<default>",
instanceCount: 2,
environmentVariables: {
Foo: "Bar",
Env: "Staging",
},
quota: {
cpu: "2",
memory: "4Gi",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example",
location="West Europe")
example_spring_cloud_service = azure.appplatform.SpringCloudService("example",
name="example",
location=example.location,
resource_group_name=example.name,
sku_name="E0")
example_spring_cloud_app = azure.appplatform.SpringCloudApp("example",
name="example",
resource_group_name=example_spring_cloud_service.resource_group_name,
service_name=example_spring_cloud_service.name)
example_spring_cloud_build_deployment = azure.appplatform.SpringCloudBuildDeployment("example",
name="example",
spring_cloud_app_id=example_spring_cloud_app.id,
build_result_id="<default>",
instance_count=2,
environment_variables={
"Foo": "Bar",
"Env": "Staging",
},
quota={
"cpu": "2",
"memory": "4Gi",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example",
Location = "West Europe",
});
var exampleSpringCloudService = new Azure.AppPlatform.SpringCloudService("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
SkuName = "E0",
});
var exampleSpringCloudApp = new Azure.AppPlatform.SpringCloudApp("example", new()
{
Name = "example",
ResourceGroupName = exampleSpringCloudService.ResourceGroupName,
ServiceName = exampleSpringCloudService.Name,
});
var exampleSpringCloudBuildDeployment = new Azure.AppPlatform.SpringCloudBuildDeployment("example", new()
{
Name = "example",
SpringCloudAppId = exampleSpringCloudApp.Id,
BuildResultId = "<default>",
InstanceCount = 2,
EnvironmentVariables =
{
{ "Foo", "Bar" },
{ "Env", "Staging" },
},
Quota = new Azure.AppPlatform.Inputs.SpringCloudBuildDeploymentQuotaArgs
{
Cpu = "2",
Memory = "4Gi",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
SkuName: pulumi.String("E0"),
})
if err != nil {
return err
}
exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
Name: pulumi.String("example"),
ResourceGroupName: exampleSpringCloudService.ResourceGroupName,
ServiceName: exampleSpringCloudService.Name,
})
if err != nil {
return err
}
_, err = appplatform.NewSpringCloudBuildDeployment(ctx, "example", &appplatform.SpringCloudBuildDeploymentArgs{
Name: pulumi.String("example"),
SpringCloudAppId: exampleSpringCloudApp.ID(),
BuildResultId: pulumi.String("<default>"),
InstanceCount: pulumi.Int(2),
EnvironmentVariables: pulumi.StringMap{
"Foo": pulumi.String("Bar"),
"Env": pulumi.String("Staging"),
},
Quota: &appplatform.SpringCloudBuildDeploymentQuotaArgs{
Cpu: pulumi.String("2"),
Memory: pulumi.String("4Gi"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appplatform.SpringCloudService;
import com.pulumi.azure.appplatform.SpringCloudServiceArgs;
import com.pulumi.azure.appplatform.SpringCloudApp;
import com.pulumi.azure.appplatform.SpringCloudAppArgs;
import com.pulumi.azure.appplatform.SpringCloudBuildDeployment;
import com.pulumi.azure.appplatform.SpringCloudBuildDeploymentArgs;
import com.pulumi.azure.appplatform.inputs.SpringCloudBuildDeploymentQuotaArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example")
.location("West Europe")
.build());
var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.skuName("E0")
.build());
var exampleSpringCloudApp = new SpringCloudApp("exampleSpringCloudApp", SpringCloudAppArgs.builder()
.name("example")
.resourceGroupName(exampleSpringCloudService.resourceGroupName())
.serviceName(exampleSpringCloudService.name())
.build());
var exampleSpringCloudBuildDeployment = new SpringCloudBuildDeployment("exampleSpringCloudBuildDeployment", SpringCloudBuildDeploymentArgs.builder()
.name("example")
.springCloudAppId(exampleSpringCloudApp.id())
.buildResultId("<default>")
.instanceCount(2)
.environmentVariables(Map.ofEntries(
Map.entry("Foo", "Bar"),
Map.entry("Env", "Staging")
))
.quota(SpringCloudBuildDeploymentQuotaArgs.builder()
.cpu("2")
.memory("4Gi")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example
location: West Europe
exampleSpringCloudService:
type: azure:appplatform:SpringCloudService
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
skuName: E0
exampleSpringCloudApp:
type: azure:appplatform:SpringCloudApp
name: example
properties:
name: example
resourceGroupName: ${exampleSpringCloudService.resourceGroupName}
serviceName: ${exampleSpringCloudService.name}
exampleSpringCloudBuildDeployment:
type: azure:appplatform:SpringCloudBuildDeployment
name: example
properties:
name: example
springCloudAppId: ${exampleSpringCloudApp.id}
buildResultId: <default>
instanceCount: 2
environmentVariables:
Foo: Bar
Env: Staging
quota:
cpu: '2'
memory: 4Gi

Import

Spring Cloud Build Deployments can be imported using the resource id, e.g.

$ pulumi import azure:appplatform/springCloudBuildDeployment:SpringCloudBuildDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/apps/app1/deployments/deploy1

Properties

Link copied to clipboard
val addonJson: Output<String>

A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.

Link copied to clipboard

Specifies a list of Spring Cloud Application Performance Monitoring IDs.

Link copied to clipboard
val buildResultId: Output<String>

The ID of the Spring Cloud Build Result.

Link copied to clipboard

Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceCount: Output<Int>?

Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between 1 and 500. Defaults to 1 if not specified.

Link copied to clipboard
val name: Output<String>

The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A quota block as defined below.

Link copied to clipboard

The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.

Link copied to clipboard
val urn: Output<String>