FormulaArgs

data class FormulaArgs(val description: Output<String>? = null, val formulaContent: Output<LabVirtualMachineCreationParameterArgs>? = null, val labName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val osType: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vm: Output<FormulaPropertiesFromVmArgs>? = null) : ConvertibleToJava<FormulaArgs>

A formula for creating a VM, specifying an image base and other parameters API Version: 2018-09-15.

Example Usage

Formulas_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var formula = new AzureNative.DevTestLab.Formula("formula", new()
{
Description = "Formula using a Linux base",
FormulaContent = new AzureNative.DevTestLab.Inputs.LabVirtualMachineCreationParameterArgs
{
AllowClaim = false,
Artifacts = new[]
{
new AzureNative.DevTestLab.Inputs.ArtifactInstallPropertiesArgs
{
ArtifactId = "/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs",
Parameters = new[] {},
},
},
DisallowPublicIpAddress = true,
GalleryImageReference = new AzureNative.DevTestLab.Inputs.GalleryImageReferenceArgs
{
Offer = "0001-com-ubuntu-server-groovy",
OsType = "Linux",
Publisher = "canonical",
Sku = "20_10",
Version = "latest",
},
IsAuthenticationWithSshKey = false,
LabSubnetName = "Dtl{labName}Subnet",
LabVirtualNetworkId = "/virtualnetworks/dtl{labName}",
Location = "{location}",
NetworkInterface = new AzureNative.DevTestLab.Inputs.NetworkInterfacePropertiesArgs
{
SharedPublicIpAddressConfiguration = new AzureNative.DevTestLab.Inputs.SharedPublicIpAddressConfigurationArgs
{
InboundNatRules = new[]
{
new AzureNative.DevTestLab.Inputs.InboundNatRuleArgs
{
BackendPort = 22,
TransportProtocol = "Tcp",
},
},
},
},
Notes = "Ubuntu Server 20.10",
Size = "Standard_B1ms",
StorageType = "Standard",
UserName = "user",
},
LabName = "{labName}",
Location = "{location}",
Name = "{formulaName}",
ResourceGroupName = "resourceGroupName",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devtestlab.Formula;
import com.pulumi.azurenative.devtestlab.FormulaArgs;
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 formula = new Formula("formula", FormulaArgs.builder()
.description("Formula using a Linux base")
.formulaContent(Map.ofEntries(
Map.entry("allowClaim", false),
Map.entry("artifacts", Map.ofEntries(
Map.entry("artifactId", "/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs"),
Map.entry("parameters", )
)),
Map.entry("disallowPublicIpAddress", true),
Map.entry("galleryImageReference", Map.ofEntries(
Map.entry("offer", "0001-com-ubuntu-server-groovy"),
Map.entry("osType", "Linux"),
Map.entry("publisher", "canonical"),
Map.entry("sku", "20_10"),
Map.entry("version", "latest")
)),
Map.entry("isAuthenticationWithSshKey", false),
Map.entry("labSubnetName", "Dtl{labName}Subnet"),
Map.entry("labVirtualNetworkId", "/virtualnetworks/dtl{labName}"),
Map.entry("location", "{location}"),
Map.entry("networkInterface", Map.of("sharedPublicIpAddressConfiguration", Map.of("inboundNatRules", Map.ofEntries(
Map.entry("backendPort", 22),
Map.entry("transportProtocol", "Tcp")
)))),
Map.entry("notes", "Ubuntu Server 20.10"),
Map.entry("size", "Standard_B1ms"),
Map.entry("storageType", "Standard"),
Map.entry("userName", "user")
))
.labName("{labName}")
.location("{location}")
.name("{formulaName}")
.resourceGroupName("resourceGroupName")
.build());
}
}

Import

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

$ pulumi import azure-native:devtestlab:Formula {formulaName} /subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/formulas/{formulaName}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, formulaContent: Output<LabVirtualMachineCreationParameterArgs>? = null, labName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, osType: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vm: Output<FormulaPropertiesFromVmArgs>? = null)

Properties

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

The description of the formula.

Link copied to clipboard

The content of the formula.

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

The name of the lab.

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

The location of the resource.

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

The name of the formula.

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

The OS type of the formula.

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

The name of the resource group.

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

The tags of the resource.

Link copied to clipboard
val vm: Output<FormulaPropertiesFromVmArgs>? = null

Information about a VM from which a formula is to be created.

Functions

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